users@genericjmsra.java.net

RE: Connecting to multiple resources

From: <kshitij.upadhyay_at_bt.com>
Date: Thu, 16 Feb 2006 14:38:16 -0000

Binod,


I keep on getting these errors in my server boot log

[#|2006-02-16T12:01:30.958+0000|WARNING|sun-appserver-ee8.1|javax.enterp
rise.resource.resourceadapter|_ThreadID=10;|RAR5005:Error in accessing
XA resource with JNDI name [pdsrecoverableerrpool] for recovery|#]

I get them for all the connector pools I have created.

Second thing I am facing:

I have an application (App1) which makes a remote call to another
application(App2). App1 is an MDB which picks up a message from a queue
q1, does something with it, makes a remote call to App2, gets the
response and write the output to q2.
The transactions are XA through out.

That's the normal behaviour of the app.

The application is coded in such a way that if app2 is switched off,(in
which case a remote exception will occur),app1 should write back to the
response queue q2 saying "Remote service is unreachable for the time"
and dump the message from input q1 to some other queue q3 to be routed
back to q1

But I am getting this exception :



[#|2006-02-16T12:38:12.501+0000|SEVERE|sun-appserver-ee8.1|javax.enterpr
ise.resource.resourceadapter|_ThreadID=12;|RAR5029:Unexpected exception
while registering component
javax.transaction.RollbackException
        at
com.sun.jts.jta.TransactionState.startAssociation(TransactionState.java:
230)
        at
com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:181)
        at
com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETran
saction.java:397)
        at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResour
ce(J2EETransactionManagerImpl.java:312)
        at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResourc
e(J2EETransactionManagerOpt.java:114)
        at
com.sun.enterprise.resource.ResourceManagerImpl.registerResource(Resourc
eManagerImpl.java:112)
        at
com.sun.enterprise.resource.ResourceManagerImpl.enlistResource(ResourceM
anagerImpl.java:71)
        at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.
java:176)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnectio
n(ConnectionManagerImpl.java:268)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(C
onnectionManagerImpl.java:193)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(C
onnectionManagerImpl.java:122)
        at
com.sun.genericra.outbound.ConnectionFactory.createConnection(Connection
Factory.java:69)
        at
com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(Conne
ctionFactory.java:101)
        ****Some app packages trace******
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivilege
d(EJBSecurityManager.java:950)
        at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
        at
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanCo
ntainer.java:956)
        at
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBea
nListenerImpl.java:42)
        at
com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.in
voke(MessageEndpointInvocationHandler.java:130)
        at $Proxy9.onMessage(Unknown Source)
        at
com.sun.genericra.inbound.DeliveryHelper.deliverMessage(DeliveryHelper.j
ava:183)
        at
com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:130
)
        at
com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:120
)
        at
com.sun.genericra.inbound.EndpointConsumer.consumeMessage(EndpointConsum
er.java:197)
        at
com.sun.genericra.inbound.MessageListener.onMessage(MessageListener.java
:56)
        at
com.sun.messaging.jmq.jmsclient.ServerSessionRunner.onMessage(ServerSess
ionRunner.java:139)
        at
com.sun.messaging.jmq.jmsclient.ServerSessionRunner.run(ServerSessionRun
ner.java:105)
        at
com.sun.messaging.jmq.jmsclient.SessionImpl.run(SessionImpl.java:2313)
        at com.sun.genericra.inbound.WorkImpl.run(WorkImpl.java:49)
        at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
        at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run
(ThreadPoolImpl.java:409)
|#]

[#|2006-02-16T12:38:12.525+0000|WARNING|sun-appserver-ee8.1|javax.enterp
rise.resource.resourceadapter|_ThreadID=12;|poolmgr.err_enlisting_res_in
_getconn|#]

[#|2006-02-16T12:38:12.525+0000|WARNING|sun-appserver-ee8.1|javax.enterp
rise.resource.resourceadapter|_ThreadID=12;|RAR5117 : Failed to
obtain/create connection. Reason :
javax.transaction.RollbackException|#]

[#|2006-02-16T12:38:12.526+0000|INFO|sun-appserver-ee8.1|com.sun.generic
jmsra|_ThreadID=12;|Error in allocating a connection. Cause:
javax.transaction.RollbackException
javax.resource.spi.ResourceAllocationException: Error in allocating a
connection. Cause: javax.transaction.RollbackException
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnectio
n(ConnectionManagerImpl.java:283)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(C
onnectionManagerImpl.java:193)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(C
onnectionManagerImpl.java:122)
        at
com.sun.genericra.outbound.ConnectionFactory.createConnection(Connection
Factory.java:69)
        at
com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(Conne
ctionFactory.java:101)
        *****Some app stack trace*****
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivilege
d(EJBSecurityManager.java:950)
        at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
        at
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanCo
ntainer.java:956)
        at
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBea
nListenerImpl.java:42)
        at
com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.in
voke(MessageEndpointInvocationHandler.java:130)
        at $Proxy9.onMessage(Unknown Source)
        at
com.sun.genericra.inbound.DeliveryHelper.deliverMessage(DeliveryHelper.j
ava:183)
        at
com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:130
)
        at
com.sun.genericra.inbound.DeliveryHelper.deliver(DeliveryHelper.java:120
)
        at
com.sun.genericra.inbound.EndpointConsumer.consumeMessage(EndpointConsum
er.java:197)
        at
com.sun.genericra.inbound.MessageListener.onMessage(MessageListener.java
:56)
        at
com.sun.messaging.jmq.jmsclient.ServerSessionRunner.onMessage(ServerSess
ionRunner.java:139)
        at
com.sun.messaging.jmq.jmsclient.ServerSessionRunner.run(ServerSessionRun
ner.java:105)
        at
com.sun.messaging.jmq.jmsclient.SessionImpl.run(SessionImpl.java:2313)
        at com.sun.genericra.inbound.WorkImpl.run(WorkImpl.java:49)
        at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
        at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run
(ThreadPoolImpl.java:409)
Caused by: com.sun.enterprise.resource.PoolingException:
javax.transaction.RollbackException
        at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.
java:186)
        at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnectio
n(ConnectionManagerImpl.java:268)
        ... 34 more
|#]


I used to get this exception when I was using JMSRA and I had not "XA
enabled" my QCFs. Once I made tham XA aware, everyting worked fine. But
in this case with genericRa, It doesn't worrk with XA trans as well.

Any ideas !!


Regards,
Kshitij.







-----Original Message-----
From: Binod.Pg_at_Sun.COM [mailto:Binod.Pg_at_Sun.COM]
Sent: Tuesday, February 14, 2006 5:01 PM
To: Upadhyay,K,Kshitij,JPGA8Y C
Cc: users_at_genericjmsra.dev.java.net
Subject: Re: Connecting to multiple resources

kshitij.upadhyay_at_bt.com wrote:

>Thanks for the reply Binod.
>
>I will rephrase my question.
>
>I have a QCF with JNDI name "cn=InQCF_1" bound to LDAP tree
>ldap://host/ou=inqcf1,dc=cell11,dc=dev,dc=uk
>I have another QCF with JNDI name "cn=InQCF_2" bound to different LDAP
>tree i.e ldap://host/ou=inqcf2,dc=cell12,dc=dev,dc=uk
>
>"create-resource-adapter-config" demands me to specify
>"java.naming.provider.url" which is the LDAP tree. In the case stated
>above I have two completely different LDAP hierarchies compeling me to
>make two RA configs.
>
>
It is not necessary to create two RA configs to achieve what you are
trying to do. All you need to do is to specify the
java.naming.provider.url in the connection pool configuration that is
used by second QCF.

i.e

asadmin create-connector-connection-pool ...... --property
JndiProperties=.....javax.naming.provider.url...

Does this sound okay?

thanks,
Binod.

>Is my understanding correct Binod.
>
>I hope I am able to convey what I mean to ask :-)
>
>
>Thanks,
>Kshitij.
>
>
>
>-----Original Message-----
>From: Binod.Pg_at_Sun.COM [mailto:Binod.Pg_at_Sun.COM]
>Sent: Tuesday, February 14, 2006 12:35 PM
>To: users_at_genericjmsra.dev.java.net; Upadhyay,K,Kshitij,JPGA8Y C
>Subject: Re: Connecting to multiple resources
>
>Hi Kshitij,
>
>
>
>>Hi,
>>
>>I have got a set of QCFs and Qs bound to an LDAP. To put it in a
>>simple
>>
>>
>
>
>
>>manner, I have a set of QCFs and Qs bound to LDAP tree hierarchy 'A'
>>and other set of QCFs and Qs bound to LDAP tree hierarchy 'B'.
>>In order to connect my application server to these trees, I think I
>>need to create the Generic RA configuration twice and deploy it twice
>>as well(With different names).
>>
>>Is there a better way of doing it which I don't know. I wish to avoid
>>repeated creation of genericRA configuration.
>>
>>
>>
>>
>You can specify the JNDI properties in the connection pool
>configuration, activation-config properties or both.
>
>Would that work?
>
>thanks,
>Binod.
>
>
>
>>-Kshitij.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe_at_genericjmsra.dev.java.net
>>For additional commands, e-mail: users-help_at_genericjmsra.dev.java.net
>>
>>
>>
>>
>>
>
>
>
>