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 » IBM MQ Java / JMS » shall I use IBM's classes or SUN's classes ?

Post new topic  Reply to topic
 shall I use IBM's classes or SUN's classes ? « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Fri Dec 16, 2005 3:23 pm    Post subject: shall I use IBM's classes or SUN's classes ? Reply with quote

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
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Fri Dec 16, 2005 5:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 16, 2005 6:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sebastia
PostPosted: Sat Dec 17, 2005 5:59 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Sat Dec 17, 2005 6:50 am    Post subject: Reply with quote

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
View user's profile Send private message
sebastia
PostPosted: Wed Jan 04, 2006 5:51 am    Post subject: got 2 samples ! Reply with quote

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
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Jan 04, 2006 5:59 am    Post subject: Reply with quote

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
View user's profile Send private message
JohnRodey
PostPosted: Wed Jan 04, 2006 6:02 am    Post subject: Reply with quote

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
View user's profile Send private message
sebastia
PostPosted: Wed Jan 04, 2006 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » shall I use IBM's classes or SUN's classes ?
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.