can any pls let me know what is the problem here
here is the exception 

[RequestBean] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested exception
is:
        java.lang.NullPointerException; nested exception is:
        java.rmi.ServerException: Load failed; nested exception is:
        java.lang.NullPointerException
[RequestBean] java.rmi.ServerException: Load failed; nested exception is:
[RequestBean]   java.lang.NullPointerException
[RequestBean] java.lang.NullPointerException
[RequestBean]   at java.lang.reflect.Field.set(Native Method)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setCMPFieldValue(
JDBCCommand.java:655)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.loadOne
Entity(JDBCLoadEntityCommand.java:217)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.handleR
esult(JDBCLoadEntityCommand.java:176)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeState
mentAndHandleResult(JDBCQueryCommand.java:59)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCC
ommand.java:160)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute
(JDBCLoadEntityCommand.java:147)
[RequestBean]   at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(
JAWSPersistenceManager.java:156)
[RequestBean]   at
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPer
sistenceManager.java:362)
[RequestBean]   at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
(EntitySynchronizationInterceptor.java:286)
[RequestBean]   at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(Entity
InstanceInterceptor.java:208)
[RequestBean]   at
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLock
Interceptor.java:136)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
orCMT.java:133)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
InterceptorCMT.java:307)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
T.java:99)
[RequestBean]   at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
rceptor.java:128)
[RequestBean]   at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
va:195)
[RequestBean]   at
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:427
)
[RequestBean]   at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
(JRMPContainerInvoker.java:483)
[RequestBean]   at
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeCont
ainer(GenericProxy.java:335)
[RequestBean]   at
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(Enti
tyProxy.java:133)
[RequestBean]   at $Proxy38.getName(Unknown Source)
[RequestBean]   at
com.zeborg.labor.ejb.session.requestmanager.RequestManagerEB.
getRequestListData(RequestManagerEB.java:64)
[RequestBean]   at java.lang.reflect.Method.invoke(Native Method)
[RequestBean]   at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.
invoke(StatelessSessionContainer.java:543)
[RequestBean]   at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
oke(StatelessSessionInstanceInterceptor.java:87)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
orCMT.java:133)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
InterceptorCMT.java:247)
[RequestBean]   at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
T.java:99)
[RequestBean]   at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
rceptor.java:128)
[RequestBean]   at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
va:195)
[RequestBean]   at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessi
onContainer.java:286)
[RequestBean]   at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
(JRMPContainerInvoker.java:393)
[RequestBean]   at java.lang.reflect.Method.invoke(Native Method)
[RequestBean]   at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
a:241)
[RequestBean]   at sun.rmi.transport.Transport$1.run(Transport.java:142)
[RequestBean]   at java.security.AccessController.doPrivileged(Native
Method)
[RequestBean]   at
sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[RequestBean]   at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
t.java:443)
[RequestBean]   at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
ransport.java:643)
[RequestBean]   at java.lang.Thread.run(Thread.java:484)
[RequestManagerEB] javax.transaction.TransactionRolledbackException: Load
failed
; nested exception is:
        java.lang.NullPointerException; nested exception is:
        java.rmi.ServerException: Load failed; nested exception is:
        java.lang.NullPointerException
[Default] the collection 1 is [ZLabor/ContractTagBean:1]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 9:33 PM
To: [EMAIL PROTECTED]
Subject: Jboss-development digest, Vol 1 #1833 - 4 msgs


Send Jboss-development mailing list submissions to
        [EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/jboss-development
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Jboss-development digest..."


Today's Topics:

   1. AW: [JBoss-dev] JBoss and SOAP (Jung , Dr. Christoph)
   2. Re: Re: Shutdown behaves while using 8082 service (Peter Fagerlund)
   3. CVS update: jboss/src/main/org/jboss/system Shutdown.java (Peter
Fagerlund)
   4. Re: Bug in cache (Peter Levart)

--__--__--

Message: 1
From: "Jung , Dr. Christoph" <[EMAIL PROTECTED]>
To: "Jboss-Development (E-Mail)" <[EMAIL PROTECTED]>
Subject: AW: [JBoss-dev] JBoss and SOAP
Date: Fri, 19 Oct 2001 15:58:20 +0200

ZOAP is a deprecated project.=20

JBoss.net is the successor that will envisage to ease the  =
implementation of
J2ee-based web services=20
and the integration of external web-services into your J2ee logic. =
Jboss.net
builds on the Apache Axis framework.=20
In contrast to using Apache-Soap and Axis directly in tomcat or jetty,
JBoss.net gives you a tighter integration into the JBoss hot-deploy
environment.

It is currently pre-alpha with some preliminary documentation and a =
small
testsuite (ordinary web-services, stateless EJB web service w/o =
security,
JMX-based web service). JBoss.net is strongly tied to the RH release =
plan. =20

CGJ

-----Urspr=FCngliche Nachricht-----
Von: jp Morgan [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 19. Oktober 2001 15:14
An: [EMAIL PROTECTED]
Betreff: [JBoss-dev] JBoss and SOAP


How does one turns jboss ejb into web services? Is
there is soap programming layer for jboss? ZOAP or
jboss.net any advice on these or other tools to use
with jboss for implementing web services

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

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


--__--__--

Message: 2
Date: Fri, 19 Oct 2001 17:26:25 +0200
Subject: Re: [JBoss-dev] Re: Shutdown behaves while using 8082 service
From: Peter Fagerlund <[EMAIL PROTECTED]>
To: JBoss Dev <[EMAIL PROTECTED]>

The shutdown hook started in the org.jboss.system.Shutdown(MBean) works
correct while invoking it throught ctrl-c ... invoking throught :8082 either
with a browser or jboss_init_redhat.sh using org.jboss.shutdown is failing
since the call is unreferencing the caller -chain while
stopping(/destroying/unloading) ...

So I do not stop/destroy/unload the MBeans needed for 8082 in a debug
shutdown class I am about to commit for Your comments/solutions ...

Right now i have a handle to all services from
ServiceController.getDeployed() in
org.jboss.system.Shutdown.shutdownServices() and are doing some logic there
... my findings *drive* towards separating the shutdown in *phases* and then
perhaps delegate from from shutdownServices() to :

Core                    (GPA)
Core Services           (MBeans)
Deployments             (AutoDeployer)

I am not shure if the shutdown hook should be installed as a MBean ? ...
maybe as a POJO in the main class ? ... eitherway We need to Map the
(un)dependecy logic ? ... somehow ...

The first undeployed should be the last -> first deployment (AutoDeployer)
Then undeploy depending on dependencies (MBeans)
The last undeployed should be the log
Then System.exit(0) will take care of GPA

There seem to be a fragmentation in how We behave in our MBeans with
stop/destroy/unload and naming semantics...
MQ seems to do some clean up in destroy and referencing Mbeans that then has
already stopped/destroyed ... and so on ... I need to look at this some more
... together with You all ! ...
 
our jboss-3.0.0alpha default 43 MBeans and the naming ! ...
as returned from ServiceController.getDeployed()
********************************************************************
JCA:name=JmsXA,service=ConnectionFactoryLoader
:name=StdJMSPool,service=ServerSessionPoolMBean
:name=JBossMQProvider,service=JMSProviderLoader
JBossMQ:name=DLQ,service=Queue
JBossMQ:name=ex,service=Queue
JBossMQ:name=F,service=Queue
JBossMQ:name=E,service=Queue
JBossMQ:name=D,service=Queue
JBossMQ:name=C,service=Queue
JBossMQ:name=B,service=Queue
JBossMQ:name=A,service=Queue
JBossMQ:name=controlQueue,service=Queue
JBossMQ:name=testQueue,service=Queue
JBossMQ:name=bob,service=Topic
JBossMQ:name=example,service=Topic
JBossMQ:name=testTopic,service=Topic
JBossMQ:service=InvocationLayer,type=UIL
JBossMQ:service=InvocationLayer,type=OIL
JBossMQ:service=InvocationLayer,type=RMI
JBossMQ:service=InvocationLayer,type=JVM
JBossMQ:service=PersistenceManager
JBossMQ:service=StateManager
JBossMQ:service=Server
JBOSS-SYSTEM:name=DefaultDS,service=ConnectionFactoryLoader
JBOSS-SYSTEM:service=Hypersonic
JCA:service=RARDeployer
J2EE:service=J2eeDeployer
JBOSS-SYSTEM:service=ContainerFactory
JBOSS-SYSTEM:service=Mail
JBOSS-SYSTEM:service=Jetty
JCA:name=MinervaXACMFactory,service=ConnectionManagerFactoryLoader
JCA:name=MinervaSharedLocalCMFactory,service=ConnectionManagerFactoryLoader
JCA:name=MinervaNoTransCMFactory,service=ConnectionManagerFactoryLoader
JMX:name=Connector,type=RMI
Adaptor:name=html
JBOSS-SYSTEM:service=AutoDeployer
JBOSS-SYSTEM:service=ClientUserTransaction
JBOSS-SYSTEM:service=TransactionManager
Security:name=JaasSecurityManager
Security:name=SecurityConfig
JBOSS-SYSTEM:service=JNDIView
JBOSS-SYSTEM:service=Naming
JBOSS-SYSTEM:service=Webserver
********************************************************************

If You now anything about the above MBeans can You check the relevant
undeploy messages and dependencys ... when running the new ***debug***
org.jboss.system.Shutdown()

I am looking at ServiceController service name above
:name=StdJMSPool,service=ServerSessionPoolMBean
and the MBean Server service name (below) has it as
JBOSS-SYSTEM:name=StdJMSPool,service=ServerSessionPoolMBean

++

???

our jboss-3.0.0alpha default 95 MBeans and the naming ! ...
as returned from MBeanServer.queryNames(null, null)
********************************************************************
 ZClassLoaders:id=1834657505
 ZClassLoaders:id=1024097707
 JBOSS-SYSTEM:service=AutoDeployer
 ZClassLoaders:id=-217826988
 ZClassLoaders:id=-1763317780
 ZClassLoaders:id=757739105
 JBOSS-SYSTEM:service=TransactionManager
 Security:name=JaasSecurityManager
 ZClassLoaders:id=-364644404
 ZClassLoaders:id=-28077840
 ZClassLoaders:id=1444653299
 JBossMQ:name=DLQ,service=Queue
 JBossMQ:name=bob,service=Topic
 ZClassLoaders:id=-884717210
 JBossMQ:name=controlQueue,service=Queue
 J2EE:service=J2eeDeployer
 ZClassLoaders:id=272735180
 ZClassLoaders:id=-1535629649
 ZClassLoaders:id=1150410981
 ZClassLoaders:id=-1848367062
 ZClassLoaders:id=-397132413
 ZClassLoaders:id=1117837941
 JBOSS-SYSTEM:spine=ServiceController
 JCA:name=MinervaNoTransCMFactory,service=ConnectionManagerFactoryLoader
 JBOSS-SYSTEM:service=Jetty
 JBossMQ:service=PersistenceManager
 JBOSS-SYSTEM:service=JNDIView
 JBossMQ:service=InvocationLayer,type=UIL
 JBossMQ:name=B,service=Queue
 ZClassLoaders:id=749384218
 JBOSS-SYSTEM:service=ContainerFactory
 JBossMQ:service=StateManager
 JCA:name=JmsXA,service=ConnectionFactoryLoader
 JBOSS-SYSTEM:service=Webserver
 ZClassLoaders:id=767188900
 JBossMQ:name=D,service=Queue
 JBOSS-SYSTEM:spine=ServiceLibraries
 Jetty:Jetty=0
 ZClassLoaders:id=-1676017461
 ZClassLoaders:id=757744871
 JBossMQ:name=testQueue,service=Queue
 ZClassLoaders:id=-1435351005
 JBossMQ:name=example,service=Topic
 ZClassLoaders:id=-1918247651
 ZClassLoaders:id=-1173593481
 JBOSS-SYSTEM:service=Info
 JBOSS-SYSTEM:name=DefaultDS,service=ConnectionFactoryLoader
 JMImplementation:type=MBeanServerDelegate
 JBossMQ:name=F,service=Queue
 JBOSS-SYSTEM:service=Hypersonic
 JBOSS-SYSTEM:type=Shutdown
 JBOSS-SYSTEM:service=Mail
 JBossMQ:service=InvocationLayer,type=OIL
 JBossMQ:service=Server
 ZClassLoaders:id=-255765971
 Adaptor:name=html
 JBossMQ:service=InvocationLayer,type=JVM
 JMX:name=Connector,type=RMI
 JCA:name=MinervaXACMFactory,service=ConnectionManagerFactoryLoader
 ZClassLoaders:id=-1733376771
 JBOSS-SYSTEM:service=ClientUserTransaction
 ZClassLoaders:id=-858822424
 ZClassLoaders:id=1251785838
 ZClassLoaders:id=-647286175
 JBOSS-SYSTEM:spine=ServiceClassLoader
 ZClassLoaders:id=757742109
 ZClassLoaders:id=-1802790593
 ZClassLoaders:id=-1704732450
 ZClassLoaders:id=355443262
 ZClassLoaders:id=-839633995
 JCA:service=RARDeployer
 JBOSS-SYSTEM:service=ServiceDeployer
 ZClassLoaders:id=894298020
 ZClassLoaders:id=757734704
 JBossMQ:service=InvocationLayer,type=RMI
 ZClassLoaders:id=332652630
 ZClassLoaders:id=643879817
 JBossMQ:name=ex,service=Queue
 JBOSS-SYSTEM:service=Naming
 ZClassLoaders:id=618377029
 ZClassLoaders:id=1008929138
 JBossMQ:name=A,service=Queue
 JCA:name=MinervaSharedLocalCMFactory,service=ConnectionManagerFactoryLoader
 ZClassLoaders:id=-164344006
 JBossMQ:name=E,service=Queue
 ZClassLoaders:id=-1824674805
 ZClassLoaders:id=-1084842115
 JBossMQ:name=testTopic,service=Topic
 Security:name=SecurityConfig
 JBOSS-SYSTEM:name=JBossMQProvider,service=JMSProviderLoader
 JBOSS-SYSTEM:name=StdJMSPool,service=ServerSessionPoolMBean
 JBossMQ:name=C,service=Queue
 ZClassLoaders:id=1442845140
 JBOSS-SYSTEM:service=Logging,type=Log4J
 ZClassLoaders:id=1335445824
********************************************************************

names should return the same ? ...
(un)dependencys ? ...
where should the logic go ? ...

Its is clean now --lets make it squeeeeeeeekyyyyyy so ....

/peter_f



--__--__--

Message: 3
To: [EMAIL PROTECTED]
From: Peter Fagerlund <[EMAIL PROTECTED]>
Date: Fri, 19 Oct 2001 08:36:15 -0700
Subject: [JBoss-dev] CVS update: jboss/src/main/org/jboss/system
Shutdown.java

  User: peter_f 
  Date: 01/10/19 08:36:15

  Modified:    src/main/org/jboss/system Shutdown.java
  Log:
  Added debug messages trying to understand the (un)dependencys
  
  Revision  Changes    Path
  1.4       +119 -27   jboss/src/main/org/jboss/system/Shutdown.java
  
  Index: Shutdown.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/Shutdown.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Shutdown.java     2001/10/16 00:45:28     1.3
  +++ Shutdown.java     2001/10/19 15:36:15     1.4
  @@ -7,9 +7,11 @@
   package org.jboss.system;
   
   import java.util.List;
  -import java.util.ArrayList;
  +import java.util.Arrays;
   import java.util.Iterator;
   import java.util.Set;
  +import java.util.List;
  +import java.util.ListIterator;
   
   import javax.management.ObjectName;
   import javax.management.MBeanServer;
  @@ -25,7 +27,7 @@
    *      
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rickard Öberg</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason Dillon</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class Shutdown
      implements MBeanRegistration, ShutdownMBean
  @@ -39,7 +41,7 @@
        
      /** The MBean server we are attached to. */
      private MBeanServer server;
  -     
  +
      // Public  -------------------------------------------------------
        
      /**
  @@ -126,35 +128,125 @@
      {
         try
         {
  -         // Stop services
  -         server.invoke(new
ObjectName("JBOSS-SYSTEM:spine=ServiceController"),
  -                       "stop", new Object[0] , new String[0]);
  -             
  -         // Destroy services
  -         server.invoke(new
ObjectName("JBOSS-SYSTEM:spine=ServiceController"),
  -                       "destroy", new Object[0] , new String[0]);
  -
  -         // unload all MBeans except one called
JMImplementation:type=MBeanServerDelegate
  -         ObjectName delegateName = null;
  -         Set allMBeans = server.queryNames(null,null);
  -         for(Iterator i = allMBeans.iterator();i.hasNext();) {
  -                     ObjectName name = (ObjectName) i.next();
  -
if(name.getCanonicalName().equals("JMImplementation:type=MBeanServerDelegate
") == false )   {
  -                             log.info("Unloading MBean : " +
name.getCanonicalName());
  -             server.unregisterMBean(name);
  -            } else {
  -                             delegateName = name;
  +        // get the deployed objects from ServiceController
  +             ObjectName[] deployed = (ObjectName[]) server.invoke(
  +             new ObjectName("JBOSS-SYSTEM:spine=ServiceController"),
  +                "getDeployed", new Object[0] , new String[0] );
  +
  +        List servicesCopy = Arrays.asList(deployed);
  +             ListIterator enum = servicesCopy.listIterator();
  +        ListIterator beanEnum = servicesCopy.listIterator();
  +        ObjectName name = null;
  +        String[] sig = { "javax.management.ObjectName" };
  +
  +        // filo ( first in last out )
  +/*
  +        while (enum.hasNext())
  +             {
  +                     enum.next();
  +
  +            // filter out some services here ?
  +
  +             }
  +
  +*/
  +             // Stop / Destroy / Unload all MBeans from ServiceController
  +
  +        // Stop
  +        while (enum.hasNext())
  +             //while (enum.hasPrevious())
  +             {
  +            name = (ObjectName)enum.next();
  +            //name = (ObjectName)enum.previous();
  +             Object[] args = { name };
  +                     log.info("**********************Looking at MBean : "
+ name.getCanonicalName());
  +             // Stop services
  +            if(!
name.getCanonicalName().equals("JMX:name=Connector,type=RMI")
  +            && ! name.getCanonicalName().equals("Adaptor:name=html")
  +            && !
name.getCanonicalName().equals("JBOSS-SYSTEM:service=Naming")
  +              )
  +            {
  +               log.info("**********************Stopping   MBean : " +
name.getCanonicalName());
  +                server.invoke(new
ObjectName("JBOSS-SYSTEM:spine=ServiceController"), "stop", args , sig);
  +
  +               // Destroy services
  +
  +               // Unload services
  +
               }
  +             }
  +
  +        // Destroy
  +        while (enum.hasPrevious())
  +        //while (enum.hasNext())
  +             {
  +            name = (ObjectName)enum.previous();
  +                     //name = (ObjectName)enum.next();
  +             Object[] args = { name };
  +            log.info("**********************Looking at MBean : " +
name.getCanonicalName());
  +                     // Destroy services
  +            if(!
name.getCanonicalName().equals("JMX:name=Connector,type=RMI")
  +            && ! name.getCanonicalName().equals("Adaptor:name=html")
  +            && !
name.getCanonicalName().equals("JBOSS-SYSTEM:service=Naming")
  +              )
  +            {
  +             log.info("**********************Destroying MBean : " +
name.getCanonicalName());
  +             server.invoke(new
ObjectName("JBOSS-SYSTEM:spine=ServiceController"), "destroy", args , sig);
  +                     }
  +
  +             }
  +
  +
  +        // Unload
  +
  +        /*   There are inconsistence in names returned from
ServiceController
  +        *    [Shutdown,INFO] Undeploying MBean :
:name=JBossMQProvider,service=JMSProviderLoader
  +        *    that prevents Us from using Service Controller for unload
right now !!! ...
  +        */
  +        /*
  +        // Unload MBeans from ServiceController
  +        while (enum.hasNext())
  +             {
  +             name = (ObjectName)enum.next();
  +             if( !
name.getCanonicalName().equals("JMImplementation:type=MBeanServerDelegate
  +             {
  +             Object[] args = { name };
  +                log.info("Undeploying MBean : " +
name.getCanonicalName());
  +                 // Unload services
  +                     server.invoke(new
ObjectName("JBOSS-SYSTEM:spine=ServiceController"),
  +                             "undeploy", args , sig);
  +             }
  +         }
  +             */
  +
  +             // Unload all MBeans from MBean Server
  +        Set allMBeans = server.queryNames(null,null);
  +        Iterator i = allMBeans.iterator();
  +             // write the Mbeans Out
  +        /*
  +         while(i.hasNext())  {
  +                     name = (ObjectName) i.next();
  +             log.info("**********************Looking at MBean : " +
name.getCanonicalName());
            }
  -              // this will throw an RuntimeOperationsException
  -         //log.info("Unloading MBean : " +
delegateName.getCanonicalName());
  -         //server.unregisterMBean(delegateName);
  +         */
  +        ///*
  +         while(i.hasNext())  {
  +                     name = (ObjectName) i.next();
  +             log.info("**********************Looking at MBean : " +
name.getCanonicalName());
  +                     if(!
name.getCanonicalName().equals("JMImplementation:type=MBeanServerDelegate")
  +            && !
name.getCanonicalName().equals("JMX:name=Connector,type=RMI")
  +            && ! name.getCanonicalName().equals("Adaptor:name=html")
  +            && !
name.getCanonicalName().equals("JBOSS-SYSTEM:service=Naming")
  +              )
  +            {
  +                             log.info("**********************Unloading
MBean : " + name.getCanonicalName());
  +                             server.unregisterMBean(name);
  +              }
  +        }
  +        //*/
         }
         catch (RuntimeMBeanException rmbe) {
            rmbe.getTargetException().printStackTrace();
  -      }
  -      catch (RuntimeOperationsException roe) {
  -         roe.getTargetException().printStackTrace();
         }
         catch (Exception e) {
            log.error("failed to destroy services", e);
  
  
  


--__--__--

Message: 4
From: Peter Levart <[EMAIL PROTECTED]>
To: Peter Levart <[EMAIL PROTECTED]>,
   "Bill Burke" <[EMAIL PROTECTED]>, "Ole Husgaard" <[EMAIL PROTECTED]>,
   <[EMAIL PROTECTED]>
Subject: Re: [JBoss-dev] Bug in cache
Date: Fri, 19 Oct 2001 18:01:46 +0200

When investigating this further I found out the following:

This is a normal call stack (as printed from the
AbstractInstanceCache.insert 
method) when creating new instance of entity bean (CustomerBean) with empty 
ejbPostCreate() method. As you can see the insertion into cache happens
after 
the ejbPostCreate method returns...

[16:16:32,939,Default] TRACE: CustomerBean.ejbCreate... id=peter
[16:16:33,035,Default] TRACE: CustomerBean.ejbPostCreate... id=peter
[16:16:33,085,Default] java.lang.Exception: JUST DUMPING STACK, key = peter
[16:16:33,086,Default]  at 
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav
a:242)
[16:16:33,087,Default]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:164)
[16:16:33,088,Default]  at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor
.java:104)
[16:16:33,089,Default]  at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:100)
[16:16:33,090,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:156)
[16:16:33,091,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:56)
[16:16:33,091,Default]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:106)
[16:16:33,092,Default]  at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
[16:16:33,093,Default]  at 
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:441)
[16:16:33,094,Default]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:421)
[16:16:33,099,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:23
7)
[16:16:33,100,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
[16:16:33,101,Default]  at $Proxy9.create(Unknown Source)
[16:16:33,102,Default]  at 
_0002fcreateCustomer_0002ejspcreateCustomer_jsp_0._jspService(_0002fcreateCu
stomer_0002ejspcreateCustomer_jsp_0.java:90)


...and these are two call stacks of the same situation when creating a new 
instance of entity bean (AddressBean) which in it's ejbPostCreate() method 
calls related entity's (CustomerBean) bussiness method that in turn adds the

just created instance (of AddressBean) to the -to-many side of the 
one-to-many relation. As you can see the 1st insert happens as a result of 
the calling of the bussines method in the ejbPostCreate()...


[16:21:34,218,Default] TRACE: AddressBean.ejbCreate... cid=peter, 
id=peter_home
[16:21:34,263,Default] TRACE: AddressBean.ejbPostCreate... begin cid=peter, 
id=peter_home
[16:21:34,305,Default] java.lang.Exception: JUST DUMPING STACK, key = 
peter_home
[16:21:34,306,Default]  at 
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav
a:242)
[16:21:34,307,Default]  at 
org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:2
08)
[16:21:34,308,Default]  at 
org.jboss.ejb.plugins.EntityInstanceCache.get(EntityInstanceCache.java:60)
[16:21:34,309,Default]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:185)
[16:21:34,310,Default]  at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav
a:132)
[16:21:34,311,Default]  at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:98)
[16:21:34,312,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:156)
[16:21:34,313,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
[16:21:34,313,Default]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13
1)
[16:21:34,314,Default]  at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
[16:21:34,315,Default]  at 
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:447)
[16:21:34,316,Default]  at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeGetRelatedId(
JDBCCMRFieldBridge.java:471)
[16:21:34,317,Default]  at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRelationLinks
(JDBCCMRFieldBridge.java:430)
[16:21:34,318,Default]  at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.add(RelationSet.java:82)
[16:21:34,318,Default]  at 
customer.CustomerBean.addAddress(CustomerBean.java:109)
[16:21:34,319,Default]  at java.lang.reflect.Method.invoke(Native Method)
[16:21:34,321,Default]  at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.ja
va:1002)
[16:21:34,322,Default]  at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCReadAheadInterceptor.invoke(JDBCReadAhead
Interceptor.java:100)
[16:21:34,323,Default]  at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationIn
terceptor.java:134)
[16:21:34,324,Default]  at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron
izationInterceptor.java:308)
[16:21:34,325,Default]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:201)
[16:21:34,325,Default]  at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav
a:132)
[16:21:34,326,Default]  at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:98)
[16:21:34,327,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:156)
[16:21:34,328,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
[16:21:34,329,Default]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13
1)
[16:21:34,330,Default]  at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
[16:21:34,331,Default]  at 
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:447)
[16:21:34,331,Default]  at 
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContai
nerInvoker.java:320)
[16:21:34,332,Default]  at 
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$EntityProxy.invoke(Bas
eLocalContainerInvoker.java:449)
[16:21:34,333,Default]  at $Proxy11.addAddress(Unknown Source)
[16:21:34,334,Default]  at 
customer.AddressBean.postCreate(AddressBean.java:112)
[16:21:34,335,Default]  at 
customer.AddressBean.ejbPostCreate(AddressBean.java:101)
[16:21:34,336,Default]  at java.lang.reflect.Method.invoke(Native Method)
[16:21:34,336,Default]  at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag
er.java:239)
[16:21:34,337,Default]  at 
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:673)
[16:21:34,338,Default]  at java.lang.reflect.Method.invoke(Native Method)
[16:21:34,339,Default]  at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:926)
[16:21:34,340,Default]  at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.jav
a:74)
[16:21:34,341,Default]  at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.jav
a:74)
[16:21:34,342,Default]  at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:234)
[16:21:34,343,Default]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:151)
[16:21:34,343,Default]  at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor
.java:104)
[16:21:34,344,Default]  at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:100)
[16:21:34,345,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:156)
[16:21:34,346,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:56)
[16:21:34,347,Default]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:106)
[16:21:34,348,Default]  at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
[16:21:34,348,Default]  at 
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:441)
[16:21:34,349,Default]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:421)
[16:21:34,352,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:23
7)
[16:21:34,353,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
[16:21:34,354,Default]  at $Proxy13.create(Unknown Source)
[16:21:34,355,Default]  at 
_0002feditCustomer_0002ejspeditCustomer_jsp_0._jspService(_0002feditCustomer
_0002ejspeditCustomer_jsp_0.java:141)


... and the 2nd attempt to insert the same context into cache is after the 
return from the ejbPostCreate()...


[16:21:34,405,Default] TRACE: AddressBean.ejbPostCreate... end cid=peter, 
id=peter_home
[16:21:34,406,Default] java.lang.Exception: JUST DUMPING STACK, key = 
peter_home
[16:21:34,407,Default]  at 
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav
a:242)
[16:21:34,408,Default]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:164)
[16:21:34,409,Default]  at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor
.java:104)
[16:21:34,410,Default]  at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:100)
[16:21:34,411,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:156)
[16:21:34,412,Default]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:56)
[16:21:34,412,Default]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:106)
[16:21:34,413,Default]  at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
[16:21:34,414,Default]  at 
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:441)
[16:21:34,415,Default]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:421)
[16:21:34,416,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:23
7)
[16:21:34,417,Default]  at 
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
[16:21:34,417,Default]  at $Proxy13.create(Unknown Source)
[16:21:34,418,Default]  at 
_0002feditCustomer_0002ejspeditCustomer_jsp_0._jspService(_0002feditCustomer
_0002ejspeditCustomer_jsp_0.java:141)


My feeling is that the context should be inserted into cache between the 
return from the ejbCreate() and the call to ejbPostCreate() method. As soon 
as the identity of the instance is established. This way the calls to 
business methods in ejbPostCreate() will get an already cached context via 
AbstractInstanceCache.get() and this method (AbstractInstanceCache.get()) 
will not blindly acquireContext(), set it's id, activate it and so on...
only 
to later, when time has come to insert the created context, find out that 
some other context with same id has already been inserted...

This is my ignorant understanding of the matter (I have just downloaded the 
sources and began to study the EJB specs a few days ago)...

Peter



--__--__--

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


End of Jboss-development Digest

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

Reply via email to