Forum Replies Created
-
AuthorReplies
-
In case someone else also runs into this issue, here is how I handled it. See attached screenshot.
O.C.
January 25, 2006 at 5:44 pm in reply to: Engine to Weblogic connection – getting rid of MQ Series #58113Amy, I got good news for you! I have the “topic” JMS client working as a stand alone and I also have the info you were looking about where to set up server, port, JNDI and connection factory.
One important thing I forgot to mention:
I am attaching a j2ee.jar file, which you will have to place it on your server and also add that directory to your CLASSPATH for this stand alone to work/compile. Note: Later you should set this to QDXI_CLASSPATH when you are ready to plug this code into Cloverleaf Test program.
From the URL I sent you in the last mail, copy that program (I am also attaching the java file), next
copy that j2ee.jar file to (example: /opt/quovadx/qdx5.3/integrator/SiteName/java_uccs), next
add that to the classpath (example: setenv CLASSPATH /opt/quovadx/qdx5.3/integrator/SiteName/java_uccs/j2ee.jar:)
and now you should be able to compile the java program without any error.
Once you are successful in doing the above:
Open your Standalone Java program and add the following code right after the line where it says –>” // … specify the JNDI properties specific to the vendor”:
env.put(Context.SECURITY_PRINCIPAL, “ASK JMS ADMIN For the Value”);
env.put(Context.SECURITY_CREDENTIALS, “ASK JMS ADMIN For the Value”);
env.put(Context.INITIAL_CONTEXT_FACTORY, “ASK JMS ADMIN For the Value”);
// Above will be the Connection Factory info.
env.put(Context.PROVIDER_URL, “ServerName:ProtNumber”);
//Above is where you will put the server name and the port number, note the “:”
Now you can recompile the program and then run the program. When you are ready to run the program you have to also know one more thing: The “topic” name. This is the actually the place where you will put the Text message which will be picked up by JMS. Ask your JMS admin for it.
Once you have all the info you can run the program as:
>java Chat topicName uerid passwd
type something and enter
type “exit” and enter
Now check with the JMS admin to see it the msg reached the expected test queue.
Once this works, its piece of cake to plug this into cloverleaf and add a Kill statement in the code.
Good luck to you guys! and don’t hesitate to let me know if you need any help.
Regards,
Osmand Christian
Dept. Health & Human Services,
State of North Carolina
January 25, 2006 at 1:57 am in reply to: Engine to Weblogic connection – getting rid of MQ Series #58112Amy, I am still working on this but if you have some time take a look at this.
This one is “topic”:
http://www.oreilly.com/catalog/javmesser/chapter/ch02.html Are you interested in “topic” or “queue” JMS client implementation?
Modification of this program (URL above) should get what you want – if you are looking for a “topic” communication.
A tricky way of accomplishing the task you asked (after state 11) is to kill the message after using the Java JMS client request to the Java Application. This has to be done in a custom way through Cloverleaf as it doesn’t provide a built in interface for JMS. There are other ways to do this too. If there is anyone who can do some java coding you could use Multithreading capability of Java and pass messages to JMS. In this case, you can send the data out of the engine (tcp/ip) to a Java based Multithread program and allow java to handle the rest of the work.
Do you also want to get a reply back from the Java Application? In that case we have to do something different. One way to do that is to send the reply to cloverleaf on a different port and keep a multithread connection waiting to receive any messages on the Cloverleaf side. This architecture is something I have in production now for SOAP replies and so I am sure we can do that.
I hope this helps..
Osmand C.
Dept. Health & Human Services,
State of North Carolina
January 24, 2006 at 6:15 pm in reply to: Engine to Weblogic connection – getting rid of MQ Series #58110Amy, Is there anyone on your team who can understand Java? It might be helpful to do the rest of the code but if not its ok, I will walk you through this.
I am attaching a java file which will get you started. Place this code in the site’s java_uccs directory. I am assuming that you have java compiler on your Cloverleaf server. What machine are you using for Cloverleaf? Based on that you have to place this environment set up:
On Unix: either export or setenv
You can place this in .cshrc file. Example:
setenv QDXI_CLASSPATH .:/opt/quovadx/qdx5.3/integrator/SiteName/java_uccs:
The java class I am attaching is called “Test.java”. Compile the java class, please place the complied java class “Test.class” in the above directory and input the class name, which is “Test” on the TPS outbound. Make sure to select “Java class” instead of “tcl” in the TPS properties to input the name “Test”.
Now you can test this and see your msg appear in the process log. Once you get this successful, all you have to do is identify how to talk to JMS. This I believe will not be too hard. If you have problem getting this done please let me know, I will walk you through.
Java extension attachment is not allowed so I am copy pasting the java code. Please save below as
Markus,
NoClassDefFoundError says that engine is not seeing the class. Check your Classpath. Make sure your class file “GetLabPanel” directory is in QDXI_CLASSPATH.
>echo $QDXI_CLASSPATH
That should solve the problem.
Cheers!
Osmand C.
Department of Health & Human Services,
State of North Carolina
January 23, 2006 at 5:21 pm in reply to: Engine to Weblogic connection – getting rid of MQ Series #58108Amy, You mentioned that “For our application we are picking up an XML file and sending it to a JMS queue”. At what point in the engine are you doing this? You could place a Java (TPS) code to do this from wherever you may be picking the XML file.
Java Message Service should run any platform as long as you have a JVM. So you wouldn
January 23, 2006 at 4:37 pm in reply to: Engine to Weblogic connection – getting rid of MQ Series #58106Damon/Amy, I might be able to help you with this. I haven’t done JMS but I have Java codes that receive XML messages from WS and passes on to make a SOAP call to another server. This is all done in TPS inbound and outbound with Java in the CL engine. What exactly would you like me to send you?
There are some tricky stuffs you should be aware of when you start using Java in the CL engine. Let me know if I can help you guys in any way.
Cheers!
Osmand C.
Dept. Health & Human Services,
State of North Carolina
-
AuthorReplies