Hi,
I checked in a class to provide a set of methods to deal with the deployment
related file processing. Luciano, you can start from there to hook it with
the other code.
[1] http://svn.apache.org/viewvc?rev=795180&view=rev
Thanks,
Raymond
--------------------------------------------------
From: "Luciano Resende" <[email protected]>
Sent: Thursday, July 16, 2009 5:52 PM
To: <[email protected]>
Subject: Re: Location related issues in implementation-bpel-ode module
On Thu, Jul 16, 2009 at 4:48 PM, Raymond Feng<[email protected]> wrote:
Hi,
I run into a lot of issues related to the location of the BPEL process
when
the .bpel file is contained in a JAR file (or an OSGi bundle).
The current code only handles the artifacts on the file system:
* It doesn't handle the URLs that are not appropriately escaped (such as
file:/C:/My Folder/a.bpel).
* It makes the assumption that the BPEL file is on the file system (in my
case, it's packaged in a jar file)
* It uses the containing directory of the BPEL file as the working
directoy
to create deploy.xml, save the modified bpel file and compile the bpel
files. This can be quite invasive as the directory can be in the cache of
the OSGi bundle data or the maven repo.
* It uses a classloader to search for JPADB with the assumption that the
database is a unzipped folder.
I was aware of some of these issues, but not all. If you haven't done
so, I could take a look at this starting tomorrow. Do you have any
specific steps to reproduce this on a OSGi environment ?
I suggest that we improve the story as follows:
1) select a working directory from the java.io.tmpdir [1]
2) copy the content of the bpel file into the working directory
ODE requires that we copy the WSDL and XSD if any.
3) copy the jpadb from the tuscany-implementation-ode.jar into the
working
directoy too
The best solution here would be to make JPA to create the database
structure for us, there was some discussion about this in the past,
while no progress was made [1], we could revisit this issue.
[1] http://markmail.org/thread/zz2xiqz4qnsg27pa
4) create deploy.xml
5) update the bpel file if necessary
6) compile the bpel files under the working directory and collect the
.cbp
files
[1]
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#createTempFile(java.lang.String,
java.lang.String, java.io.File)
Thanks,
Raymond
---
Raymond Feng
Apache Tuscany PMC Member: http://tuscany.apache.org
Co-author of Tuscany In Action: http://www.manning.com/laws
--
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/