|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JAVA function - broker does not pick up imported package? |
« View previous topic :: View next topic » |
Author |
Message
|
moogoo |
Posted: Tue Nov 13, 2007 11:50 am Post subject: JAVA function - broker does not pick up imported package? |
|
|
Acolyte
Joined: 20 Sep 2002 Posts: 54 Location: US
|
Hi All,
I'm in the process of creating a call to a JAVA function from WMB V6.0. Everything seems to be working ok except when the JAVA function calls the "DocumentBuilder" class from the "j2ee" jar that I imported into the JAVA project as an external JAR for manipulating XML data. During testing via the Toolkit, it runs perfectly and is able to find that class just fine. However, when I test after deploying the flow and JAVA function to the broker, it cannot seem to find that class for some reason. Seems like the "j2ee" external JAR is not getting picked up by the Broker for processing...is that "j2ee" jar something that I need to explicitly add to my bar file? Or does that need to be part of the Broker Classpath? I would have thought that by adding my JAVA function jar to the bar file would take in any dependent packages needed for it to run, but apparently I'm mistaken about this.
If anyone could shed any light on this, that would be greatly appreciated.
Thanks,
MG |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 13, 2007 11:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Broker won't pick up "external libraries" when adding java dependencies to the BAR file.
Regardless, you can clearly see everything that has been added to the BAR file.
Unless there's some very very specific XML functionality that you need, you are likely taking the long way around to solve your problem. And even if there is some very specific functionality, you should not be putting an entire J2ee.jar file on Broker when there is likely a smaller package you can use.
Use Broker native capabilities wherever possible.
Use shared-classes for any jar files that are going to be common across the broker. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
moogoo |
Posted: Tue Nov 13, 2007 12:22 pm Post subject: |
|
|
Acolyte
Joined: 20 Sep 2002 Posts: 54 Location: US
|
Thanks Jeff. Yup, I am trying to reuse a piece of JAVA code out there already instead of starting development from scratch in WMB. The "j2ee" jar is huge, almost 7 megs, and currently its choking on the deploy because the queue depth to handle the deploy msg is at its default setting of 4 megs. I'll try to find another way to do this if possible...
Just curious, would adding this "j2ee" jar to the broker path be similar to deploying the jar via the bar file in that Broker would pick it up?
MG |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 13, 2007 12:26 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can manually add it to the bar file.
You can import it to the java project, as a library jar, rather than link to it as a library jar. Then it will get included in the BAR automatically.
Depending on the nature fo the existing function - it may actually take a very small amount of time to recode in Broker...
And you're going to have to write Broker code to package the data in such a way that the existing Java code can get at it. Or is the data not coming from the message, but some external source? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|