Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set ClientID in the ACC #46

Open
glassfishrobot opened this issue Sep 21, 2010 · 5 comments
Open

Cannot set ClientID in the ACC #46

glassfishrobot opened this issue Sep 21, 2010 · 5 comments

Comments

@glassfishrobot
Copy link

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
Copy link
Author

@glassfishrobot Commented
Reported by nigeldeakin

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Was assigned to liang.x.zhao

@glassfishrobot
Copy link
Author

@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
Copy link
Author

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

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant