Bugs item #516684, was opened at 2002-02-12 14:51
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=516684&group_id=22866

Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Scott M Stark (starksm)
Assigned to: Nobody/Anonymous (nobody)
Summary: CCE on redeployment of ear with sar/ejb

Initial Comment:
The perf-service.ear in the current main testsuite is 
not usable across redeployments. Steps to reproduce:

1. Deploy the perf-service.ear and then execute the 
jboss.test:service=PerfTest runTests(100) operation. 
Ignore the NPE shown under testTimings.

2. Simply touch the perf-service.ear and then execute 
the runTests(100) operation again on the 
jboss.test:service=PerfTest mbean, you will see:
+++ testTimingsCMT()
testTimingsCMT failed:
java.lang.ClassCastException: $Proxy19
        at 
org.jboss.test.perf.test.PerfTest.testTimingsCMT
(PerfTest.java:134)
        at org.jboss.test.perf.test.PerfTest.runTests
(PerfTest.java:66)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1628)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
        at com.sun.jdmk.comm.HtmlInvokePage.buildPage
(HtmlInvokePage.java:240)
        at 
com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest
(HtmlRequestHandler.java:325)
        at 
com.sun.jdmk.comm.HtmlRequestHandler.processRequest
(HtmlRequestHandler.java:152)
        at com.sun.jdmk.comm.HtmlRequestHandler.doRun
(HtmlRequestHandler.java:79)
        at com.sun.jdmk.comm.ClientHandler.run
(ClientHandler.java:84)
        at java.lang.Thread.run(Thread.java:484)


----------------------------------------------------------------------

>Comment By: David Jencks (d_jencks)
Date: 2002-02-14 08:46

Message:
Logged In: YES 
user_id=60525

I think this may have something to do with
ObjectInput/OutputStream and marshalling.

On each deploy, a new proxy is bound into jndi.  It is
stored as a MarshalledObject.  For instance, I see it being
bound as classes $Proxy23, $Proxy42 and $Proxy57 on
successive deployments.

When it is retrieved, the className is different: $Proxy27

Once it is retrieved, the retrieved class is always the
same: $Proxy27 in this example.

I haven't dug into ObjectInput/Output stream enough to see
what is going on.

However....since serialization is the root of all
application lethargy,  is it really necessary to bind the
proxy serialized?  For in vm calls, wouldn't it be
significantly faster to use an ObjectFactory/reference
scheme to return the actual object bound?

I don't know enough about how jndi/rmi works to know if this
would work with remote access.  Would it be possible to bind
using an ObjectFactory for local access and also a
pre-serialized MarshalledObject for remote access?

----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2002-02-13 22:33

Message:
Logged In: YES 
user_id=175228

The most recent PerfTest mbean output shows clearly what 
the problem is. On the initial deployment and execution of 
the runTests operation, both the ProbeHome interface as 
seen by the proxy bound in JNDI and the class reference in 
the PerfTest service mbean are seen to be loaded from the 
same perf.jar location:

ProbeHome Interfaces:
++interface org.jboss.test.perf.interfaces.ProbeHome
++++CodeSource: (file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/62.60.perf.jar )
++interface javax.ejb.Handle
++++CodeSource: (file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/6.jboss-
j2ee.jar )
PerfTest ProbHome CodeSource: 
(file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/62.60.perf.jar )

After a new deployment of the perf-service.ear, the proxy 
bound in JNDI continues to reference the ProxyHome class 
loaded from the original perf.jar, while the PerfTest 
service mbean ProbeHome now refers to the new perf.jar 
deployment:

ProbeHome Interfaces:
++interface org.jboss.test.perf.interfaces.ProbeHome
++++CodeSource: (file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/62.60.perf.jar )
++interface javax.ejb.Handle
++++CodeSource: (file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/6.jboss-
j2ee.jar )
PerfTest ProbHome CodeSource: 
(file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-3.0.0DR2/tmp/deploy/68.66.perf.jar )

The JNDI bindings of the proxies are not being updated 
correctly on redeployment.


----------------------------------------------------------------------

Comment By: Scott M Stark (starksm)
Date: 2002-02-13 10:17

Message:
Logged In: YES 
user_id=175228

That is correct.

----------------------------------------------------------------------

Comment By: David Jencks (d_jencks)
Date: 2002-02-13 09:12

Message:
Logged In: YES 
user_id=60525

I notice that you can redeploy many times successfully as
long as you don't run the test.  Once you have run the test,
after redeploying, the test fails.

deploy
redeploy
redeploy
run test (succeeds)
redeploy
run test (fails)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=516684&group_id=22866

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

Reply via email to