|Re: EclipseLink persistance.xml Tomcat OSGI [message #496619 is a reply to message #494427]
||Tue, 10 November 2009 16:59
| Thomas Haskes
Registered: July 2009
maybe it is a solution for you you not to use the persistence.xml at
all, as it can be overriden by the use of properties when creating the
emf. This would enable you to retreive the properties form outside the
bundle and put them into the emf. That way you could provide the
settings in a file outside the bundle jar. Im thinking of something like
// retrive the the properties-file from somwhere and load it
// hand it over to the emf, which will override the settings in the
Properties props = loadFromExternalFile();
I think most of the configs can be overriden using the
.... and so on.
> I am working on project which uses EclipseLink and OSGi on Tomcat
> server. If I put persistence.xml in EclipseLink bundle
> (META-INF\persistence.xml) and deploy it in tomcat with bridge.war, it
> works very fine.
> But I want to take out persistence.xml out of bundle jar and put that
> somewhere in Tomcat environment so that DB can be configured without
> changing the bundle jar.
> My question is: Can I put META-INF\persistence.xml in tomcat environment
> where EclipseLink bundle is in bridge\WEB-INF\eclipse\plugin? If yes,
> please suggest me, where should I put it.
> Thank you very much in advance.
Powered by FUDForum
. Page generated in 0.02191 seconds