Nevermind, jumped the gun on the email. It seems I copied the CMP 1.1
rather than 2.0 container config, so it was trying to instantiate the
abstract CMP rather than create the new one. All is well and pessimistic
locking is working on 3.0 (March 30 build). 

James

> -----Original Message-----
> From: James Higginbotham 
> Sent: Monday, May 06, 2002 1:14 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] java.lang.InstantiationException 
> (Exclusive locking of CMP in JBoss 3)?
> 
> 
> Taking the advice of Burkhard and Dennis, I now (think) I 
> have exclusive locking for the CMP. I am now getting this 
> exception. Can someone on the Jboss team tell me why this 
> exception now shows up during a create()? I know that I would 
> be seeing a different exception if the bean with the same PK 
> already existed. This wasn't happening until I modified the 
> jboss.xml to have a custom container configuration. 
> 
> 2002-05-06 11:23:48,125 ERROR [org.jboss.ejb.plugins.LogInterceptor]
> TransactionRolledbackException, causedBy:
>  java.rmi.ServerException: Could not instantiate bean; nested 
> exception
> is:   java.lang.InstantiationException:
> com.betweenmarkets.workflow.bean.WorkflowStorageBean
>  java.lang.InstantiationException: 
> com.betweenmarkets.workflow.bean.WorkflowStorageBean
>       at java.lang.Class.newInstance0(Native Method)
>       at java.lang.Class.newInstance(Class.java:237)
>       at 
> org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createBeanCl
> assInstanc
> e(JAWSPersistenceManager.java:151)
>       at 
> org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassIns
> tance(CMPP
> ersistenceManager.java:148)
>       at 
> org.jboss.resource.connectionmanager.CachedConnectionIntercept
> or.createB
> eanClassInstance(CachedConnectionInterceptor.java:212)
>       at 
> org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityCo
> ntainer.ja
> va:287)
>       at 
> org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstanc
> ePool.java
> :209)
>       at 
> org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(Ent
> ityInstanc
> eInterceptor.java:122)
>       at 
> org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityL
> ockInterce
> ptor.java:79)
>       at 
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstrac
> tTxInterce
> ptor.java:98)
>       at 
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI
> nterceptor
> CMT.java:167)
>       at
> org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercepto
> rCMT.java:
> 52)
>       at 
> org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityI
> nterceptor
> .java:102)
>       at
> org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor
> .java:109)
>       at
> org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:468)
>       at org.jboss.ejb.Container.invoke(Container.java:702)
>       at
> org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1003)
>       at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:441)
>       at
> org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
>       at 
> org.jboss.invocation.InvokerInterceptor.invoke(InvokerIntercep
> tor.java:1
> 02)
>       at 
> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInter
> ceptor.jav
> a:73)
>       at
> org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor
> .java:76)
>       at
> org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
>       at
> org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
>       at $Proxy52.create(Unknown Source)
>  
> My jboss.xml:
> 
>   <enterprise-beans>
>     <message-driven>
>       <ejb-name>WorkflowMessageBean</ejb-name>
>  
> <jndi-name>com.betweenmarkets.workflow.bean.WorkflowMessageBea
> n</jndi-na
> me>
>       <configuration-name>Standard Message Driven 
> Bean</configuration-name>
>  
> <destination-jndi-name>queue/com.betweenmarkets.workflow.Workf
> lowMessage
> Queue</destination-jndi-name>
>     </message-driven>
>     <entity>
>         <ejb-name>WorkflowStorageBean</ejb-name>
>  
> <jndi-name>com.betweenmarkets.workflow.bean.WorkflowStorageHom
> e</jndi-na
> me>
>         <configuration-name>WorkflowConfig</configuration-name>
>     </entity>
>     
>   </enterprise-beans>
> 
> <!-- Custom Container configuration -->
>   <container-configurations>
>       <container-configuration>
>        <container-name>WorkflowConfig</container-name>
>        <call-logging>false</call-logging>
>       
> <container-invoker>org.jboss.proxy.ejb.ProxyFactory</container
> -invoker>
>        <container-interceptors>
>       
> <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
>       
> <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
>       
> <interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
>           <interceptor 
> metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor
> </intercep
> tor>
>       
> <interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</interceptor>
>       
> <interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</
> intercepto
> r>
>       
> <interceptor>org.jboss.resource.connectionmanager.CachedConnec
> tionInterc
> eptor</interceptor>
>       
> <interceptor>org.jboss.ejb.plugins.EntitySynchronizationInterc
> eptor</int
> erceptor>
>        </container-interceptors>
>        <client-interceptors>
>            <home>
>  
> <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
>  
> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
>            </home>
>            <bean>
>  
> <interceptor>org.jboss.proxy.ejb.EntityInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
>  
> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
>            </bean>
>            <list-entity>
>  
> <interceptor>org.jboss.proxy.ejb.ListEntityInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
>  
> <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
>  
> <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
>            </list-entity>
>        </client-interceptors>
>       
> <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</insta
nce-pool>
>       
> <instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</ins
tance-cach
> e>
>       
> <persistence-manager>org.jboss.ejb.plugins.jaws.JAWSPersistenc
> eManager</
> persistence-manager>
>       
> <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
>       
> <locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJ
> BLock</loc
> king-policy>
>        <container-invoker-conf>
>           <RMIObjectPort>4444</RMIObjectPort>
>           <Optimized>True</Optimized>
>        </container-invoker-conf>
>        <container-cache-conf>
>       
> <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCacheP
> olicy</cac
> he-policy>
>           <cache-policy-conf>
>              <min-capacity>50</min-capacity>
>              <max-capacity>1000</max-capacity>
>              <overager-period>300</overager-period>
>              <max-bean-age>600</max-bean-age>
>              <resizer-period>400</resizer-period>
>              <max-cache-miss-period>60</max-cache-miss-period>
>              <min-cache-miss-period>1</min-cache-miss-period>
>              <cache-load-factor>0.75</cache-load-factor>
>           </cache-policy-conf>
>        </container-cache-conf>
>          <container-pool-conf>
>             <MaximumSize>100</MaximumSize>
>  
> <feeder-policy>org.jboss.ejb.plugins.TimedInstancePoolFeeder</
feeder-pol
> icy>
>                 <feeder-policy-conf>
>                     <increment>10</increment>
>                     <period>500</period>
>                 </feeder-policy-conf>
>          </container-pool-conf>
>        <commit-option>A</commit-option>
>    </container-configuration>
>   </container-configurations>
> 
> The code in question:
> 
>             workflowStorage  = 
> (WorkflowStorage)home.create(workflowEntry.workflowIdentifier,
> workflowEntry.workflow);
> 
> Where the create sig is:
> 
>   public WorkflowStorage create(String workflowId, Object data)
>     throws CreateException, RemoteException;
> 
> Thanks,
> James
> 
> > -----Original Message-----
> > From: James Higginbotham
> > Sent: Monday, May 06, 2002 8:41 AM
> > To: Burkhard Vogel; [EMAIL PROTECTED]
> > Subject: RE: [JBoss-user] Exclusive locking of CMP in JBoss 3?
> > 
> > 
> > That is already setup in my standardjboss.xml. Should I be
> > putting it somewhere else in my configurations?
> > 
> > Also, how does one tell Jboss that I want to use a custom
> > container configuration for an EJB? What is the default used 
> > if nothing is specified?
> > 
> > Thanks,
> > James
> > 
> > > -----Original Message-----
> > > From: Burkhard Vogel [mailto:[EMAIL PROTECTED]]
> > > Sent: Sunday, May 05, 2002 5:33 PM
> > > To: James Higginbotham; [EMAIL PROTECTED]
> > > Subject: Re: [JBoss-user] Exclusive locking of CMP in JBoss 3?
> > > 
> > > 
> > > Hi,
> > > there used to be a locking as part of the container 
> configuartion, 
> > > which menas you have to define your own container configuration, 
> > > which you than can assign to your bean in the jboss.xml. Look for 
> > > the line:
> > > 
> > > <locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJ
> > > BLock</locking
> > > -policy>
> > > which is (unfortunately) from JB2.4.3, but this shouldn't have 
> > > changed too much. Regrads, Burkhard
> > > ----- Original Message -----
> > > From: "James Higginbotham" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, May 05, 2002 5:07 PM
> > > Subject: [JBoss-user] Exclusive locking of CMP in JBoss 3?
> > > 
> > > 
> > > Is there a JBoss extension to the deployment descriptors that 
> > > enables turning on an exclusive lock mode for CMPs in 
> v3.0? We are 
> > > using Weblogic's feature to require pessimistic locking for a 
> > > specific CMP bean and need a similiar feature under JBoss. Any 
> > > suggestions are appreciated.
> > > 
> > > Thanks,
> > > James
> > > 
> > > 
> > > 
> > 
> > _______________________________________________________________
> > 
> > Have big pipes? SourceForge.net is looking for download
> > mirrors. We supply the hardware. You get the recognition. 
> > Email Us: [EMAIL PROTECTED] 
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED] 
> > https://lists.sourceforge.net/lists/listinfo/j> boss-user
> > 
> 
> _______________________________________________________________
> 
> Have big pipes? SourceForge.net is looking for download 
> mirrors. We supply
> the hardware. You get the recognition. Email Us: 
> [EMAIL PROTECTED]
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to