Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Oracle JMS with WLS 6.1 MDB

4 views
Skip to first unread message

Norman

unread,
Nov 27, 2001, 11:59:40 AM11/27/01
to

The problem I am having is using java from within an oracle server sending a JMS
message to a Weblogic Message Driven Bean.

I have had to make a few "hacks" to get as far as I am.
Firstly in my belief I had to wrap an InitialContextFactory and InitialContext
around access to Oracles queues and QueueConnection Factory. This is because Oracles
access to these seem to be using proprietary mechanisms. This is fine but in order
for MessageBeans to use these they have to be accessed in a "standard way". I
successfully dummied up an InitialContext to use Oracles mechanism behind the
scenes. This seems to work fine, except when weblogic tries to create the Queue
Session.
The reason this doesn't work is because Oracle JMS doesn't support "non transacted"
Queue Sessions ie queueConnection.createQueueSession(false, ......

It seems that ALL queue sessions are created with false for MDBs.
This is because I get the exception :

oracle.jms.AQjmsException: JMS-102: Feature not supported
at oracle.jms.AQjmsError.throwEx(AQjmsError.java:217)
at oracle.jms.AQjmsConnection.createQueueSession(AQjmsConnection.java:584)
at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:492)
at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:353)
at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSConnectionPoller.java:269)
at weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.deploy(MessageDrivenBeanInfoImpl.java:511)
at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1226)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:939)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)

i know this is an oracle lack of features (will it ever be fixed?) but is there
any way for a MDB to make this pass true to createQueueSession?

Any help hugely appreciated!

Norman

Zach

unread,
Nov 27, 2001, 12:42:46 PM11/27/01
to
If their session are transacted as in XASessions, then they are supposed
to ignore the transacted flag. There is not much we can do here to help.
We pass false for the cases where the user wants a non-transactional
MDB and is using a regular session. If the session is really an XASession
then the false is simply ignored (per the specification).

_sjz.

"Norman" <Norma...@btinternet.com> wrote in message
news:3c03c67c$1...@newsgroups.bea.com...

Norman

unread,
Nov 28, 2001, 11:30:37 AM11/28/01
to

"Zach" <za...@nospam.com> wrote:
>If their session are transacted as in XASessions, then they are supposed
>to ignore the transacted flag. There is not much we can do here to
>help.
>We pass false for the cases where the user wants a non-transactional
>MDB and is using a regular session. If the session is really an XASession
>then the false is simply ignored (per the specification).
>
>_sjz.
>
Thanks for that.
I think that means that I can't user Oracle JMS in this manner.
However, I would now like to use Weblogic JMS from Oracle.
I understand the concepts and everything else, but there is a sticking point which
has been mentioned in many guises on this forum before. The problem is I want
to load a subset of the weblogic.jar, for JMS (and probably JNDI). This would
have been my preferred solution to start with , if this task wasn't so difficult.
So I have a problem similar to the applet problem I have noticed mentioned on
this board over and over again. I have also noticed the list of classes needed
in a proposed solution for this for Weblogic 6. wls 6.1 must be different as not
all of these classes exist in weblogic.jar.

So, does anybody have a definitive list for 6.1?

Cheers

Norman

Norman

unread,
Nov 28, 2001, 3:12:06 PM11/28/01
to

Thanks Tom, it seems like a good idea.
Its 8pm in the UK and I am at home.
I will give this a try when I get to work tomorrow.

It seems a similar method to writing an applet, and using access.log to see what
was requested but I didn't have
a lot of luck with that!

I like the heuristic bit, it seems quite clever (I am not a shell script expert!).

One comment I have to make before I try it is that, for whatever reasons weblogic
server doesn't seemed to be implemented in a modularised manner. There seems to
be so many dependencies other than just JMS, JNDI and RMI. Hey, who am I to complain
I love the product!

Also the idea of extending URL classloader to give you a hook into classloading
is also good one!

Well done!

Cheers

Norm
Tom Barnes <dev....@not.my.address.com> wrote:
>
>Three approaches for thin 6.1 client:
>
>(1) There is an effort at BEA underway to create a thin client jar for
>6.1. On
>the order of months before it is released, with a beta (limited to a
>few
>customers) coming out earlier.
>
>(2) I think BEA has documented a way to develop your own. Use java -verbose
>to run the client, capture the output, and feed it through a "verbose2zip"
>java utility (not sure of name). You should also apply the heuristic
>outlined in (3)
>below.
>
>(3) So far, the most effective way of creating your own, IMHO, is to
>use a network
>class loader
>to automatically create a cache of used classes. Then heuristically
>copy all
>Exceptions and
>javax code that may not have been pulled in. This seems to do the trick,
>but is not
>100% guaranteed
>and is not supported (you are on your own.) I've attached a .java file
>for the
>netload step and a shell script for the heuristic step.
>
>Tom

0 new messages