Finding project.xml file in jar using sessions.xml

View: New views
4 Messages — Rating Filter:   Alert me  

Finding project.xml file in jar using sessions.xml

by polly.c.chang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The workbench generates file paths like this in the sessions.xml file:

      <primary-project xsi:type="xml">C:/full/path/to/my/project.xml</primary-project>

I want to refer to a file that is in a jar.  I noticed this documentation mentions something about a <jar> element:

http://wiki.eclipse.org/Packaging_a_EclipseLink_Application_(ELUG)#Packaging_with_EclipseLink_Metadata_File_Resource_Paths

So my questions are:

1.  Where do I put this <jar> element?  

2.  If I have the project.xml file in a jar file, do I have to use the SessionManager to get the Session as documented?  I'm currently using Spring-WS integration and the Session auto-magically gets found when I use hard-coded paths for the project.xml files.  I'd like to keep it that way if possible.

Thanks,
Polly

Re: Finding project.xml file in jar using sessions.xml

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just give a relative resource path to project.xml file.  As long as it is on the resource classpath it will be found.  i.e. "/META-INF/project.xml".

amphoras wrote:
Hi,

The workbench generates file paths like this in the sessions.xml file:

      <primary-project xsi:type="xml">C:/full/path/to/my/project.xml</primary-project>

I want to refer to a file that is in a jar.  I noticed this documentation mentions something about a <jar> element:

http://wiki.eclipse.org/Packaging_a_EclipseLink_Application_(ELUG)#Packaging_with_EclipseLink_Metadata_File_Resource_Paths

So my questions are:

1.  Where do I put this <jar> element?  

2.  If I have the project.xml file in a jar file, do I have to use the SessionManager to get the Session as documented?  I'm currently using Spring-WS integration and the Session auto-magically gets found when I use hard-coded paths for the project.xml files.  I'd like to keep it that way if possible.

Thanks,
Polly

Re: Finding project.xml file in jar using sessions.xml

by polly.c.chang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi James,

Thanks for the quick reply.  I just want to confirm--there's no need to give the name of the jar that the project.xml is in?  I am expecting my project.xml and sessions.xml files to be in different jars.

Thanks,
Polly



Just give a relative resource path to project.xml file.  As long as it is on the resource classpath it will be found.  i.e. "/META-INF/project.xml".

amphoras wrote:
Hi,

The workbench generates file paths like this in the sessions.xml file:

      <primary-project xsi:type="xml">C:/full/path/to/my/project.xml</primary-project>

I want to refer to a file that is in a jar.  I noticed this documentation mentions something about a <jar> element:

http://wiki.eclipse.org/Packaging_a_EclipseLink_Application_(ELUG)#Packaging_with_EclipseLink_Metadata_File_Resource_Paths

So my questions are:

1.  Where do I put this <jar> element?  

2.  If I have the project.xml file in a jar file, do I have to use the SessionManager to get the Session as documented?  I'm currently using Spring-WS integration and the Session auto-magically gets found when I use hard-coded paths for the project.xml files.  I'd like to keep it that way if possible.

Thanks,
Polly


Re: Finding project.xml file in jar using sessions.xml

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, as long as the jar is on the classpath.



Hi James,

Thanks for the quick reply.  I just want to confirm--there's no need to give the name of the jar that the project.xml is in?  I am expecting my project.xml and sessions.xml files to be in different jars.

Thanks,
Polly


James Sutherland wrote:
Just give a relative resource path to project.xml file.  As long as it is on the resource classpath it will be found.  i.e. "/META-INF/project.xml".