You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2008/05/13 20:50:45 UTC

SCA & BPEL - ODE Database dependency

In Apache Tuscany, we have a embedded ODE Server that has a dependency
on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
by the build process when the app is run. I see two issues with this
approach : The build infrastructure to unzip the db needs to be copied
on every sample app and when running from an IDE, this code might not
have been executed, and will require the application developer to go
outside of the ide, to run some build command to create the db and
make it available on the classpath.

 I was wondering if there is some kind of script that could be used to
generate the db structure and any initial content. If so, I was
thinking to integrate this script into the Embedded ODE Server
initialization code, and create the proper db dependencies if not
found.

Thoughts ?

-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: SCA & BPEL - ODE Database dependency

Posted by Matthieu Riou <ma...@offthelip.org>.
I think Alex didn't mean it's there already, just pointed out a way to add
this :)

We already have something similar in bpel-store [1]. You can configure
OpenJPA to create the schema for you if it can't find it. So what you would
do is basically:

1. Create a derby instance.
2. Point OpenJPA to it with the right option (just add it as a property in
[2]).
3. Instantiate the store asking it to create its schema as well.
4. There's no 4.

Given that Tuscany already has its own IL, you have all the freedom to do
this when assembling the pieces. The only missing one is the property in 2.

Cheers,
Matthieu

[1]
http://svn.apache.org/repos/asf/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/jpa/DbConfStoreConnectionFactory.java
[2]
http://svn.apache.org/repos/asf/ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionFactoryImpl.java

On Tue, May 13, 2008 at 12:04 PM, Luciano Resende <lu...@gmail.com>
wrote:

> Good to know we already have the code to create a new Derby dabase
> instance with a fresh Ode Schema. I guess I have missed this when
> creating the Tuscany Embedded Ode Server. Could you please point me to
> where this is available ?
>
> On Tue, May 13, 2008 at 11:56 AM, Alex Boisvert <bo...@intalio.com>
> wrote:
> > Perhaps by defining a new database mode "SAMPLE" (we already have
> EMBEDDED,
> > INTERNAL, EXTERNAL), that creates a new Derby database instance with a
> fresh
> > Ode schema everytime the server is started?
> >
> > alex
> >
> >
> > On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> >> In Apache Tuscany, we have a embedded ODE Server that has a dependency
> >> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
> >> by the build process when the app is run. I see two issues with this
> >> approach : The build infrastructure to unzip the db needs to be copied
> >> on every sample app and when running from an IDE, this code might not
> >> have been executed, and will require the application developer to go
> >> outside of the ide, to run some build command to create the db and
> >> make it available on the classpath.
> >>
> >>  I was wondering if there is some kind of script that could be used to
> >> generate the db structure and any initial content. If so, I was
> >> thinking to integrate this script into the Embedded ODE Server
> >> initialization code, and create the proper db dependencies if not
> >> found.
> >>
> >> Thoughts ?
> >>
> >> --
> >> Luciano Resende
> >> Apache Tuscany Committer
> >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> >> http://lresende.blogspot.com/
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>

Re: SCA & BPEL - ODE Database dependency

Posted by Matthieu Riou <ma...@offthelip.org>.
I think Alex didn't mean it's there already, just pointed out a way to add
this :)

We already have something similar in bpel-store [1]. You can configure
OpenJPA to create the schema for you if it can't find it. So what you would
do is basically:

1. Create a derby instance.
2. Point OpenJPA to it with the right option (just add it as a property in
[2]).
3. Instantiate the store asking it to create its schema as well.
4. There's no 4.

Given that Tuscany already has its own IL, you have all the freedom to do
this when assembling the pieces. The only missing one is the property in 2.

Cheers,
Matthieu

[1]
http://svn.apache.org/repos/asf/ode/trunk/bpel-store/src/main/java/org/apache/ode/store/jpa/DbConfStoreConnectionFactory.java
[2]
http://svn.apache.org/repos/asf/ode/trunk/dao-jpa/src/main/java/org/apache/ode/dao/jpa/BPELDAOConnectionFactoryImpl.java

On Tue, May 13, 2008 at 12:04 PM, Luciano Resende <lu...@gmail.com>
wrote:

> Good to know we already have the code to create a new Derby dabase
> instance with a fresh Ode Schema. I guess I have missed this when
> creating the Tuscany Embedded Ode Server. Could you please point me to
> where this is available ?
>
> On Tue, May 13, 2008 at 11:56 AM, Alex Boisvert <bo...@intalio.com>
> wrote:
> > Perhaps by defining a new database mode "SAMPLE" (we already have
> EMBEDDED,
> > INTERNAL, EXTERNAL), that creates a new Derby database instance with a
> fresh
> > Ode schema everytime the server is started?
> >
> > alex
> >
> >
> > On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> >> In Apache Tuscany, we have a embedded ODE Server that has a dependency
> >> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
> >> by the build process when the app is run. I see two issues with this
> >> approach : The build infrastructure to unzip the db needs to be copied
> >> on every sample app and when running from an IDE, this code might not
> >> have been executed, and will require the application developer to go
> >> outside of the ide, to run some build command to create the db and
> >> make it available on the classpath.
> >>
> >>  I was wondering if there is some kind of script that could be used to
> >> generate the db structure and any initial content. If so, I was
> >> thinking to integrate this script into the Embedded ODE Server
> >> initialization code, and create the proper db dependencies if not
> >> found.
> >>
> >> Thoughts ?
> >>
> >> --
> >> Luciano Resende
> >> Apache Tuscany Committer
> >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> >> http://lresende.blogspot.com/
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>

Re: SCA & BPEL - ODE Database dependency

Posted by Luciano Resende <lu...@gmail.com>.
Good to know we already have the code to create a new Derby dabase
instance with a fresh Ode Schema. I guess I have missed this when
creating the Tuscany Embedded Ode Server. Could you please point me to
where this is available ?

On Tue, May 13, 2008 at 11:56 AM, Alex Boisvert <bo...@intalio.com> wrote:
> Perhaps by defining a new database mode "SAMPLE" (we already have EMBEDDED,
> INTERNAL, EXTERNAL), that creates a new Derby database instance with a fresh
> Ode schema everytime the server is started?
>
> alex
>
>
> On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>
>> In Apache Tuscany, we have a embedded ODE Server that has a dependency
>> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
>> by the build process when the app is run. I see two issues with this
>> approach : The build infrastructure to unzip the db needs to be copied
>> on every sample app and when running from an IDE, this code might not
>> have been executed, and will require the application developer to go
>> outside of the ide, to run some build command to create the db and
>> make it available on the classpath.
>>
>>  I was wondering if there is some kind of script that could be used to
>> generate the db structure and any initial content. If so, I was
>> thinking to integrate this script into the Embedded ODE Server
>> initialization code, and create the proper db dependencies if not
>> found.
>>
>> Thoughts ?
>>
>> --
>> Luciano Resende
>> Apache Tuscany Committer
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: SCA & BPEL - ODE Database dependency

Posted by Luciano Resende <lu...@gmail.com>.
Good to know we already have the code to create a new Derby dabase
instance with a fresh Ode Schema. I guess I have missed this when
creating the Tuscany Embedded Ode Server. Could you please point me to
where this is available ?

On Tue, May 13, 2008 at 11:56 AM, Alex Boisvert <bo...@intalio.com> wrote:
> Perhaps by defining a new database mode "SAMPLE" (we already have EMBEDDED,
> INTERNAL, EXTERNAL), that creates a new Derby database instance with a fresh
> Ode schema everytime the server is started?
>
> alex
>
>
> On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>
>> In Apache Tuscany, we have a embedded ODE Server that has a dependency
>> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
>> by the build process when the app is run. I see two issues with this
>> approach : The build infrastructure to unzip the db needs to be copied
>> on every sample app and when running from an IDE, this code might not
>> have been executed, and will require the application developer to go
>> outside of the ide, to run some build command to create the db and
>> make it available on the classpath.
>>
>>  I was wondering if there is some kind of script that could be used to
>> generate the db structure and any initial content. If so, I was
>> thinking to integrate this script into the Embedded ODE Server
>> initialization code, and create the proper db dependencies if not
>> found.
>>
>> Thoughts ?
>>
>> --
>> Luciano Resende
>> Apache Tuscany Committer
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: SCA & BPEL - ODE Database dependency

Posted by Alex Boisvert <bo...@intalio.com>.
Perhaps by defining a new database mode "SAMPLE" (we already have EMBEDDED,
INTERNAL, EXTERNAL), that creates a new Derby database instance with a fresh
Ode schema everytime the server is started?

alex


On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
wrote:

> In Apache Tuscany, we have a embedded ODE Server that has a dependency
> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
> by the build process when the app is run. I see two issues with this
> approach : The build infrastructure to unzip the db needs to be copied
> on every sample app and when running from an IDE, this code might not
> have been executed, and will require the application developer to go
> outside of the ide, to run some build command to create the db and
> make it available on the classpath.
>
>  I was wondering if there is some kind of script that could be used to
> generate the db structure and any initial content. If so, I was
> thinking to integrate this script into the Embedded ODE Server
> initialization code, and create the proper db dependencies if not
> found.
>
> Thoughts ?
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>

Re: SCA & BPEL - ODE Database dependency

Posted by Alex Boisvert <bo...@intalio.com>.
Perhaps by defining a new database mode "SAMPLE" (we already have EMBEDDED,
INTERNAL, EXTERNAL), that creates a new Derby database instance with a fresh
Ode schema everytime the server is started?

alex


On Tue, May 13, 2008 at 11:50 AM, Luciano Resende <lu...@gmail.com>
wrote:

> In Apache Tuscany, we have a embedded ODE Server that has a dependency
> on the ODE database (ode-dao-jpa-ojpa-derby-1.1.zip) that get's unzip
> by the build process when the app is run. I see two issues with this
> approach : The build infrastructure to unzip the db needs to be copied
> on every sample app and when running from an IDE, this code might not
> have been executed, and will require the application developer to go
> outside of the ide, to run some build command to create the db and
> make it available on the classpath.
>
>  I was wondering if there is some kind of script that could be used to
> generate the db structure and any initial content. If so, I was
> thinking to integrate this script into the Embedded ODE Server
> initialization code, and create the proper db dependencies if not
> found.
>
> Thoughts ?
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>