JMSJCA, a feature rich JMS Resource Adapter, is now a java.net project

JMSJCA is now a java.net project. It can be found here: http://jmsjca.dev.java.net.

The project is currently used in Java CAPS, JMS Grid and the JMS BC as part of the open-jbi-components project.

The connector can be used as a J2EE 1.4 Resource Adapter, but its libraries can also be used  as an abstraction layer to JMS servers from  non J2EE-code. As such, the adapter acts like a library that hides the complexities of transactions, concurrency, connection failure detection, JMS server implementation idiosyncracies, etc. That is how it is used in the JMS BC as part of the open-jbi-components project.

Comments:

How does JMSJCA compares with Generic JMS RA (https://genericjmsra.dev.java.net/) which is also made by Sun ? They look quite similar in my opinion.

Posted by Ludovic Orban on February 04, 2007 at 05:22 PM PST #

Hi Ludovic,

The main difference between genericjmsra and jmsjca is that the latter is more feature rich and more specialized towards individual JMS servers. Genericjmsra ships with Glassfish, and jmsjca ships with CAPS. Why did Sun develop two resource adapters? It didn't: genericjmsra has its origin within Sun, and the latter within SeeBeyond. After the aquisition of SeeBeyond, Sun couldn't justify killing one or the other, nor saw it need there for that.

Frank 

Posted by Frank Kieviet on February 07, 2007 at 02:15 PM PST #

Hi Frank, I need some help with the weblogic connector. The "weblogic connection factory" becomes stale if the weblogic application server is restarted & JMSJCA wrapper cant create connections from the wrapped object factory. How do I overcome this problem? thanks SK

Posted by sk on July 16, 2007 at 07:39 AM PDT #

Hi sk,

This will require some code changes to fix that. I'll try to roll in these changes into the next release.

Frank

Posted by Frank Kieviet on July 20, 2007 at 05:34 AM PDT #

That would be very nice. Thanks.

I have started using JMSJCA in jboss 4.2.x server to connect a wl 8.1.5 jms provider.

Looking forward to the next release!

Posted by sk on August 22, 2007 at 10:54 AM PDT #

Frank,

The inbound messages are received fine. However, I cant send outbound messages.

Can you give me a poniter?

Receiver uses the following:
@ActivationConfigProperty(propertyName = "ConnectionURL", propertyValue = "t3://localhost:8001/?JMSJCA.WLFACTORY=CFX/XaQueueConnectionFactory&prefix="),

& onMessage() it sends a [response] message.

ConnectionFactory cfx = senderCf2;
System.out.println("found injected java:CFX/ExternalConnectionFactory: " + cfx);

//error here .. cant create connection
Connection conn = cfx.createConnection();

--

JBoss config:

<no-tx-connection-factory>
<jndi-name>CFX/ExternalConnectionFactory</jndi-name>
<xa-transaction />
<track-connection-by-tx />
<rar-name>jmsjca-wl.rar</rar-name>
<connection-definition>javax.jms.QueueConnectionFactory </connection-definition>

<config-property name="ConnectionURL" type="java.lang.String">
<![CDATA[t3://localhost:8001/?JMSJCA.WLFACTORY=CFX/XaQueueConnectionFactory&prefix=]]></config-property>
<min-pool-size>1</min-pool-size>
<max-pool-size>200</max-pool-size>
<blocking-timeout-millis>30000</blocking-timeout-millis>
<idle-timeout-minutes>3</idle-timeout-minutes>
</no-tx-connection-factory>

---

error output

16:08:10,182 INFO [STDOUT] found injected java:CFX/ExternalConnectionFactory: com.stc.jmsjca.core.JConnectionFactoryQue
ueXA@be97b6
16:08:10,197 INFO [STDOUT] %%%%%%%%% ra dumpConfiguration
16:08:10,197 INFO [STDOUT] %%%%%%%%% ra dumpMCFInfo
16:08:10,197 INFO [STDOUT] %%%%%%%%%
16:08:10,197 INFO [STDOUT] mRA.getConnectionURL():
16:08:10,197 INFO [STDOUT] mRAUrl:
16:08:10,197 INFO [STDOUT] p: {}
16:08:10,197 INFO [STDOUT] curl:
16:08:10,197 ERROR [STDERR] java.lang.RuntimeException: Invalid URL []: no protocol specified
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.util.UrlParser.parse(UrlParser.java:69)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.util.UrlParser.getQuery(UrlParser.java:227)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.util.UrlParser.getQueryProperties(UrlParser.java:237)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.core.XManagedConnectionFactory.extractOptions(XManagedConnectionFactor
y.java:488)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.core.XManagedConnectionFactory.getOptionBypassRA(XManagedConnectionFac
tory.java:773)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.core.JConnectionFactory.createConnection(JConnectionFactory.java:355)
16:08:10,197 ERROR [STDERR] at com.stc.jmsjca.core.JConnectionFactory.createConnection(JConnectionFactory.java:427)
16:08:10,213 ERROR [STDERR] at com.stc.jmsjca.core.JConnectionFactory.createConnection(JConnectionFactory.java:411)
16:08:10,213 ERROR [STDERR] at demo2.MomTester.onMessage(MomTester.java:129)
16:08:10,213 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:08:10,213 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
16:08:10,213 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

16:08:10,228 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
16:08:10,228 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
16:08:10,228 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:1
66)
16:08:10,228 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterce
ptor.java:63)
16:08:10,244 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
16:08:10,244 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionSco
pedEntityManagerInterceptor.java:54)
16:08:10,244 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
16:08:10,244 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:
47)
16:08:10,244 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
16:08:10,260 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
16:08:10,260 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
16:08:10,260 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
16:08:10,260 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterce
ptor.java:62)
16:08:10,260 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
16:08:10,260 ERROR [STDERR] at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
16:08:10,275 ERROR [STDERR] at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.ja
va:268)
16:08:10,275 ERROR [STDERR] at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java
:138)
16:08:10,275 ERROR [STDERR] at $Proxy76.onMessage(Unknown Source)
16:08:10,275 ERROR [STDERR] at com.stc.jmsjca.core.Delivery.deliverToEndpoint(Delivery.java:923)
16:08:10,275 ERROR [STDERR] at com.stc.jmsjca.core.SyncDelivery$SyncWorker.runOnceStdXA(SyncDelivery.java:555)
16:08:10,291 ERROR [STDERR] at com.stc.jmsjca.core.SyncDelivery$SyncWorker.run(SyncDelivery.java:823)

--
I tried ra dumpConfiguration() & dumpMCFInfo(). The dumps dont have any information

thanks

Posted by guest on August 22, 2007 at 04:28 PM PDT #

Re sk:

The WL adapter no longer caches the connection factories. The code is on java.net and will be available in CAPS 5.2; there are no plans to put this in CAPS 5.1.3u1.

Frank

Posted by Frank Kieviet on August 23, 2007 at 02:35 PM PDT #

Re anonymous:

The NPE is due to specifying a null value for the connection URL on the MCF. The latest version of JMSJCA has an explicit check for null.

Frank

Posted by Frank Kieviet on August 23, 2007 at 02:37 PM PDT #

Frank,

The outbound works fine, if I specify the connection url in ra.xml [@ the top level].

However, this would restrict the number of weblogic jms servers I can connect to.

Also noticed that outbound connections do not recover from wl server restarts.

Do you have 5.2 in the cvs?

I appreciate your quick responses.

Regards

Posted by sk on August 25, 2007 at 06:19 PM PDT #

I saw JMSJCA.nocfcache in the cvs. :)

Posted by sk on August 25, 2007 at 06:29 PM PDT #

Hi Frank,

First, thanks a lot for your quick answer!!!

I am trying - but with no luck to connect to my jms wl (that runs on wl 9.2 server - evaluation edition), Also I am using the following configuration:
In the jms:address section:
connectionURL jndi://
connectionFactoryName javax.jms.QueueConnectionFactory
initialContextFactory weblogic.jndi.WLInitialContextFactory
providerURL t3://localhost:7001

And in the jms:operation:
destination StockTraderJmsServer/TraderBeanQueue (jndi names of jms server & jms queue)
destinationType Queue
transaction NoTransaction

Note (I am using netBeans 6 v10 as my IDE).

Thanks in advance for your great help!!!

Eliad Dahan.

Posted by Eliad Dahan on August 25, 2007 at 06:30 PM PDT #

Re SK:

You can specify the connection URL in the MCF. My previous comment was that you should not specify an empty value for the MCF's connection factory.

The latest code is indeed in CVS on java.net; the documentation is not up to date yet, e.g. there's indeed a flag to disable connection factory caching. This flag is set by default for WL connection factories.

Frank

P.S. Perhaps we should move this discussion to the mailing list on jmsjca.dev.java.net...

Posted by Frank Kieviet on August 26, 2007 at 02:42 AM PDT #

Re Eliad,

Instead of using jndi:// for the connection URL, can you use t3://localhost:7001? I haven't checked recently if there's a more convenient way to specify options in the JMS BC, but surely you can specify options as part of the URL.

Frank

p.s. perhaps we should move this discussion thread to the JBI forum (http://forum.java.sun.com/forum.jspa?forumID=512) or to the mailing list on jmsjca.dev.java.net.

Posted by Frank Kieviet on August 26, 2007 at 02:48 AM PDT #

Frank,

I moved my qn to http://forum.java.sun.com/thread.jspa?threadID=5209870.

Posted by sk on August 26, 2007 at 08:29 AM PDT #

edit url..

I moved my qn to http://forum.java.sun.com/thread.jspa?threadID=5209870 .

Posted by sk on August 26, 2007 at 08:30 AM PDT #

Frank,

I am trying to use JMSJCA in JBoss to be a consumer of a topic that is on a Weblogic JMS Provider. I am not having much luck finding documentation for deploying to JBoss to consume a Weblogic JMS provider. Is this possible through JMSJCA and is there any documentation on howto deploy this type of configuration? Any help would be appreciated.

Thanks,
Jeff

Posted by Jeff on August 06, 2008 at 08:43 AM PDT #

Re Jeff:

Yes, we have a few successful deployments on JBoss. We haven't documented it though. We should be doing that soon, but I can't promise when this will be done.

(And the JBoss documentation is also not very clear on how to deploy a global RA)

If you don't want to wait until we've implemented it, send me an email, I'll send you a deployment descriptor file for JBoss that should give you a good idea of how it's done.

Frank

Posted by Frank Kieviet on August 06, 2008 at 08:59 AM PDT #

Hi,

it would be nice to have some JMSJCA samples. I am trying to get JMSJCA to run with Websphere MQ and Geronimo and was stuck for several days in deployment descriptor hell.
Finally I got the Resource Adapter to run, but now on running a message driven bean that should be triggered by the resource adapter, there appear MQ Series errors.
I have a destination property in the bean descriptor, this should suffice, shouldn't it?

Thanks,
Juergen

WARNING: JMSJCA-E016: [serial-QueueReceiver(SampleEventHandler/MQMDB) @ [wmq://mqxs71:1414?QueueManager=XS71&TransportType=1&Channel=XS71.SVRCONN.TCP]]: message delivery initiation failed (attempt #6); will retry in 10 seconds. The error was: javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue
javax.jms.InvalidDestinationException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.MQQueueSession.getQueueOpenException(MQQueueSession.java:816)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:295)
at com.stc.jmsjca.core.RAJMSObjectFactory.createMessageConsumer(RAJMSObjectFactory.java:557)
at com.stc.jmsjca.core.SerialDelivery.start(SerialDelivery.java:110)
at com.stc.jmsjca.core.Activation.asyncStart(Activation.java:528)
at com.stc.jmsjca.core.Activation.access$000(Activation.java:79)
at com.stc.jmsjca.core.Activation$1.run(Activation.java:336)
at java.lang.Thread.run(Thread.java:801)

Posted by Juergen on September 15, 2008 at 10:42 PM PDT #

OK, I got it working (still some working samples would be nice). That's great because genericjmsra would not work for me, as it needs JNDI (does it?), but the RefFSContextFactory would not work in Geronimo.
JMSJCA works fine with Geronimo.

Anyway, I append the interesting parts of geronimo-ra.xml and openejb-jar.xml

<conn:resourceadapter-instance>
<conn:resourceadapter-name>MQRA</conn:resourceadapter-name>
<conn:config-property-setting name="connectionURL">wmq://MYHOST:1414?QueueManager=MYQM&amp;TransportType=JMSC_MQJMS_TP_CLIENT_MQ_TCPIP&amp;Channel=MY.SVRCONN</conn:config-property-setting>
<name:workmanager>
<name:gbean-link>DefaultWorkManager</name:gbean-link>
</name:workmanager>

<conn:adminobject>
<conn:adminobject-interface>
javax.jms.Queue
</conn:adminobject-interface>
<conn:adminobject-class>
com.stc.jmsjca.core.AdminQueue
</conn:adminobject-class>
<conn:adminobject-instance>
<conn:message-destination-name>
ivtQ
</conn:message-destination-name>
</conn:adminobject-instance>
</conn:adminobject>

<enterprise-beans>
<message-driven>
<ejb-name>MQMDB</ejb-name>
<resource-adapter>
<resource-link>MQRA</resource-link>
</resource-adapter>

<activation-config>

<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>MY.PHYSICAL.QUEUE.NAME</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>

</activation-config>

Posted by Juergen on September 20, 2008 at 08:55 PM PDT #

Post a Comment:
Comments are closed for this entry.
About

fkieviet

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today