File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Error : Spring + Jms Application deployed on Oc4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Error : Spring + Jms Application deployed on Oc4j " Watch "Error : Spring + Jms Application deployed on Oc4j " New topic
Author

Error : Spring + Jms Application deployed on Oc4j

sridhanya ganapathy
Greenhorn

Joined: Jun 03, 2006
Posts: 14
Hi All,
My Application has the below Jms setup in the oc4j Server.
Queue
=====
destination ==> jms/interactionLoggingQueue
connectionFactory ==> jms/QCF_interactionLogging

To work on the messages posted to the queue i used "org.springframework.jms.listener.DefaultMessageListenerContainer".

Bean config info
================

<bean id="CommonConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="JndiTemplate"></property>
<property name="jndiName">
<value>jms/QCF_interactionLogging</value>
</property>
</bean>

<bean id="queue1"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="JndiTemplate"></property>
<property name="jndiName">
<value>jms/interactionLoggingQueue</value>
</property>
</bean>

<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="concurrentConsumers" value="5" />
<property name="connectionFactory" ref="CommonConnectionFactory" />
<property name="destination" ref="queue1" />
<property name="messageListener" ref="messageListener" />
</bean>

<bean id="messageListener" class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<constructor-arg>
<bean class="message.listen.SampleMDP" />
</constructor-arg>
<property name="defaultListenerMethod"
value="receive" />
<property name="messageConverter">
<bean class="org.springframework.jms.support.converter.SimpleMessageConverter">
</bean>
</property>
</bean>

When i deploy the application in oc4j i get the below error.Is there i missing any configuration in application or oc4j or else.Please guide me how to proceed further.

Error
=====

2007-05-21 15:04:06,901 ERROR [org.springframework.jms.listener.DefaultMessageListenerContainer] - Setup of JMS message listener invoker failed - trying to recover
javax.jms.JMSException: Connection[Oc4jJMS.Connection.pc-0031.-45e74155:112adfa58e9:-8000.1]: cannot create new session inside J2EE container when Session[Oc4jJMS.Session.pc-0031.-45e74155:112adfa58e9:-8000.2,false,AUTO_ACKNOWLEDGE] is currently active.
at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1072)
at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1152)
at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1123)
at com.evermind.server.jms.EvermindConnection.assertSession(EvermindConnection.java:511)
at com.evermind.server.jms.EvermindConnection.createSession(EvermindConnection.java:222)
at org.springframework.jms.listener.AbstractMessageListenerContainer.createSession(AbstractMessageListenerContainer.java:1002)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.initResourcesIfNecessary(DefaultMessageListenerContainer.java:915)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:903)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:857)
at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203)
at java.lang.Thread.run(Thread.java:595)

Thanks
Sridhanya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error : Spring + Jms Application deployed on Oc4j
 
Similar Threads
can't create connection to JBoss MQ using Spring JMS
MDP consuming from remote JBossMQ Queue
Spring JMS with IBM Websphere MQ5.3.1
Spring JMS Issue : javax.jms.IllegalStateException: Session closed
DefaultMessageListenerContainer not getting started