[ 
https://issues.apache.org/jira/browse/TUSCANY-3460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Nash reopened TUSCANY-3460:
---------------------------------


I'm reopening this issue because I'm not entirely happy with one aspect of this 
solution.

The new jar util/openejb-runtime.jar contains hard-wired path values for the 
location of the OpenEJB runtime, based on the value of the OPENEJB_HOME 
variable when this jar was built.  This is fine for running it on the system on 
which it was built, but not on other systems.

The util/openejb-runtime.jar file is included in the distribution. This is 
necessary because other distribution launcher and service jars need the OpenEJB 
runtime, and these jars are run from the distribution using the "java -jar" 
command which requires all the classpath dependencies to be declared in the 
transitive closure of manifest Class-Path attributes.  The means of supplying 
the required OpenEJB dependencies is the util/openejb-runtime.jar which is 
referenced from the other distribution jars that need these dependencies.

This approach works when building and running the binary distribution locally.  
However it doesn't work if we are planning to release a downloadable binary 
distribution for the travel sample.  This is because a downloadable package 
must not contain hard-wired path values.

The same problem affects the resolution of TUSCANY-3462, which would need to 
add hard-wired path names to the distribution jars to bring in the Tuscany SCA 
runtime dependency.

In summary, it isn't possible to achieve all of the following goals:
 1. Packaging the travel sample without embedding the OpenEJB and Tuscany SCA 
runtimes.
 2. Providing a downloadable binary distribution for the travel sample.
 3. Running the travel sample distribution jars using the "java -jar" command.

I am starting a discussion thread on the dev list to get consensus on how we 
want to proceed with this.  In my opinion the first two goals are more 
important than the third, and we could provide an ant script to run these jars 
as we do for the samples in the Tuscany SCA distribution.   Please respond to 
the discussion thread with comments and suggested solutions.

> Travel sample distribution is missing scatours-launcher-payment-bpel
> --------------------------------------------------------------------
>
>                 Key: TUSCANY-3460
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3460
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Travel Sample
>            Reporter: Simon Nash
>            Assignee: Simon Nash
>
> The distribution output from the travel sample doesn't include 
> scatours-launcher-payment-bpel.jar.
> Unfortunately the solution isn't as simple as just adding this file to the 
> distribution because this creates version conflicts in the distribution lib 
> directory between dependencies brought in by tuscany-implementation-bpel-ode 
> and dependencies brought in by OpenEJB 3.x (which is used by 
> scatours-launcher-notification-ejb and scatours-service-smsgateway-ejb).  
> This is because tuscany-implementation-bpel-ode uses ODE 1.1.1 (an old 
> version) which brings in a number of JEE/Geronimo-related dependencies at 
> older levels than those brought in by OpenEJB 3.x. 
> These conflicts will need to be resolved when OpenEJB 3.x is included in the 
> Tuscany SCA 1.x distribution (see TUSCANY-3437).  For now, the Tuscany SCA 
> 1.6 distribution is based on ODE 1.1.1 and its dependencies, and the travel 
> sample needs to be in sync with this so that it can be released as an add-on 
> to Tuscany SCA 1.6.
> The suggested solution is to refactor the OpenEJB dependencies in the travel 
> sample into a separate module under util (util/openejb-runtime) and not 
> include this module in the dependencies for the travel sample distribution.  
> This keeps the travel sample distribution lib directory in sync with the lib 
> directory of the Tuscany SCA 1.6 binary distribution.  Instead, the OpenEJB 
> dependencies needed by scatours-launcher-notification-ejb and 
> scatours-service-smsgateway-ejb are brought in from the lib directory of the 
> OpenEJB binary distribution.
> This introduces a bit of setup overhead when building the travel sample 
> because the pom.xml for util/openejb-runtime needs the following environment 
> variables to be set so that it can find the necessary OpenEJB dependencies:
>   OPENEJB_HOME: the local directory in which the OpenEJB binary distribution 
> is installed
>   OPENEJB_VERSION: the OpenEJB version installed in the OPENEJB_HOME directory
> This workaround can be removed when OpenEJB is included in the Tuscany SCA 
> 1.x binary distribution.  For now it is needed so that the travel sample can 
> run on top of the combination of the Tuscany SCA 1.6 binary distribution and 
> the OpenEJB binary distribution.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to