You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andrey Kopachevsky <ak...@aidoss.kiev.ua> on 2009/02/16 13:26:55 UTC

SMX4 and Apache ODE compatibility

We want to deploy ODE to SMX 4.
To do this I downloaded SMX4, run it, and place ode-jbi-1.2.jar (which 
is basically jbi component), to SMX_HOME/deploy folder.

In log file I've found following:

java.lang.RuntimeException: TransactionManager is not recoverable.
    at org.apache.ode.il.dbutil.Database.initInternalDb(Database.java:179)
    at org.apache.ode.il.dbutil.Database.initEmbeddedDb(Database.java:232)
    at org.apache.ode.il.dbutil.Database.initDataSource(Database.java:147)
    at org.apache.ode.il.dbutil.Database.start(Database.java:99)
    at org.apache.ode.jbi.OdeLifeCycle.initDataSource(OdeLifeCycle.java:175)
    at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java:113)
    at 
org.apache.servicemix.jbi.deployer.impl.ComponentImpl$ComponentWrapper.init(ComponentImpl.java:258)

So, ODE component want transaction manager, taken from jbi component 
context to be instance of
org.apache.geronimo.transaction.manager.RecoverableTransactionManager 
interface. To check it ODE use instanseof operator.

As I checked from spring-dm description file, placed in 
org.apache.servicemix.transaction bundle:

    <osgi:service ref="transactionManager">
        <osgi:interfaces>
            <value>javax.transaction.TransactionManager</value>
            
<value>org.apache.geronimo.transaction.manager.RecoverableTransactionManager</value>
            
<value>org.springframework.transaction.PlatformTransactionManager</value>
        </osgi:interfaces>
    </osgi:service>

And 
org.apache.geronimo.transaction.manager.RecoverableTransactionManager 
class exported by geronimo-transaction-2.2.jar bundle

The problem is: ODE jbi component classloader can't import 
RecoverableTransactionManager from geronimo-transaction-2.2 bundle, at 
least I don't know how to do this, and of course
"transactionManager instanceof  RecoverableTransactionManager"
will return false.

So, obviously, ODE-JBI not adopted to run in SMX4 OSGI based 
environment. But we are really need to get it runing.
The question is, how we can grain access to geronimo-transaction-2.2.jar 
classes from inside ode-jbi component, maybe we can add corresponding 
imports to JBI server bundle classloader with is parent for ode-jbi 
component?




Re: SMX4 and Apache ODE compatibility

Posted by Alex Boisvert <bo...@intalio.com>.
The current solution is to use an external datasource by editing
ode-jbi.properties and defining a JNDI lookup for a datasource defined in
ServiceMix.

alex


On Mon, Feb 16, 2009 at 4:26 AM, Andrey Kopachevsky <
akopachevsky@aidoss.kiev.ua> wrote:

> We want to deploy ODE to SMX 4.
> To do this I downloaded SMX4, run it, and place ode-jbi-1.2.jar (which is
> basically jbi component), to SMX_HOME/deploy folder.
>
> In log file I've found following:
>
> java.lang.RuntimeException: TransactionManager is not recoverable.
>   at org.apache.ode.il.dbutil.Database.initInternalDb(Database.java:179)
>   at org.apache.ode.il.dbutil.Database.initEmbeddedDb(Database.java:232)
>   at org.apache.ode.il.dbutil.Database.initDataSource(Database.java:147)
>   at org.apache.ode.il.dbutil.Database.start(Database.java:99)
>   at org.apache.ode.jbi.OdeLifeCycle.initDataSource(OdeLifeCycle.java:175)
>   at org.apache.ode.jbi.OdeLifeCycle.init(OdeLifeCycle.java:113)
>   at
> org.apache.servicemix.jbi.deployer.impl.ComponentImpl$ComponentWrapper.init(ComponentImpl.java:258)
>
> So, ODE component want transaction manager, taken from jbi component
> context to be instance of
> org.apache.geronimo.transaction.manager.RecoverableTransactionManager
> interface. To check it ODE use instanseof operator.
>
> As I checked from spring-dm description file, placed in
> org.apache.servicemix.transaction bundle:
>
>   <osgi:service ref="transactionManager">
>       <osgi:interfaces>
>           <value>javax.transaction.TransactionManager</value>
>
> <value>org.apache.geronimo.transaction.manager.RecoverableTransactionManager</value>
>
> <value>org.springframework.transaction.PlatformTransactionManager</value>
>       </osgi:interfaces>
>   </osgi:service>
>
> And org.apache.geronimo.transaction.manager.RecoverableTransactionManager
> class exported by geronimo-transaction-2.2.jar bundle
>
> The problem is: ODE jbi component classloader can't import
> RecoverableTransactionManager from geronimo-transaction-2.2 bundle, at least
> I don't know how to do this, and of course
> "transactionManager instanceof  RecoverableTransactionManager"
> will return false.
>
> So, obviously, ODE-JBI not adopted to run in SMX4 OSGI based environment.
> But we are really need to get it runing.
> The question is, how we can grain access to geronimo-transaction-2.2.jar
> classes from inside ode-jbi component, maybe we can add corresponding
> imports to JBI server bundle classloader with is parent for ode-jbi
> component?
>
>
>
>