ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MBv6 - Location of Class files with Java Compute Node

Post new topic  Reply to topic
 MBv6 - Location of Class files with Java Compute Node « View previous topic :: View next topic » 
Author Message
Paul D
PostPosted: Wed Mar 01, 2006 4:08 pm    Post subject: MBv6 - Location of Class files with Java Compute Node Reply with quote

Master

Joined: 16 May 2001
Posts: 200
Location: Green Bay Packer Country

We are running MB v6, 6.0.0.1 patch. We are running in Win XP toolkit and broker. We are testing Java compute functionality. We would like to package up the class files that the java compute refers to and other related classes that those classes call into JAR files. The java code is common enterprise code that our regular MB developers do not need to work with. We'd like to provide these in a single JAR that the developer could import in and reference. The issues we have seen is that when we package up the classes in JARs in this fashion, the java compute nodes cannot find the class files. With this, the flow with the java compute node has errors and cannot be added to the BAR. We don't want to distribute the raw *.class files or *.java files to our developers. The only way we can get the java computes to find the *.class files is when they are in a referenced java project and the *.java and *.class files are present in that java project.
_________________
Thanks!!!

Paul D
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Mar 01, 2006 4:55 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You should be able to add the JAR file as a "library" jar in the Java project for your compute node.

You can either import the jar file into your project (as a jar file), or you can add it as an external jar.

Go to the project preferences -> Java Build Path -> Libraries and either add a jar file or an external jar file.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Paul D
PostPosted: Mon Mar 06, 2006 2:51 pm    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 200
Location: Green Bay Packer Country

Here's more on this topic. In order to use a Java Project and associate it with the Message Flow project, you need a Java project that has the following JAR's.

Code:
JCN_HOME/javacompute.jar
JCN_HOME/jplugin2.jar


These can be added to a standard java project by the following:
    Properties for the Project Folder
    Jav Build Path
    Libraries Tab
    Add Variable
    Select 'JCN HOME' folder
    Press Extend button
    Select those two JAR's from the list and press OK.


Libraries should also contain the JAR's that contain your Java Compute classes and any supporting classes. You can copy paste these into the project folder in the file system and do a refresh or do an import. Back in that same spot (i.e. Library tab), select 'Add JAR's', which will add those into this list. As long as you reference this Java Project with the Message Flow project where your java computes are at, you should be good.

No JAR will be generated when the message flow is added to the BAR. It will just pull in the JAR's from this project into the BAR file.

Hint: When on the basic tab of the Java Compute node, when you hit browse, type in an * in the select box. This will list the classes available to associate with. Note the qualifier for the package and java project that these are associated with. This will indicate to you that you are picking up the correct class.
_________________
Thanks!!!

Paul D
Back to top
View user's profile Send private message Visit poster's website
4integration
PostPosted: Mon Nov 20, 2006 3:45 am    Post subject: Reply with quote

Disciple

Joined: 04 Sep 2006
Posts: 197
Location: Gothenburg, Sweden

We have this problem ...with toolkit 6.0.0.2
Having three separated projects (Msg Set, Flow and Java projects). The Java project have references to
<classpathentry kind="var" path="JCN_HOME/javacompute.jar"/>
<classpathentry kind="var" path="JCN_HOME/jplugin2.jar"/>

The flow project have "project references" to the Java and MsgSet projects. In the flows project we get compilation errors saying that the java class file isn't found. Opening the properties and hit the "browse" button, type the class name in and it founds it....but the compilation error remains...

yes, have tried to clean, rebuild, restart of toolkit....and everything without any success.

Those projects have been created with 6.0.0.1, checked in with CVS and checked out with 6.0.0.2 (where the problem begins)
_________________
Best regards
4 Integration
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MBv6 - Location of Class files with Java Compute Node
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.