Announcement Announcement Module
Collapse
No announcement yet.
problems Injecting JTA transactor from Websphere 7.0 on the DMLC Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • problems Injecting JTA transactor from Websphere 7.0 on the DMLC

    Hi all ,

    have quite aproblem here.

    m using this applicationcontext.xml trying to get the transactionManager bean and trying to set it on the Message Listner Container . I have an ear deployed on the app server which just starts my application. so the application is outside the container. and my application spawns its own threads and does not use The J2EE threads of appserver. which i guess what the error below says. has anybody tried doing this:

    Any help is welcome

    Thanks in anticipation::


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:lang="http://www.springframework.org/schema/lang"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:task="http://www.springframework.org/schema/task"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schem...ontext-3.0.xsd
    http://www.springframework.org/schema/jdbc http://www.springframework.org/schem...g-jdbc-3.0.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schem...ng-jee-3.0.xsd
    http://www.springframework.org/schema/lang http://www.springframework.org/schem...g-lang-3.0.xsd
    http://www.springframework.org/schema/task http://www.springframework.org/schem...g-task-3.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schem...ing-tx-3.0.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager" lazy-init="true">
    <property name="userTransactionName">
    <value>UserTransaction</value>
    </property>
    <property name="transactionManagerName" value="java:/TransactionManager" />
    </bean>


    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="SIJ2EEDataSource"/>
    </bean>


    </beans>


    ERROR m Getting is this::
    ----------------------------

    [6/6/12 11:43:54:551 GMT+05:30] 0000001e javaURLContex E NMSV0310E: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. Exception stack trace:
    javax.naming.ConfigurationException [Root exception is javax.naming.NameNotFoundException: Name "comp/TransactionManager" not found in context "java:".]
    at com.ibm.ws.naming.java.javaURLContextImpl.throwCon figurationExceptionWithDefaultJavaNS(javaURLContex tImpl.java:420)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookup(j avaURLContextImpl.java:398)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:214)
    at com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:154)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at org.springframework.jndi.JndiTemplate$1.doInContex t(JndiTemplate.java:154)
    at org.springframework.jndi.JndiTemplate.execute(Jndi Template.java:87)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:152)
    at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:178)
    at org.springframework.transaction.jta.JtaTransaction Manager.findTransactionManager(JtaTransactionManag er.java:685)
    at org.springframework.transaction.jta.JtaTransaction Manager.initUserTransactionAndTransactionManager(J taTransactionManager.java:451)
    at org.springframework.transaction.jta.JtaTransaction Manager.afterPropertiesSet(JtaTransactionManager.j ava:412)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at com.tcs.mswitch.common.transaction.ApplicationCont extProvider.loadApplicationContext(ApplicationCont extProvider.java:12)
    at com.tcs.mswitch.main.Main.initializeDBConnectionMa nager(Main.java:212)
    at com.tcs.mswitch.main.Main.execute(Main.java:132)
    at com.tcs.mswitch.main.Main.run(Main.java:1111)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:452)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:314)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:896)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:735)
    Caused by: javax.naming.NameNotFoundException: Name "comp/TransactionManager" not found in context "java:".
    at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal( NameSpace.java:1178)
    at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpac e.java:1095)
    at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(Ur lContextImpl.java:1233)
    at com.ibm.ws.naming.java.javaURLContextImpl.lookup(j avaURLContextImpl.java:394)
    ... 33 more
Working...
X