|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS Code in Oracle and MQ Queue |
« View previous topic :: View next topic » |
Author |
Message
|
BornOn4thOfJuly |
Posted: Wed Feb 01, 2006 3:33 pm Post subject: JMS Code in Oracle and MQ Queue |
|
|
Newbie
Joined: 01 Feb 2006 Posts: 3
|
Hi, I am a newbie in JMS/MQ.
I want to write Java Stored Procedure in Oracle, that will put a message on an MQ Outbound Queue. This Queue will send a message to another Receiving Queue. An Adapter will be listening and will get the message from the Queue and insert it into the other oracle instance.
I assume this will be a common scenario. Can someone share sample code with me.
I have 2 days to complete the code (Feb-2-2006 and Feb-3-2006).. So please take this as real important (for me). I know there are a lot of very experienced people out here. |
|
Back to top |
|
 |
mvic |
Posted: Wed Feb 01, 2006 3:44 pm Post subject: Re: JMS Code in Oracle and MQ Queue |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
|
Back to top |
|
 |
BornOn4thOfJuly |
Posted: Fri Feb 03, 2006 1:19 pm Post subject: |
|
|
Newbie
Joined: 01 Feb 2006 Posts: 3
|
Sorry... didn't help much.... Let me simplify the problem.
1. I have a MQ Server (set up by someone else) with a QueueManager and a remote queue set up. Lets say machine A. I am told that it uses SVRCON(?) and listening to port 1414.
Machine IP : 123.123.123.123
Port : 1414
Server Channel (?) : SVRCON (?)
Queue Manager : QM01
Queue : QU01.TEST
Queue Type : Remote Definition
2. I have a machine B that is pure JMS (no MQ Series installed on it, not even client).
Solution: I want to put a message on machine A. And the client is on machine B.
(?) Does a MQQueueConnectionFactory have to be created???
I know it might sound too trivial to you, can someone provide me with the code for it (Or point me to the code). Please do consider that the machine B is pure JMS, does not have any MQ Client/Server installed.
I am using Java 1.3.1 and MQ Server 5.3
THIS IS VERY VERY URGENT FOR ME.. I have to finish this before Saturda Noon (Feb 04-2006)...
THANKS A LOT FOR ALL THE HELP... |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 03, 2006 11:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well you need at least the jar files from the provider (IBM) on your classpath on machine B. Then you probably want the .bindings file generated by JMSAdmin on machine A for accessing the qmgr and queues through JNDI.
After that it's just retrieve the factory and queues from the context and get rolling. As you are running on machine B you can only do a single phase commit unless you have the transactional client.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
BornOn4thOfJuly |
Posted: Sat Feb 04, 2006 4:52 am Post subject: |
|
|
Newbie
Joined: 01 Feb 2006 Posts: 3
|
Thanks fjb,
If I get the jar file then it is not a Pure JMS code, right? With the jar file, I have a huge dependency on MQ. I would ideally want to have no MQ signature on the client machine. I thought that is what the lookup does, it gets the initial context, factory and the queue.
But if you (and others) say that I definitely will have to have the provider jar, then which jar is it?
As for the .bindings file. Can you kindly share some steps with me.
On Machine A
1. I run JSAdmin
2. Then what do I do???
On Machine B
1. Now I have the .bindings file
2. What do I do?
In the code.. How do I set the evnirontment? What should the provider_url be. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 04, 2006 7:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
BornOn4thOfJuly wrote: |
Thanks fjb,
If I get the jar file then it is not a Pure JMS code, right? With the jar file, I have a huge dependency on MQ. I would ideally want to have no MQ signature on the client machine. I thought that is what the lookup does, it gets the initial context, factory and the queue.
But if you (and others) say that I definitely will have to have the provider jar, then which jar is it? |
Remember JMS is not provider neutral. The interface is but the implementation is provider dependant. It is Pure JMS but you have to have the implementation jars on the CLASSPATH.
Which jar? All of the jars in <MQ INSTALL>/java/lib
BornOn4thOfJuly wrote: |
As for the .bindings file. Can you kindly share some steps with me.
On Machine A
1. I run JSAdmin
2. Then what do I do??? |
Step 0 read the "Using Java" manual. See documentation link at top of page. It is a platform independant manual. Free download in pdf. It contains all the information needed on how to generate the .bindings file.
Alternate ask for the .bindings file from your MQAdmin. It needs to be transfered in binary mode(ftp) and set up for a client connection.
BornOn4thOfJuly wrote: |
On Machine B
1. Now I have the .bindings file
2. What do I do?
In the code.. How do I set the evnirontment? What should the provider_url be. |
2. put it into some directory:<path>/somedir/.bindings
PROVIDER_URL="file://host/<path>/somedir";
Now your client code can be fully JMS compliant and need not reference any IBM stuff or jars.
For the context be sure to choose the sun FileContext factory.
Retrieve and cast from the Context to the appropriate JMS class.
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|