Note that there are some explanatory texts on larger screens.

plurals
  1. POGlobally accessible property in EJB
    primarykey
    data
    text
    <p>I have a JavaEE application that needs to access a file in order to obtain certain informations about the installation.</p> <p>This access is read-only, I do not need to change that file within the application, i.e. I do not need the "file" directly, just it's content (a byte array).</p> <p>There's a restriction on EJBs using the filesystem. I do understand the problems associated with it but I can't figure out a alternative solution to this.</p> <p>The file path should be configurable by the user, but there's no need to track changes to the file contents. Once loaded, it stays the same unless the user choose another file. So, I can't package it within the application archive.</p> <p>This file-based approach is a decision made long time ago by some legacy systems we have. There's no practical way to change it now, i.e. I need that my JavaEE application uses the file (at least once) to load it's content.</p> <p>Another restriction is that this file can not be persisted on the database.</p> <p>How should I do this without violating the EJB restriction of filesystem access?</p> <p>I thought about user uploading the file to the server and then persisting this information on the server. But how do I do this? This information should be globally accessible, including multiple instances of the server (e.g. in a cluster architecture).</p> <p>The user should configure this file once (not necessarily within the main application, it could be other app just to configure this). Even if the server restart, the file's content should still be accessible without any further configuration by the user.</p> <p>I'm using JavaEE 5 with EJB 3.0 specification on a GlassFish v2.1.1 server.</p> <p>Thanks, Thiago.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload