You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andriotto Massimiliano <ma...@necsy.it> on 2010/02/25 15:18:15 UTC

configure jndi datasource in SMX4

I'm using servicemix 4 with ODE feature installed.

I want ODE uses Oracle database instead of derby DB.I created the
configuration file 


org.apache.ode.jbi.cfg with these parameters:


ode-jbi.db.mode=EXTERNAL
ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
mpl
ode-jbi.db.emb.name=hibdb

ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
mpl

Now I need to configure the datasource and register it inside a jndi
service. How can I 

configure the datasource and register it inside a jndi service?

Thank you


Massimiliano

 

 


Re: configure jndi datasource in SMX4

Posted by Charles Moulliard <cm...@gmail.com>.
To be complete, you can use OSGI service available on SMX4 + Aries and
publish your datasource reference like this :

osgi.jndi.serviceName=jdbc/TradeDataSource

More info is available here :
http://svn.apache.org/repos/asf/incubator/aries/trunk/ariestrader-sample/modules/ariestrader-util/src/main/java/org/apache/aries/samples/ariestrader/util/TradeConfig.java(for
an example)

and here for the spec:

http://incubator.apache.org/aries/pointerstoosgispecifications.html

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
massimiliano.andriotto@necsy.it> wrote:

> I'm using servicemix 4 with ODE feature installed.
>
> I want ODE uses Oracle database instead of derby DB.I created the
> configuration file
>
>
> org.apache.ode.jbi.cfg with these parameters:
>
>
> ode-jbi.db.mode=EXTERNAL
> ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
> ode-jbi.db.emb.name=hibdb
>
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
>
> Now I need to configure the datasource and register it inside a jndi
> service. How can I
>
> configure the datasource and register it inside a jndi service?
>
> Thank you
>
>
> Massimiliano
>
>
>
>
>
>

Re: configure jndi datasource in SMX4

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks a lot Rafal for the update.

FYI, there is a discussion currently to embed ODE by default in SMX 
distributions.

Regards
JB

Rafal Rusin wrote:
> Hello,
> 
> I added some options for configuring ODE INTERNAL DB
> and I run successfully ODE in SMX4 with Oracle and Hibernate.
> You can check out details here: http://issues.apache.org/jira/browse/ODE-777.
> 
> ODE INTERNAL db config creates it's own Geronimo connection pool instead of
> using it from JNDI (like in EXTERNAL). This way there's no need for JNDI.
> 
> Regards
> 
> On 25 February 2010 16:11, Charles Moulliard <cm...@gmail.com> wrote:
>> I'm not sure that this class works on SMX4.
>>
>> If you are interested by a Spring approach, maybe you can try to use this
>> class :  org.springframework.jndi.JndiObjectFactoryBean but I'm not sure
>> that this factory will simulate a JNDI repository
>>
>> Don't forget that JNDI is implemented by J2EE application server like JBoss,
>> WebSphere, ... and SMX4 is not a J2EE application but an OSGI assembly
>> platform. OSGI EE spec will remedy to some of the existing ;-)
>>
>> Kind regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>>
>> On Thu, Feb 25, 2010 at 3:39 PM, Andriotto Massimiliano <
>> massimiliano.andriotto@necsy.it> wrote:
>>
>>> Is it possible to use spring?
>>> In SMX3 there is a class
>>> (org.apache.xbean.jndi.SpringInitialContextFactory) that is used to
>>> initialize jndi service. Is it possible to use in SMX4 and how?
>>> Thank you
>>>
>>> Massimiliano
>>>
>>> -----Messaggio originale-----
>>> Da: Charles Moulliard [mailto:cmoulliard@gmail.com]
>>> Inviato: giovedì 25 febbraio 2010 15.34
>>> A: users@servicemix.apache.org
>>> Oggetto: Re: configure jndi datasource in SMX4
>>>
>>> Hi Andriotti,
>>>
>>> This feature is not yet available on the Apache Aries project which is the
>>> project implementing for apache the OSGI EE spec (transaction, jndi, jpa,
>>> ...).
>>>
>>> You can find a discussion that we have had on this point with Alsadair here
>>> :
>>>
>>> http://mail-archives.apache.org/mod_mbox/incubator-aries-user/201002.mbox/browser
>>>
>>> Kind regards,
>>>
>>> Charles Moulliard
>>> Senior Enterprise Architect
>>> Apache Camel Committer
>>>
>>> *****************************
>>> blog : http://cmoulliard.blogspot.com
>>> twitter : http://twitter.com/cmoulliard
>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>
>>> Apache Camel Group :
>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>
>>>
>>> On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
>>> massimiliano.andriotto@necsy.it> wrote:
>>>
>>>> I'm using servicemix 4 with ODE feature installed.
>>>>
>>>> I want ODE uses Oracle database instead of derby DB.I created the
>>>> configuration file
>>>>
>>>>
>>>> org.apache.ode.jbi.cfg with these parameters:
>>>>
>>>>
>>>> ode-jbi.db.mode=EXTERNAL
>>>> ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
>>>> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
>>>> mpl
>>>> ode-jbi.db.emb.name=hibdb
>>>>
>>>> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
>>>> mpl
>>>>
>>>> Now I need to configure the datasource and register it inside a jndi
>>>> service. How can I
>>>>
>>>> configure the datasource and register it inside a jndi service?
>>>>
>>>> Thank you
>>>>
>>>>
>>>> Massimiliano
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
> 
> 
> 

Re: configure jndi datasource in SMX4

Posted by Rafal Rusin <ra...@gmail.com>.
Hello,

I added some options for configuring ODE INTERNAL DB
and I run successfully ODE in SMX4 with Oracle and Hibernate.
You can check out details here: http://issues.apache.org/jira/browse/ODE-777.

ODE INTERNAL db config creates it's own Geronimo connection pool instead of
using it from JNDI (like in EXTERNAL). This way there's no need for JNDI.

Regards

On 25 February 2010 16:11, Charles Moulliard <cm...@gmail.com> wrote:
> I'm not sure that this class works on SMX4.
>
> If you are interested by a Spring approach, maybe you can try to use this
> class :  org.springframework.jndi.JndiObjectFactoryBean but I'm not sure
> that this factory will simulate a JNDI repository
>
> Don't forget that JNDI is implemented by J2EE application server like JBoss,
> WebSphere, ... and SMX4 is not a J2EE application but an OSGI assembly
> platform. OSGI EE spec will remedy to some of the existing ;-)
>
> Kind regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
> On Thu, Feb 25, 2010 at 3:39 PM, Andriotto Massimiliano <
> massimiliano.andriotto@necsy.it> wrote:
>
>> Is it possible to use spring?
>> In SMX3 there is a class
>> (org.apache.xbean.jndi.SpringInitialContextFactory) that is used to
>> initialize jndi service. Is it possible to use in SMX4 and how?
>> Thank you
>>
>> Massimiliano
>>
>> -----Messaggio originale-----
>> Da: Charles Moulliard [mailto:cmoulliard@gmail.com]
>> Inviato: giovedì 25 febbraio 2010 15.34
>> A: users@servicemix.apache.org
>> Oggetto: Re: configure jndi datasource in SMX4
>>
>> Hi Andriotti,
>>
>> This feature is not yet available on the Apache Aries project which is the
>> project implementing for apache the OSGI EE spec (transaction, jndi, jpa,
>> ...).
>>
>> You can find a discussion that we have had on this point with Alsadair here
>> :
>>
>> http://mail-archives.apache.org/mod_mbox/incubator-aries-user/201002.mbox/browser
>>
>> Kind regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>>
>> On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
>> massimiliano.andriotto@necsy.it> wrote:
>>
>> > I'm using servicemix 4 with ODE feature installed.
>> >
>> > I want ODE uses Oracle database instead of derby DB.I created the
>> > configuration file
>> >
>> >
>> > org.apache.ode.jbi.cfg with these parameters:
>> >
>> >
>> > ode-jbi.db.mode=EXTERNAL
>> > ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
>> > ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
>> > mpl
>> > ode-jbi.db.emb.name=hibdb
>> >
>> > ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
>> > mpl
>> >
>> > Now I need to configure the datasource and register it inside a jndi
>> > service. How can I
>> >
>> > configure the datasource and register it inside a jndi service?
>> >
>> > Thank you
>> >
>> >
>> > Massimiliano
>> >
>> >
>> >
>> >
>> >
>> >
>>
>



-- 
Rafał Rusin
http://rrusin.blogspot.com
http://www.touk.pl
http://top.touk.pl

Re: configure jndi datasource in SMX4

Posted by Charles Moulliard <cm...@gmail.com>.
I'm not sure that this class works on SMX4.

If you are interested by a Spring approach, maybe you can try to use this
class :  org.springframework.jndi.JndiObjectFactoryBean but I'm not sure
that this factory will simulate a JNDI repository

Don't forget that JNDI is implemented by J2EE application server like JBoss,
WebSphere, ... and SMX4 is not a J2EE application but an OSGI assembly
platform. OSGI EE spec will remedy to some of the existing ;-)

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Thu, Feb 25, 2010 at 3:39 PM, Andriotto Massimiliano <
massimiliano.andriotto@necsy.it> wrote:

> Is it possible to use spring?
> In SMX3 there is a class
> (org.apache.xbean.jndi.SpringInitialContextFactory) that is used to
> initialize jndi service. Is it possible to use in SMX4 and how?
> Thank you
>
> Massimiliano
>
> -----Messaggio originale-----
> Da: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Inviato: giovedì 25 febbraio 2010 15.34
> A: users@servicemix.apache.org
> Oggetto: Re: configure jndi datasource in SMX4
>
> Hi Andriotti,
>
> This feature is not yet available on the Apache Aries project which is the
> project implementing for apache the OSGI EE spec (transaction, jndi, jpa,
> ...).
>
> You can find a discussion that we have had on this point with Alsadair here
> :
>
> http://mail-archives.apache.org/mod_mbox/incubator-aries-user/201002.mbox/browser
>
> Kind regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
> On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
> massimiliano.andriotto@necsy.it> wrote:
>
> > I'm using servicemix 4 with ODE feature installed.
> >
> > I want ODE uses Oracle database instead of derby DB.I created the
> > configuration file
> >
> >
> > org.apache.ode.jbi.cfg with these parameters:
> >
> >
> > ode-jbi.db.mode=EXTERNAL
> > ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
> > ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> > mpl
> > ode-jbi.db.emb.name=hibdb
> >
> > ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> > mpl
> >
> > Now I need to configure the datasource and register it inside a jndi
> > service. How can I
> >
> > configure the datasource and register it inside a jndi service?
> >
> > Thank you
> >
> >
> > Massimiliano
> >
> >
> >
> >
> >
> >
>

R: configure jndi datasource in SMX4

Posted by Andriotto Massimiliano <ma...@necsy.it>.
Is it possible to use spring?
In SMX3 there is a class (org.apache.xbean.jndi.SpringInitialContextFactory) that is used to initialize jndi service. Is it possible to use in SMX4 and how?
Thank you

Massimiliano 

-----Messaggio originale-----
Da: Charles Moulliard [mailto:cmoulliard@gmail.com] 
Inviato: giovedì 25 febbraio 2010 15.34
A: users@servicemix.apache.org
Oggetto: Re: configure jndi datasource in SMX4

Hi Andriotti,

This feature is not yet available on the Apache Aries project which is the
project implementing for apache the OSGI EE spec (transaction, jndi, jpa,
...).

You can find a discussion that we have had on this point with Alsadair here
:
http://mail-archives.apache.org/mod_mbox/incubator-aries-user/201002.mbox/browser

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
massimiliano.andriotto@necsy.it> wrote:

> I'm using servicemix 4 with ODE feature installed.
>
> I want ODE uses Oracle database instead of derby DB.I created the
> configuration file
>
>
> org.apache.ode.jbi.cfg with these parameters:
>
>
> ode-jbi.db.mode=EXTERNAL
> ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
> ode-jbi.db.emb.name=hibdb
>
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
>
> Now I need to configure the datasource and register it inside a jndi
> service. How can I
>
> configure the datasource and register it inside a jndi service?
>
> Thank you
>
>
> Massimiliano
>
>
>
>
>
>

Re: configure jndi datasource in SMX4

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Andriotti,

This feature is not yet available on the Apache Aries project which is the
project implementing for apache the OSGI EE spec (transaction, jndi, jpa,
...).

You can find a discussion that we have had on this point with Alsadair here
:
http://mail-archives.apache.org/mod_mbox/incubator-aries-user/201002.mbox/browser

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Thu, Feb 25, 2010 at 3:18 PM, Andriotto Massimiliano <
massimiliano.andriotto@necsy.it> wrote:

> I'm using servicemix 4 with ODE feature installed.
>
> I want ODE uses Oracle database instead of derby DB.I created the
> configuration file
>
>
> org.apache.ode.jbi.cfg with these parameters:
>
>
> ode-jbi.db.mode=EXTERNAL
> ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
> ode-jbi.db.emb.name=hibdb
>
> ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryI
> mpl
>
> Now I need to configure the datasource and register it inside a jndi
> service. How can I
>
> configure the datasource and register it inside a jndi service?
>
> Thank you
>
>
> Massimiliano
>
>
>
>
>
>