ari-ban / test2

0 stars 0 forks source link

Cannot set ClientID in the ACC #46

Closed arinban closed 6 years ago

arinban 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]

arinban commented 6 years ago
arinban commented 6 years ago

@arinban Commented

arinban commented 6 years ago

@arinban Commented @arinban Commented

arinban commented 14 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented Reported by nigeldeakin

arinban commented 13 years ago

@arinban Commented @arinban Commented @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

arinban commented 14 years ago

@arinban Commented @arinban Commented @glassfishrobot Commented Was assigned to liang.x.zhao

arinban commented 7 years ago

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

arinban commented 6 years ago

Closing this as this issue is migrated to https://github.com/ari-ban/test1/issues/46