A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
EJB and other Java EE Technologies
Load .mdb file from EJB
De La Hai
Joined: Jun 04, 2008
Jun 24, 2008 22:24:00
I have a *.mdb file deployed within my ear. Which is located on Glassfish server like this:
The problem is that from
perspective you can only use ClassLoader.getSystemResource(
) or equivalents of ClassLoader.methods.
However this leads me to deploy the .mdb database within a Jar. in my
I would like to have it stored in EarContent of my project and access it from there. Is there any possibility to access files that are deployed along the ear from ejb context ?
I tried to get the context path of the ejb session , by using
but this doesn't really help much, as it only points to a path on the server and not on my project.
Can someone help me out, or point out whats wrong with the idea ?
PS: I know that it is against the restrictions of EJB, to access files in the filesystem. But it's more convenient to have the mdb file deployed within the ear for me.
I agree. Here's the link:
subject: Load .mdb file from EJB
How can i get a resource using relative path ?
deleting a file in the same context from servlet!
Deploy MS Access DB on Server
Making things work...
EJB in WAR Accessible from Components in Other Modules?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014