users@glassfish.java.net

Re: jms packaging confusion in Glassfish

From: Alex Sherwin <alex.sherwin_at_acadiasoft.com>
Date: Fri, 10 Apr 2009 14:13:42 -0400

Not sure about your exception, but the OpenMQ mailing lists can be found
here:

https://mq.dev.java.net/servlets/ProjectMailingListList

gsarrowood wrote:
> Thanks for the quick response Alex. I've noted the same thing but wanted to
> check it out
> first to be sure.
>
> I tried to find the OpenMQ list but only found the ActiveMQ. Most
> references to OpenMQ
> are in this Glassfish list. If you have the url, I'd appreciate it.
>
> Untill then, I've implemented the new com.sun packages and am receiving the
> following error.
>
> My code:
> connectionFactory = (ConnectionFactory)
> jndiCtx.lookup("jms/AdminConnectionFactory");
> Result:
> java.lang.ClassCastException:
> com.sun.messaging.jms.ra.ConnectionFactoryAdapter cannot be cast to
> com.sun.messaging.ConnectionFactory
> at
> com.davisco.client.jms.ClientRunTimeConnection.getConnectionSession(ClientRunTimeConnection.java:133)
> at
> com.davisco.mtrguiclient.MTRGuiClientView.waitForValidConnection(MTRGuiClientView.java:1422)
> at
> com.davisco.mtrguiclient.MTRGuiClientView.<init>(MTRGuiClientView.java:1338)
> at
> com.davisco.mtrguiclient.MTRGuiClientApp.startup(MTRGuiClientApp.java:44)
> at org.jdesktop.application.Application$1.run(Application.java:171)
> at java.awt.event.InvocationEvent.dispatch(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
>
> Any Ideas?
> Thanks
>
>
>
>
> Alex Sherwin wrote:
>
>> According to http://docs.sun.com/app/docs/doc/819-7757/6n9mar6fa?a=view
>>
>> It says "The com.sun.messaging.jms.Connection interface, which defines
>> extensions to the javax.jms.Connection interface."
>>
>> Don't know if this helps, but from what I've seen in the "real world" is
>> that you often need to cave into proprietary interfaces/impl classes for
>> app servers to get some things to work. Of course, this is not always
>> the case, and may not be here, but it may just be something you have to
>> do...
>>
>> Hopefully someone with more specific knowledge can answer better for you
>> (or perhaps you should check the OpenMQ mailing list)
>>
>> gsarrowood wrote:
>>
>>> I have developed a client that connects to GF2u2 via JMS. I need to make
>>> it
>>> robust regarding disconnects, etc. I came across a sun doc for the MQ4.1
>>> which according to the glassfish docs, was the MQ that was included in
>>> GF.
>>> My confusion is this: normal includes are jmx.jms.Connection. Using the
>>> event listener refered to in the docs which notifies me of JMS startup,
>>> shutdown, reconnects, etc, require me to replace this Connection with
>>> com.sun.messaging.jms.Connection. Its my understanding that "java.*" and
>>> "javax.*" are 'standard' while any "com.<vendor>.*" package is not really
>>> part of the standard jdk an may go away or be migrated into the standard
>>> at
>>> a later date. So, I guess my question is, is my assumption correct? Is
>>> it
>>> safe to use the com.sun.* connections (and other related objects) in my
>>> app?
>>> Thanks for any comments.
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>>
>>
>
>