Hi,

This is in the changes I recently did to the
transaction manager.
When the TM service is started, it adds a
reference to a TPC importer in JNDI under the
name
  java:/TransactionPropagationContextImporter
The TPC Importer is used for translating the
serializable transaction propagation context
used on the wire to a Transaction instance
used internally in the VM.
First time a MethodInvocation needs it, it
does a JNDI lookup of this name, and saves
the reference in a class variable for
later use. Whenever the TM service is up,
this should be in JNDI. And TM service
*must* be up, otherwise a transaction
could not have been started, and a
TPC Factory would not have been found in
JNDI (TPC Factory produces the transaction
propagation context (TPC) that the TPC
Importer should import).

I committed these changes about 6 days ago,
and shortly after Hugo Pinto reported a
huge performance decrease (78ms/call) in
the non-optimized embedded Tomcat tests.

About two days ago I committed a fix that
should make performance for non-optimized
VM-local calls with transactional context
a little better, but I have not yet heard
if it helps performance on the non-optimized
embedded Tomcat tests.
I wonder if this last performance fix
completely broke this test. But how? This
last fix only involved moving a class from
jboss-jar to jboss-client.jar, and didn't
change MI or anything in JNDI.

This is very strange. Unless Rickard or
someone else jumps in and says that there
is something special about "java:" JNDI
lookups when running code coming from an
embedded Tomcat, I guess I have to learn
what this Tomcat thing is ;-), and how to
set it up.


Best Regards,

Ole Husgaard.


Scott M Stark wrote:
> 
> One of the tomcat ejb accessor tests includes a non-optimized stateless session bean
> configuration:
> 
>   <container-configuration>
>    <container-name>Non Optimized Stateless</container-name>
>    <call-logging>false</call-logging>
>    
><container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
>             <container-interceptors>
>                 <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
>                 <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
>                 <!-- CMT -->
>                 <interceptor 
>transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
>                 <interceptor transaction="Container" 
>metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
>                 <interceptor 
>transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
>                 <!-- BMT -->
>                 <interceptor 
>transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
>                 <interceptor 
>transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
>                 <interceptor transaction="Bean" 
>metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
>             </container-interceptors>
>    <instance-pool>org.jboss.ejb.plugins.StatelessSessionInstancePool</instance-pool>
>    <instance-cache></instance-cache>
>    <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
>             <persistence-manager></persistence-manager>
>    <container-invoker-conf>
>     <Optimized>False</Optimized>
>    </container-invoker-conf>
>    <container-pool-conf>
>     <MaximumSize>100</MaximumSize>
>     <MinimumSize>10</MinimumSize>
>    </container-pool-conf>
>   </container-configuration>
> 
> When the bean is accessed, the following exception occurs.
> 
> [NonOptimized] javax.naming.NameNotFoundException: 
>TransactionPropagationContextImporter not bound
> [NonOptimized]  at 
>sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
> [NonOptimized]  at 
>sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
> [NonOptimized]  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> [NonOptimized]  at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
> [NonOptimized]  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
> [NonOptimized]  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
> [NonOptimized]  at javax.naming.InitialContext.lookup(InitialContext.java:350)
> [NonOptimized]  at 
>org.jboss.ejb.MethodInvocation.getTransaction(MethodInvocation.java:164)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:203)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:137)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> [NonOptimized]  at 
>org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:384)
> [NonOptimized]  at 
>org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:175)
> [NonOptimized]  at $Proxy3.getMessage(Unknown Source)
> [NonOptimized]  at org.jboss.test.tomcat.servlet.HelloEJB.testBean(HelloEJB.java:66)
> [NonOptimized]  at org.jboss.test.tomcat.servlet.HelloEJB.doGet(HelloEJB.java:43)
> [NonOptimized]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> [NonOptimized]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [NonOptimized]  at 
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> [NonOptimized]  at org.apache.tomcat.core.Handler.service(Handler.java:286)
> [NonOptimized]  at 
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> [NonOptimized]  at 
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
> [NonOptimized]  at 
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> [NonOptimized]  at 
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
> [NonOptimized]  at 
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> [NonOptimized]  at 
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> [NonOptimized]  at java.lang.Thread.run(Thread.java:484)

Reply via email to