We should really code the client for the JNP implementation to detect the
presence of the same VM like we do the client for EJB... something we should
look into, it would mean creating a proxy with the JNDI interface and coding
an invoke() that doesn't serialize.

I remember scott saying something about the capacity to automate the
feature, I remember you already coded it but not in an automatic fashion.

marcf

|-----Original Message-----
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Bill
|Burke
|Sent: Monday, August 13, 2001 12:52 AM
|To: [EMAIL PROTECTED]
|Subject: RE: [JBoss-dev] new: entity instance per transaction
|interceptors and locks
|
|
|Take a look at EntityMultiInstanceInterceptor.invoke().  That's where it's
|being created.  I'm a bit confused why all this marshalling is happening
|between JNDI and the app server.  Aren't they within the same JVM?
|
|Thanks for looking,
|
|Bill
|
|> -----Original Message-----
|> From: [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]]On Behalf Of Scott
|> M Stark
|> Sent: Sunday, August 12, 2001 10:43 PM
|> To: [EMAIL PROTECTED]
|> Subject: Re: [JBoss-dev] new: entity instance per transaction
|> interceptors and locks
|>
|>
|> The profile shows two traces from
|> org.jboss.ejb.plugins.jrmp.interfaces.EntityHandleImpl.getEJBObject()
|> into JNDI. The first takes 1600 ms, the second 100 ms. The only
|> difference between the two calls
|> is the order in which NamingContext.checkRef() is called. How is the
|> entity being created?
|>
|> Bill Burke wrote:
|>
|> >I've made a first stab at implementing multiple instances.  That is an
|> >entity instance per transaction and no shared entity instances between
|> >transactions.  This code may be naive, but it seems to pass locktest,
|> >banktest, and the mbean(threads) test.  It will only work with
|> commit option
|> >B and C and will throw an exception if you try to run it with
|> commit option
|> >A.
|> >
|> >The weird thing is is that locktest runs much slower with multi instance
|> >than with regular when I thought it would run much faster.
|> Attached is the
|> >Optimizeit output if anyone is interested.  It seems to slow
|> down trying to
|> >getEJBHome in loadEntity?
|> >
|> >So, what are the benefits of this checkin?  I thought it would increase
|> >performance/throughput for commit options B and C since beans
|> are not locked
|> >into a transaction.
|> >
|> >To try it out:
|> >
|> >in standardjboss.xml,  replace
|> >
|> >EntityInstanceInterceptor with EntityMultiInstanceInterceptor
|> >EntitySynchronizationInterceptor with
|> >EntityMultiInstanceSynchronizationInterceptor
|> >
|> >your lock-policy should be MethodOnlyEJBLock.
|> >
|> >Look at jbosstest/src/resources/lock/META-INF/jboss.xml for
|configuration
|> >examples.  EntityBean_B_Multi
|> >
|> >
|> >Regards,
|> >
|> >Bill
|> >
|> >
|> >
|------------------------------------------------------------------------
|> >
|> >
|> >       Profiler output and hot spots for thread RMI TCP
|> >       Connection(271)-192.168.0.152 . application org.jboss.Main (CPU
|> >       profiler output - Sampler / Methods)
|> >
|> >
|> >         Backtrace
|> >
|> > <caller.gif>  Description of CPU usage for thread RMI TCP
|> > Connection(271)-192.168.0.152
|> >      <caller.gif>  100.0% - 5862 ms - java.lang.Thread.run()
|> >          <caller.gif>  100.0% - 5862 ms -
|> > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
|> >              <caller.gif>  100.0% - 5862 ms -
|> > sun.rmi.transport.tcp.TCPTransport.handleMessages()
|> >                  <caller.gif>  64.48% - 3780 ms -
|> > sun.rmi.transport.Transport.serviceCall()
|> >                      <caller.gif>  64.48% - 3780 ms -
|> > java.security.AccessController.doPrivileged()
|> >                          <caller.gif>  64.48% - 3780 ms -
|> > sun.rmi.transport.Transport$1.run()
|> >                              <caller.gif>  64.48% - 3780 ms -
|> > sun.rmi.server.UnicastServerRef.dispatch()
|> >                                  <caller.gif>  63.59% - 3728 ms -
|> > java.lang.reflect.Method.invoke()
|> >                                      <time.gif>  63.59% - 3728 ms -
|> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke()
|> >                                          <caller.gif>  61.87% - 3627
|> > ms - org.jboss.ejb.EntityContainer.invoke()
|> >                                              <caller.gif>  61.87% -
|> > 3627 ms - org.jboss.ejb.plugins.LogInterceptor.invoke()
|> >                                                  <caller.gif>  61.87%
|> > - 3627 ms - org.jboss.ejb.plugins.SecurityInterceptor.invoke()
|> >                                                      <caller.gif>
|> >  61.87% - 3627 ms - org.jboss.ejb.plugins.TxInterceptorCMT.invoke()
|> >                                                          <caller.gif>
|> >  61.87% - 3627 ms -
|> > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions()
|> >
|> > <caller.gif>  32.13% - 1884 ms - org.jboss.tm.TransactionImpl.commit()
|> >
|> > <caller.gif>  29.73% - 1743 ms -
|> > org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext()
|> >
|> > <caller.gif>  29.73% - 1743 ms -
|> > org.jboss.ejb.plugins.EntityLockInterceptor.invoke()
|> >
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invoke()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> >
|> org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementA
|> ndHandleResult()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOneEntity()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.EntityHandleImpl.getEJBObject()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.AbstractHandle.getEJBObject()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.AbstractHandle.lookupEJBHome()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms - javax.naming.InitialContext.lookup()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> org.jnp.interfaces.NamingContext.lookup()
|> >
|>
|> > <caller.gif>  28.02% - 1643 ms -
|> org.jnp.interfaces.NamingContext.lookup()
|> >
|>
|> > <caller.gif>  24.36% - 1428 ms -
|> org.jnp.server.NamingServer_Stub.lookup()
|> >
|>
|> > <caller.gif>  3.01% - 177 ms -
|> org.jnp.interfaces.NamingContext.checkRef()
|> >
|>
|> > <caller.gif>  0.64% - 38 ms - java.rmi.MarshalledObject.get()
|> >
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> >
|> org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementA
|> ndHandleResult()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleResult()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOneEntity()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getResultObject()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.EntityHandleImpl.getEJBObject()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.AbstractHandle.getEJBObject()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms -
|> > org.jboss.ejb.plugins.jrmp.interfaces.AbstractHandle.lookupEJBHome()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms - javax.naming.InitialContext.lookup()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms - org.jnp.interfaces.NamingContext.lookup()
|> >
|>
|> > <caller.gif>  1.7% - 100 ms - org.jnp.interfaces.NamingContext.lookup()
|> >
|>
|> > <caller.gif>  1.26% - 74 ms -
|> org.jnp.interfaces.NamingContext.checkRef()
|> >
|>
|> > <caller.gif>  0.32% - 19 ms - org.jnp.server.NamingServer_Stub.lookup()
|> >
|>
|> > <caller.gif>  0.11% - 7 ms - java.rmi.MarshalledObject.get()
|> >                                          <caller.gif>  1.6% - 94 ms -
|> > java.rmi.MarshalledObject.get()
|> >                                  <caller.gif>  0.73% - 43 ms -
|> > sun.rmi.server.UnicastRef.unmarshalValue()
|> >                                  <caller.gif>  0.15% - 9 ms -
|> > sun.rmi.server.UnicastRef.marshalValue()
|> >                  <caller.gif>  35.51% - 2082 ms -
|> > java.io.FilterInputStream.read()
|> >
|> >
|> >         Hot spots
|> >
|> > Name Percentage Time
|> > java.net.SocketInputStream.socketRead 65.91 3864 ms
|> > java.lang.StringBuffer.expandCapacity 28.26 1657 ms
|> > java.net.SocketOutputStream.socketWrite 3.1 182 ms
|> > java.io.ObjectInputStream.readUTF 0.85 50 ms
|> > java.io.ByteArrayInputStream.read 0.75 44 ms
|> > java.lang.StringBuffer.length 0.73 43 ms
|> > java.io.ObjectStreamClass.init 0.15 9 ms
|> > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke 0.11 7 ms
|> > java.io.ObjectInputStream.skipToEndOfBlockData 0.1 6 ms
|> >
|> > 20 clicks per test 20 untargeted tests
|> >
|> >
|------------------------------------------------------------------------
|> >
|> > <cid:[EMAIL PROTECTED]>
|> >
|> > optiprofile2.html
|> >
|> > Content-Type:
|> >
|> > text/html
|> > Content-Encoding:
|> >
|> > quoted-printable
|> >
|> >
|> >
|------------------------------------------------------------------------
|> > caller.gif
|> >
|> > Content-Type:
|> >
|> > image/gif
|> > Content-Encoding:
|> >
|> > base64
|> >
|> >
|>
|>
|
|
|
|_______________________________________________
|Jboss-development mailing list
|[EMAIL PROTECTED]
|http://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to