Author |
Message
|
sebastia |
Posted: Fri Dec 16, 2005 3:23 pm Post subject: shall I use IBM's classes or SUN's classes ? |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
I have to access MQ from Java.
.
Shall I use IBM's classes or SUN's ?
.
I have been told there are problems when setting
the ".userId" field ... at Sun'S classes ...
.
Under Windows, the actual widows user was written at PUT() time,
not the provided string ...
.
Anybody knows ?
.
PD.- am I right saying that
IBM's clasess <==> "import com.ibm.mq.*"
and
Sun's classes <==> "import "javax.jms.*"
?????????????????????????????????????? |
|
Back to top |
|
 |
EddieA |
Posted: Fri Dec 16, 2005 5:25 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Shall I use IBM's classes or SUN's ? |
I thought that Sun's classes were just the "prototypes" of the JMS standard. There's no actual messaging code. For that you have to use provider, such as IBM.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 16, 2005 6:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
EddieA wrote: |
Quote: |
Shall I use IBM's classes or SUN's ? |
I thought that Sun's classes were just the "prototypes" of the JMS standard. There's no actual messaging code. For that you have to use provider, such as IBM.
Cheers, |
You're right EddieA.
Sebastia: The javax.jms.* classes are just interfaces. You need to instanciate the implementation classes for it to work. Those are provider specific...
Enjoy  |
|
Back to top |
|
 |
sebastia |
Posted: Sat Dec 17, 2005 5:59 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
You mean there is NOTHING from SUN ?
I'll check this on Monday and come back ...
Thankx !!!!!!
PD.- dont be fooled by my text "javax.jms.*" ... could be "java.jms.*" ... |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Dec 17, 2005 6:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think Sun has a JMS Provider.
It just won't talk to MQ for you.
The code you get with J2EE is the appserver side of the JMS interface. It is up to the JMS Provider to implement the provider side of the JMS Interface.
This is exactly what allows you to use the same JMS code for any messaging provider. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastia |
Posted: Wed Jan 04, 2006 5:51 am Post subject: got 2 samples ! |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Well, let's see if I can make my mind clear !
.
I have 2 samples :
sample (A) uses MQ classes for Java)
sample (B) uses JMS
.
And the headers are :
.
(A)
import com.ibm.mq.*;
.
(B)
import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import com.ibm.mq.jms.*;
import com.ibm.mq.MQC.*;
.
My question now is : what classes are used in situation (B) ?
.
The IBM's classes for JMS ???
.
So, the original question can be re-written as :
.
import com.ibm.mq.*; ===>>> IMB MQ classes for Java
import com.ibm.mq.jms.*; ==>> IBM clases for JMS
.
Sorry if it is VERY basic, but I need some light ....
.
Happy 2006 to ALL !
. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 04, 2006 5:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That's not a question, really.
Yes. Stuff in the com.ibm.mq.jms packages are the IBM supplied implementation of the JMS Provider. Stuff in javax.jms are the sun supplied implementation of the "client" side of the JMS API.
Stuff in the com.ibm.mq package are the IBM supplied WebSphere MQ API for Java - which is not JMS at all.
Stuff in com.ibm.mq.MQC are constants for use with both the JMS and the MQ API. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JohnRodey |
Posted: Wed Jan 04, 2006 6:02 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
If you want to use the base MQ then use the com.ibm.mq.jar.
If you want to use JMS classes you will need to use the com.ibm.mq.jar, com.ibm.mqjms.jar, and jms.jar all bundled with WebSphere MQ (maybe connector.jar too?). You cannot use any other vendors jms.jar, even Suns if they have one. |
|
Back to top |
|
 |
sebastia |
Posted: Wed Jan 04, 2006 6:57 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks a lot for all the answers.
I will try to code two samples ...
a) IBM MQ for Java
b) JMS
Bets luck ! |
|
Back to top |
|
 |
|