geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viola lu <viola...@gmail.com>
Subject Re: Question about TransactionManger replacement and initialization
Date Thu, 01 Sep 2011 10:41:12 GMT
Hi, David:

 I just investigated the possibility of TransactionManager replacement, if
it's a big project to do so, we can pass it.

Thanks.

On Wed, Aug 31, 2011 at 12:49 AM, David Jencks <david_jencks@yahoo.com>wrote:

> Hi Viola,
>
> Without seeing your gbean I don't know what's wrong.  I'd guess you didn't
> get the bittronix tm wrapper to implement RecoverableTransactionManager.
>
> Looking at Bittronix I see it implements not only the tm but non-j2ca
> connection pooling so I'd guess you'd have to replace the connector
> framework too in order to get recovery, and possibly anything, to work.
>
> I think this replacement is a pretty big project that will result in
> reduced functionality.... why is this a useful project?
>
> thanks
> david jencks
>
> On Aug 30, 2011, at 12:24 AM, viola lu wrote:
>
> The error i got is as below:
>
> 2011-08-30 10:40:42,484 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/transaction/2.1.5/car?ServiceModule=org.apache.geronimo.configs/transaction/2.1.5/car,j2eeType=Context,name=ResourceBindings
> at name jca:
> 2011-08-30 10:40:43,390 WARN  [GBeanInstance] Constructor mismatch for
> org.apache.geronimo.configs/system-database/2.1.5/car?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAManagedConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.1.5/car,j2eeType=JCAConnectionManager,name=SystemDatasource
> java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
> at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:592)
>  at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>  at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>  at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$1d5c1b9.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:206)
>  at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:89)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
>  at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
> at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> 2011-08-30 10:40:43,390 ERROR [GBeanInstanceState] Error while starting;
> GBean is now in the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.1.5/car?J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAManagedConnectionFactory=SystemDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.1.5/car,j2eeType=JCAConnectionManager,name=SystemDatasource"
> java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
> at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:592)
>  at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>  at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>  at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$1d5c1b9.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:206)
>  at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:89)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
>  at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
> at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> 2011-08-30 10:40:43,437 WARN  [GBeanInstance] Constructor mismatch for
> org.apache.geronimo.configs/system-database/2.1.5/car?J2EEApplication=null,JCAConnectionFactory=NoTxDatasource,JCAManagedConnectionFactory=NoTxDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.1.5/car,j2eeType=JCAConnectionManager,name=NoTxDatasource
> java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
> at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:592)
>  at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>  at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>  at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$1d5c1b9.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:206)
>  at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:89)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
>  at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
> at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> 2011-08-30 10:40:43,484 ERROR [GBeanInstanceState] Error while starting;
> GBean is now in the FAILED state:
> abstractName="org.apache.geronimo.configs/system-database/2.1.5/car?J2EEApplication=null,JCAConnectionFactory=NoTxDatasource,JCAManagedConnectionFactory=NoTxDatasource,JCAResource=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1.5/car,ResourceAdapterModule=org.apache.geronimo.configs/system-database/2.1.5/car,j2eeType=JCAConnectionManager,name=NoTxDatasource"
> java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
> at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:592)
>  at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
> at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>  at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>  at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$1d5c1b9.startConfiguration(<generated>)
> at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:206)
>  at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:89)
> at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
>  at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
> at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
>
> About Bitronix Transaction Manager,  you can get some information from
> http://docs.codehaus.org/display/BTM/Home
>
> If ignoring transaction recovery, how to make it work? Thanks in advance!
>
> On Tue, Aug 30, 2011 at 2:38 PM, David Jencks <david_jencks@yahoo.com>wrote:
>
>>
>> On Aug 29, 2011, at 8:00 PM, viola lu wrote:
>>
>> > If we would like use third-party TransactionManager such as Bitronix
>> TransactionManger  instead of geronimo default transaction manger
>> implementation, and  Hibernate as their persistence layer. It's better if
>> third-party TransactionManger can be initialized in Application context,
>> >
>> >  But can we replace geronimo default transaction manger with a
>> third-party  on geronimo 2.1.5? I tried to create
>> BitronixTransactionMangerGBean ,
>> BitronixTransactionSynchronizationRegistryGBean and change TransactionManger
>> gbean defintion in  transaction plugins plan.xml , but server failed to
>> start coz of  JCA ,system-database start failure, i think it's difficult to
>> replace geronimo transaction manager.
>>
>> What's the error?
>>
>> Do you care about transaction recovery?  IMO how recovery is initiated is
>> not well specified in the spec and I rather doubt other transaction managers
>> do exactly as the geronimo one does.  However with enough information on
>> what the tm expects we should be able to get it to work.  Ignoring recovery
>> should make the problem simpler.
>> >
>> >  or Bind the third-party TransactoinManger into our jndi tree with
>> another different name
>> (java:bintronixmanager,java:comp/env/BintronixUserTransaction, end-user can
>> lookup it in its application code, but when build PersitenceUnitGBean , its
>> reference TransactionManager  refers to TransactionManagerImpl (geronimo
>> default transaction manger).
>>
>> I don't recommend this.
>>
>> thanks
>> david jencks
>>
>> >
>> >  Is there other way to make this happen?  I
>> >
>> > Appreciate your help!
>> >
>> >
>> > --
>> > viola
>> >
>> > Apache Geronimo
>> >
>>
>>
>
>
> --
> viola
>
> Apache Geronimo
>
>
>


-- 
viola

Apache Geronimo

Mime
View raw message