eclipse-ee4j / genericmessagingra

BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Cannot set ClientID in the ACC #46

Open glassfishrobot opened 14 years ago

glassfishrobot commented 14 years ago

If you use the ACC and set clientID on a connection, you get this error:

WARNING: ACC003: Application threw an exception. javax.jms.JMSException: Client ID cannot be set in non-ACC clients at com.sun.genericra.outbound.ConnectionHandle.setClientID(ConnectionHandle.java:139)

From checking the code, this appears to be because GenericJMSRA uses the system property genericra.inAppClientContainer to determine whether it is running in an ACC.

However if I use the ACC in both GF 2.1.2 and 3.0.1 this property is not set. So perfectly legal code doesn't work.

If the user is expected to set this property themself this should be documented.

In addition, instructions are needed on how to do this with Glassfish 2.1.1 and Glassfish 3.x (note that Glassfish 2.1.1 doesn't support the setting of system properties on the appclient command line so it may be necessary to set VMARGS).

Environment

Operating System: All Platform: All

Affected Versions

[2.1a]

glassfishrobot commented 6 years ago
glassfishrobot commented 14 years ago

@glassfishrobot Commented Reported by nigeldeakin

glassfishrobot commented 13 years ago

@glassfishrobot Commented steverendell said: Serious defect! This causes this error in my glassfish 3.1-b32 setup:

com.sun.messaging.jms.JMSException: MQRA:CA:createSession failed-Only one JMS Session allowed when managed connection is involved in a transaction at com.sun.messaging.jms.ra.ConnectionAdapter.createSession(ConnectionAdapter.java:338) at org.springframework.jms.connection.SingleConnectionFactory.createSession(SingleConnectionFactory.java:406) at org.springframework.jms.connection.CachingConnectionFactory.getSession(CachingConnectionFactory.java:225) at org.springframework.jms.connection.SingleConnectionFactory$SharedConnectionInvocationHandler.invoke(SingleConnectionFactory.java:534) at $Proxy140.createSession(Unknown Source) at org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:196) at org.springframework.jms.core.JmsTemplate.access$1(JmsTemplate.java:1) at org.springframework.jms.core.JmsTemplate$JmsTemplateResourceFactory.createSession(JmsTemplate.java:1035) at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:300) at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:453)

... when sending messages using a Spring JmsTemplate.

Because inACC is false, the ConnectionAdapter sets sessions_allowed=false

glassfishrobot commented 14 years ago

@glassfishrobot Commented Was assigned to liang.x.zhao

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GENERICJMSRA-46