tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Froidevaux (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-38) java:comp/TransactionManager
Date Wed, 19 Oct 2011 15:01:11 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130671#comment-13130671
] 

Werner Froidevaux commented on TOMEE-38:
----------------------------------------

When I list the bindings under 'java:comp/env' I get

Binding=comp
Binding=module

When I list the bindings under 'java:comp/env/comp' I get

Binding=TransactionManager: org.apache.naming.ResourceEnvRef
Binding=BeanManager: org.apache.naming.ResourceEnvRef
Binding=Validator: org.apache.naming.ResourceEnvRef
Binding=ValidatorFactory: org.apache.naming.ResourceEnvRef
Binding=TransactionSynchronizationRegistry: org.apache.naming.ResourceEnvRef
Binding=ComponentName: java.lang.String

When I try to lookup the TransactionManager with java:comp/env/comp/TransactionManager I get
the exception below. Something seems to be weird with the InitialContext:

lookup of name java:comp/env/comp/TransactionManager FAILED
javax.naming.NameNotFoundException: Name "Resource/comp/TransactionManager" not found.
        at org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:198)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:152)
        at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:124)
        at org.apache.tomee.common.AbstractObjectFactory.lookup(AbstractObjectFactory.java:80)
        at org.apache.tomee.common.AbstractObjectFactory.getObjectInstance(AbstractObjectFactory.java:48)
        at org.apache.tomee.common.ResourceFactory.getObjectInstance(ResourceFactory.java:49)
        at org.apache.naming.factory.ResourceEnvFactory.getObjectInstance(ResourceEnvFactory.java:114)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:826)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
        at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:99)


                
> java:comp/TransactionManager
> ----------------------------
>
>                 Key: TOMEE-38
>                 URL: https://issues.apache.org/jira/browse/TOMEE-38
>             Project: TomEE
>          Issue Type: Question
>    Affects Versions: 1.0.0-beta-2
>         Environment: Linux, JDK 6
>            Reporter: Werner Froidevaux
>
> With previous versions of Tomcat 5 + OpenEJB I was able to lookup the TransactionManager
as follows:
> Context context = new InitialContext();
> tm = context.lookup("java:comp/TransactionManager");
> A sample stack trace looks as follows:
> BasicException[1]
>     Class = org.apache.naming.NamingContext
>     Method = lookup
>     Line = 803
>     ExceptionClass = javax.naming.NameNotFoundException
>     ExceptionDomain = DefaultDomain
>     ExceptionCode = GENERIC
>     Description = Name TransactionManager is not bound in this Context
>     Timestamp = 2011-10-19T09:26:35.197Z
>     Paramaters:
> 	0:  explanation = Name TransactionManager is not bound in this Context
>     StackTrace:
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:145)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:814)
> 	at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
> 	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
> 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
> 	at org.openmdx.kernel.naming.ComponentEnvironment.lookup(ComponentEnvironment.java:100)
> 	at org.openmdx.base.rest.spi.ConnectionAdapter.getTransactionManager(ConnectionAdapter.java:179)
> 	...
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:217)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
> 	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
> 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> This does not seem to work any more with TomEE. Is there another way to do the lookup?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message