Engine to Weblogic connection – getting rid of MQ Series

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Engine to Weblogic connection – getting rid of MQ Series

  • Creator
    Topic
  • #48236
    Damon Lease
    Participant

    Currently, I have a live J2EE app that processes a number of HL7 messages and then forwards translated messages to other sites/systems.

    Currently, our engine delivers messages to MQ Series, which then uses JMS to deliver the messages to the WebLogic server, using JMS to invoke message-driven beans.

    I’m trying to cut MQ Series out of the loop due to some licensing/cost issues.  Initially, I thought of using a web service (SOAP) and having the engine deliver the message to an HTTP address.  But, because the JMS definitions are already in place, I thought that perhaps we could simply use Upocs to deliver messages to the web server using JMS and then use JMS on the way back out to the engine.

    I saw one post related to this topic and a JBOSS server a few months ago but no real details on how to do this.  I was hoping that someone might have actually implemented a similar solution or found an alternative.  If anyone might have any suggestions on this architecture, any tips on making it work, or maybe even some code examples using Upocs on the engine to do this, I would be most appreciative.

    Thank you.

    Damon

Viewing 10 reply threads
  • Author
    Replies
    • #58105
      Amy Gray
      Participant

      Hello,

      We are interested in connecting directly with a JMS queue as well.   Did you receive any response to your questions.

      Amy Gray

      BJC Health Systems

    • #58106
      Osmand Christian
      Participant

      Damon/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

    • #58107
      Amy Gray
      Participant

      Osmand,

      For our application we are picking up an XML file and sending it to a JMS queue.  Currently, the processing for the file is on an AIX box.   I don’t know if JMS is available on AIX or if it’s just a SUN application.  I have access to a SUN box so I can route it from AIX to SUN to JMS if needed.

      Are there certain APIs or licenses we need for the JMS processing?  If so, what are they?   I am also interested in seeing the TCL code and set up using Cloverleaf.

      Thank you for any help you can provide.

      Amy

      BJC Health Systems

      alg7293@bjc.org

    • #58108
      Osmand Christian
      Participant

      Amy,

      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

    • #58109
      Amy Gray
      Participant

      Osmand,

      I replied to your e-mail.  Please post a reply here if you do not receive it soon.

      Thank you for your help,

      Amy

    • #58110
      Osmand Christian
      Participant

      Amy,

      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

    • #58111
      Amy Gray
      Participant

      Hi Osmand,

      Thank you for the sample code.   With a few minor exceptions, we have similar code in place.  I have added your differences and processed a message thru to state11 for the outbound thread.    I removed the secondary thread in hopes we can add the logic to connect to JMS in the same Java script.  We have one inbound and one outbound thread.

      Actually connecting to JMS via JAVA is where we are running into the questions.   I have the server and port I need to connect to as well as the JNDI and connection factory info.   What I don’t know is how to configure the outbound thread (tcpip, pdl-tcpip, file….)?  JMS isn’t an option like MQ is.  I also don’t know where I can determine what the wrapping characters should be to communicate with the queue.  

      Any additional help would be appreciated.

      Thank you so much,

      Amy

    • #58112
      Osmand Christian
      Participant

      Amy,

      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

    • #58113
      Osmand Christian
      Participant

      Amy,

      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

    • #58114
      Anonymous
      Participant

      Osmand,

      I’m trying to compile the Test.java you posted but I did not succeed.

      Can I compile a .java without defining a public static void main() ?

      Thanks for your help

      Mikael

      Osmand Christian wrote:

      Amy,

      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

    • #58115
      Bob Moore
      Participant

      I’m trying to get the simple Java Class Test to work on our system.  I was able to compile and add to the outbound disp list, but get “invalid command name “cljTPS”” in the log.  Am I missing a library or something?

Viewing 10 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10