Hi,

we ran into the following problem: we have tried to get all our j2ee
aplications independent of the location they are deployed to, even if a
servlet had to access the local file system (for uploads, getting xsl
templates etc.) by using the getRealPath method in the servlet api and
using everything else relative to that. this way we can rsync the entire
application including all deployment files to different development or
production servers without a change (only datasources have to be configured
globally in the ejb server).

now we would like to access the file system from a session bean (using the
approach rickard proposed in the long thread on programming restrictions)
by encapsulating all file operations in a helper class that's loaded via a
different classloader than the beans. now, how do I get my servlet realpath
(which is the thing we would like to put everything relative to) to the
session bean without putting an absolute path into an ejb deployment file?
I thought about a servlet that autostarts and initializes the helper class
(lets call it "FileStorer") with the base path and registers an instance
with JNDI that then the session bean would lookup and use. Sounds kind of
ugly, doesn't it? Is this possible? Is there a better way that I'm just not
able to see? I have even thought about putting that into the database but
don't like that either. It is really important to us not having to include
any absolute path in an ejb or servlet deployment file.

thanks for any advice on that,

robert

(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to