Announcement Announcement Module
Collapse
No announcement yet.
JMS + Hibernate in Distributed transaction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS + Hibernate in Distributed transaction

    Hi,
    I am using Spring 1.1.1 and hibernate 2.1.6 with Oracle 9i and JBOss 3.2.3. We need to use JtaTransactionManager as we need both jms and hiberanate calls in same method. I setup an xa capable datasource in JBoss and it is working fine and i am getting the connection factory from java:/JmsXA location as from Jboss docs i get to know that it is how it is setup. Now if i use only hibernate it works fine with xa datasourec and jta transaction manager without any problem (using oracle xa datasource and setting pad to true). But when i enable the jms usage (by using jmsTemplate and xa aware donnectioFactory) it gave error as it tries to commit locally and i get the exception TransactionInProgress. I dont know why it is happening all my resources are xa aware and coming from app server jndi.... It should be managed properly by JtaTransactiion manager. Why dont i ma getting distributed transaction and why not spring idetects that their is ongoing jta transaction and it should participate in it. Why?????. Why does it tries to commit it locally ......it is the duty of jta transaction manager to commit not of session. Is it some bug that JmsTemplate102 not detect ongoing xa transaction or is there any error in my configuration. Please help me asap

    My code is as follows
    Code:
     //   JmsTopicSender.java
    package com.sequelsys.server.scheduling.jms;
    
    import javax.jms.*;
    
    import org.springframework.jms.core.*;
    
    public class JmsTopicSender {
      private JmsTemplate102 jt;
      private ConnectionFactory connectionFactory;
      private Topic topic;
      public void simpleSend() {
        jt = new JmsTemplate102(connectionFactory, true);
        jt.send(topic, new MessageCreator() {
          public Message createMessage(Session session) throws JMSException {
            return session.createTextMessage("Record inserted succefully");
          }
        });
      }
    
      public void setConnectionFactory(ConnectionFactory cf) {
        connectionFactory = cf;
      }
    
      public void setTopic(Topic q) {
        topic = q;
      }
    }
    This class is used from foloowing class which first use Hibernate to save the domain object

    Code:
    package com.sequelsys.server.scheduling.service;
    
    import org.springframework.dao.*;
    import com.sequelsys.common.businessservice.scheduling.*;
    import com.sequelsys.common.model.scheduling.*;
    import com.sequelsys.server.scheduling.dao.*;
    import com.sequelsys.server.scheduling.jms.JmsTopicSender;
    
    public class HolidayScheduleService
        implements IHolidayScheduleService {
      private IHolidayScheduleDAO holidayScheduleDAO;
      private JmsTopicSender jmsTopicSender;
    
      public void setHolidayScheduleDAO(IHolidayScheduleDAO holidayScheduleDAO) {
        this.holidayScheduleDAO = holidayScheduleDAO;
      }
    
      public void setJmsTopicSender(JmsTopicSender jmsTopicSender) {
        this.jmsTopicSender = jmsTopicSender;
      }
    
      public IHolidayScheduleDAO getHolidayScheduleDAO() {
        return holidayScheduleDAO;
      }
    
      public JmsTopicSender getJmsTopicSender() {
        return jmsTopicSender;
      }
    
      public HolidayScheduleService() {
      }
    
      public HolidaysScheduleModel createHolidaySchedule(HolidayScheduleBusinessService holidayScheduleBusinessService) throws DataAccessException
      {
          HolidaysScheduleModel holidaysScheduleModel = this.holidayScheduleDAO.create(holidayScheduleBusinessService.getHolidaysScheduleModel());
          //HolidaysScheduleModel holidaysScheduleModel = new HolidaysScheduleModel();
          this.jmsTopicSender.simpleSend();
          return holidaysScheduleModel;
      }
    }
    The application context file is as follows
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    
    <!--
      - Application context definition for Petclinic on Hibernate.
    	-->
    <beans>
    	<!-- ========================= RESOURCE DEFINITIONS ========================= -->
    	<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
              <property name="basename">
                <value>messages</value>
              </property>
            </bean>
    
            <!-- JNDI DataSource for J2EE environments -->
    	<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName"><value>java&#58;/XAOracleDS</value></property>
    	</bean>
    
    	<!-- Hibernate SessionFactory -->
    	<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
    		<property name="dataSource"><ref local="dataSource"/></property>
    		<property name="mappingResources">
    			<value>com/sequelsys/common/model/scheduling/HolidaysSchedule.hbm.xml</value>
    		</property>
    		<property name="hibernateProperties">
    			<props>
    				 <prop key="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</prop>
                                     <prop key="hibernate.show_sql">true</prop>
                                     <!-- These lines are only required if we r using Jta transaction manager. They ensure jvm level caching and appropriate callbacks for jvm-->
                                     <!--
                                     <prop key="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.JBossTransactionManagerLookup</prop>
    	                         <prop key="hibernate.jta.UserTransaction">java&#58;comp/UserTransaction</prop> -->
    
    			</props>
    		</property>
    	</bean>
    
    	<!-- Transaction manager for a single Hibernate SessionFactory &#40;alternative to JTA&#41; -->
    	<!--
            <bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
    		<property name="sessionFactory"><ref local="sessionFactory"/></property>
    	</bean>
    	-->
            <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
    		<property name="transactionManagerName"><value>java&#58;/TransactionManager</value></property>
            </bean>
            <bean id="holidayScheduleDAO" class="com.sequelsys.server.scheduling.dao.HolidayScheduleDAO">
              <property name="sessionFactory"><ref local="sessionFactory"/></property>
            </bean>
    
               <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName"><value>jms/connectionFactory</value></property>
            <property name="resourceRef"><value>true</value></property>
        </bean>
    
        <bean id="destination" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName"><value>jms/topic</value></property>
            <property name="resourceRef"><value>true</value></property>
        </bean>
        <bean id="jmsTopicSender" class="com.sequelsys.server.scheduling.jms.JmsTopicSender">
    		<property name="connectionFactory"><ref local="connectionFactory"/></property>
                    <property name="topic"><ref local="destination"/></property>
        </bean>
    
    	<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
    
    	<!--
    		- A parent bean definition which is a base definition for transaction proxies.
    		- It is markes as abstract, since it is never supposed to be instantiated itself.
    		- We set shared transaction attributes here, following our naming patterns.
    		- The attributes can still be overridden in child bean definitions.
    		-->
    	<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"	abstract="true">
    		<property name="transactionManager"><ref bean="transactionManager"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="create*">PROPAGATION_REQUIRED</prop>
    			</props>
    		</property>
    	</bean>
    
    	<bean id="holidayScheduleService" parent="baseTransactionProxy">
    		<property name="target">
    			<bean class="com.sequelsys.server.scheduling.service.HolidayScheduleService">
                              <property name="holidayScheduleDAO"><ref local="holidayScheduleDAO"/></property>
                              <property name="jmsTopicSender"><ref local="jmsTopicSender"/></property>
                            </bean>
                   </property>
    	</bean>
    
            <bean id="schedulingFacade" class="com.sequelsys.server.common.service.SchedulingFacade">
    		<property name="messageSource"><ref local="messageSource"/></property>
                    <property name="holidayScheduleService"><ref local="holidayScheduleService"/></property>
    	</bean>
    
    </beans>
    and web.xml is
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http&#58;//java.sun.com/dtd/web-app_2_3.dtd'>
    
    <!--
      - $Id&#58; web.xml,v 1.1 2004/08/01 23&#58;03&#58;20 benalex Exp $
      -->
    
    <web-app>
    
        <display-name>SampleProject</display-name>
    
    	<description>
        	Provides an example for using Spring framework
        </description>
    
    	<!--
    	  - Location of the XML file that defines the root application context
    	  - Applied by ContextLoaderListener.
    	  -->
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
    	</context-param>
    
    	<!--
    	  - Loads the root application context of this web app at startup,
    	  - by default from "/WEB-INF/applicationContext.xml".
    	  - Use WebApplicationContextUtils.getWebApplicationContext&#40;servletContext&#41;
    	  - to access it anywhere in the web application, outside of the framework.
        -->
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    
    	<servlet>
    		<servlet-name>ws</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<load-on-startup>2</load-on-startup>
    	</servlet>
    
      <!--
    	- Dispatcher servlet mapping for HTTP web services.
    	- &#40;see ws-servlet.xml for the controllers&#41;.
       -->
    	<servlet-mapping>
    		<servlet-name>ws</servlet-name>
    		<url-pattern>/ws/*</url-pattern>
    	</servlet-mapping>
    <resource-env-ref>
        <resource-env-ref-name>jms/topic</resource-env-ref-name>
        <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
    </resource-env-ref>
    <resource-ref>
        <description>JMS Connection Factory</description>
        <res-ref-name>jms/connectionFactory</res-ref-name>
        <res-type>javax.jms.TopicConnectionFactory</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    
    
    </web-app>
    jboss.xml is as
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http&#58;//www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
    <jboss-web>
      <context-root>SampleProjectModule</context-root>
      <resource-env-ref>
        <resource-env-ref-name>jms/topic</resource-env-ref-name>
        <jndi-name>topic/EMRTopic</jndi-name>
    </resource-env-ref>
    <resource-ref>
        <res-ref-name>jms/connectionFactory</res-ref-name>
        <res-type>javax.jms.TopicConnectionFactory</res-type>
        <jndi-name>java&#58;/JmsXA</jndi-name>
        <res-auth>Container</res-auth>
    </resource-ref>
    </jboss-web>
    thouh not as relevant the DAO is as
    Code:
    package com.sequelsys.server.scheduling.dao;
    
    import org.springframework.dao.*;
    import org.springframework.orm.hibernate.support.*;
    import com.sequelsys.common.model.scheduling.*;
    
    public class HolidayScheduleDAO extends HibernateDaoSupport
        implements IHolidayScheduleDAO &#123;
      public HolidayScheduleDAO&#40;&#41; &#123;
      &#125;
    
      public HolidaysScheduleModel create&#40;HolidaysScheduleModel holidaysScheduleModel&#41; throws DataAccessException
      &#123;
        Long seqNo = &#40;Long&#41; this.getHibernateTemplate&#40;&#41;.save&#40;holidaysScheduleModel&#41;;
        holidaysScheduleModel.setSeqNum&#40;seqNo&#41;;
        return holidaysScheduleModel;
      &#125;
    &#125;
    I am getting the following exception
    Code:
    19&#58;07&#58;16,021 ERROR &#91;STDERR&#93; org.springframework.jms.TransactionInProgressException&#58; Should not be call from a XASession; nested exception is javax.jms.TransactionInProgressException&#58; Should not be call from a XASession; nested exception is javax.jms.TransactionInProgressException&#58; Should not be call from a XASession
    
    19&#58;07&#58;16,021 ERROR &#91;STDERR&#93; javax.jms.TransactionInProgressException&#58; Should not be call from a XASession
    
    19&#58;07&#58;16,021 ERROR &#91;STDERR&#93; 	at org.jboss.mq.SpySession.commit&#40;SpySession.java&#58;410&#41;
    
    19&#58;07&#58;16,021 ERROR &#91;STDERR&#93; 	at org.jboss.resource.adapter.jms.JmsSession.commit&#40;JmsSession.java&#58;166&#41;
    
    19&#58;07&#58;16,068 ERROR &#91;STDERR&#93; 	at org.springframework.jms.core.JmsTemplate.doSend&#40;JmsTemplate.java&#58;609&#41;
    
    19&#58;07&#58;16,068 ERROR &#91;STDERR&#93; 	at org.springframework.jms.core.JmsTemplate$2.doInJms&#40;JmsTemplate.java&#58;583&#41;
    
    19&#58;07&#58;16,068 ERROR &#91;STDERR&#93; 	at org.springframework.jms.core.JmsTemplate.execute&#40;JmsTemplate.java&#58;548&#41;
    
    19&#58;07&#58;16,068 ERROR &#91;STDERR&#93; 	at org.springframework.jms.core.JmsTemplate.execute&#40;JmsTemplate.java&#58;560&#41;
    
    19&#58;07&#58;16,068 ERROR &#91;STDERR&#93; 	at org.springframework.jms.core.JmsTemplate.send&#40;JmsTemplate.java&#58;581&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at com.sequelsys.server.scheduling.jms.JmsTopicSender.simpleSend&#40;JmsTopicSender.java&#58;13&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at com.sequelsys.server.scheduling.service.HolidayScheduleService.createHolidaySchedule&#40;HolidayScheduleService.java&#58;37&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection&#40;AopProxyUtils.java&#58;61&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint&#40;ReflectiveMethodInvocation.java&#58;149&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;116&#41;
    
    19&#58;07&#58;16,084 ERROR &#91;STDERR&#93; 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke&#40;TransactionInterceptor.java&#58;56&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;138&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;152&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at $Proxy30.createHolidaySchedule&#40;Unknown Source&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at com.sequelsys.server.common.service.SchedulingFacade.createHolidaySchedule&#40;SchedulingFacade.java&#58;37&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection&#40;AopProxyUtils.java&#58;61&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;142&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at $Proxy30.createHolidaySchedule&#40;Unknown Source&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
    
    19&#58;07&#58;16,099 ERROR &#91;STDERR&#93; 	at org.springframework.remoting.support.RemoteInvocation.invoke&#40;RemoteInvocation.java&#58;179&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke&#40;DefaultRemoteInvocationExecutor.java&#58;32&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke&#40;RemoteInvocationBasedExporter.java&#58;70&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult&#40;RemoteInvocationBasedExporter.java&#58;106&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest&#40;HttpInvokerServiceExporter.java&#58;63&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle&#40;SimpleControllerHandlerAdapter.java&#58;44&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.web.servlet.DispatcherServlet.doService&#40;DispatcherServlet.java&#58;522&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.springframework.web.servlet.FrameworkServlet.service&#40;FrameworkServlet.java&#58;321&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;853&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;247&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;193&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;256&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;643&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;480&#41;
    
    19&#58;07&#58;16,115 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;995&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;191&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;643&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke&#40;JBossSecurityMgrRealm.java&#58;220&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.valves.CertificatesValve.invoke&#40;CertificatesValve.java&#58;246&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke&#40;ContainerStatsValve.java&#58;76&#41;
    
    19&#58;07&#58;16,130 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;480&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;995&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardContext.invoke&#40;StandardContext.java&#58;2417&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;180&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;643&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.valves.ErrorDispatcherValve.invoke&#40;ErrorDispatcherValve.java&#58;171&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;172&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke&#40;SecurityAssociationValve.java&#58;65&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.valves.AccessLogValve.invoke&#40;AccessLogValve.java&#58;577&#41;
    
    19&#58;07&#58;16,146 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;641&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;480&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;995&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;174&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext&#40;StandardPipeline.java&#58;643&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;480&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;995&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.coyote.tomcat4.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;197&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;781&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;549&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt&#40;PoolTcpEndpoint.java&#58;605&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;677&#41;
    
    19&#58;07&#58;16,162 ERROR &#91;STDERR&#93; 	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
    I am quite sure that db part is working fine but jms somehow dont know the transaction. Please do it asap

  • #2
    Hi,
    Will anybody please reply me. I am in dire need of answer please....

    Comment


    • #3
      Hi,
      Nobody seems to interseted in the meantime i did my best to solve this but could not get success. Though one interseting thing happened when i moved from JBoss 3.2.3 to JBoss 3.2.6 that the exception did not come rather a warning that you are trying to call commit on local transaction. And in JBoss 4.0 there was no warning or exception it did work but most probably due to a new feature in JBoss 4.0 that is called "Last Resource Gamibit' in which a distributed transaction (involving n number of resources) can have one (exactly one) resource that is not XA aware (local) it even then can handle distributed transaction. What bothers me is that in their docs they said that getting jms connection factory from the location java:/JmsXA instead of java:/ConnectionFactory you are ensured that it is xa aware and capable of particpating in distributed transaction and it return you xa awre factory and it did work when i used Session Bean (EJB) but when i use POJO it is not working. I posted on JBoss forrum but they replied they can only ensure proper transaction hadling in EJB environment not is Spring. So dont getting how to solve this as we require to use JBoss 3.2.3 so version 4 is not of help. And i wonder why spring jms infrastructue not get that their is already a jta transaction running and it tires to commit why anybody anybody who has worked with JBoos jms and spring jta distributed transaction can help me please (i know thta spring delegates to App server transaction in case of JTa 0 but it is not working and i have posted almost all my code here so please help me i am in dire need of this excellent communities help. So please keep up with your excellent communites great habit of helping each other and eply . Please

      Comment


      • #4
        Hi,

        I just read your post now - been busy . I don't have an answer off the top of my head, are you sure that the JMS connection you are using is an XAConnection? I'll quickly ping Jurgen to see if he can notice anything obvious. You can of course avoid the issue if you don't use the distributed transactions, that QOS may be a bit too heavy for a simple notification service, but I'd like to see your example working....

        Cheers,
        Mark

        Comment


        • #5
          Hi Mark,
          Atlast i get response . Mark as i said in my post that according to JBOSS docs and forrum getting jms connection factory from java:/JmsXA means that it is XA aware. The db connection is doing well but no luck with jms, i posted some questions regarding this at jboss forrum but they seems to be very aggressive about spring and start terming it very bad framework and they damn care about it. I was shocked to see such a bad behavior from JBoss group it was pathetic of them so it seems the nice spring community can help me only. Urgently waiting for u r response.

          Comment

          Working...
          X