tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anas4120 <anas_t...@yahoo.fr>
Subject Resource reference mecanism
Date Wed, 08 Feb 2012 13:11:17 GMT
Hello,

My environement is: openejb 4.1.4 webapp deployed in tomcat 6.0.29

I develop a webapp "mywebapp" in witch a java bean use a file path entry to
get data from a file. To do that I use the injection onf env entry like
described in
http://openejb.apache.org/examples-trunk/injection-of-env-entry/README.html. 

In java bean
...
@Resource
private String myfilepath;
...

In ejb-jar.xml

....
<env-entry>
<env-entry-name>MyClass/myfilepath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
 <env-entry-value>/tmp/datafile.data</env-entry-value>
</env-entry>
....


Now the business have chaned and I a must deloy 2 instances of the same
webapp but with different file path. I need to do that without modify the
webapp war. So I think at the resource-ref mecanism. 

Can some one explain me how to do that ?

Thank U. 




--
View this message in context: http://openejb.979440.n4.nabble.com/Resource-reference-mecanism-tp4369367p4369367.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message