Re: Detecting multiple class loaders



Lasse Reichstein Nielsen wrote:
Chris <spam_me_not@xxxxxxxxxx> writes:

No, it's actually only one webapp. It's a data file. Using a database
is not an option. The only approach is to access the file through only
one synchronized class.

Have you considered creating a separate session bean that accesses
the file, and accessing that bean from the web-applications instead
of going directly to the file.

Preferably you can build some sort of transaction control on top of it.


Wouldn't a session bean have exactly the problem he's having now? There will be multiple sessions beans (one per user now, instead of one per webapp) and they'll still need to synchronize amongst themselves on one file?

Obviously, if there is one file per session, then this is an ideal solution, but I didn't read that in the OPs problem statement.
.



Relevant Pages

  • accessing CMP from Session Bean
    ... In my project I have to access in one business method of session bean ... usually more then 10 CMP Beans. ... private static CMP_NAMELocalHome getLocalHomethrows Exception { ...
    (comp.lang.java)
  • Re: JBoss und MDBs
    ... Die MDB wiederum greift auch auf die Entity ... >> Session Bean warten muss.... ... Session Bean zum Erliegen. ... Session Bean bzw. deren Thread herzlich wenig jucken. ...
    (de.comp.lang.java)
  • web ejb architecture
    ... My basic idea for the design was to have a stateless session bean ... A simplified data model for the service contracts looks like this ... The serviceContract I modelled as a CMP entity bean. ...
    (comp.lang.java.developer)
  • Re: EJB3 and BusinessDelegate pattern?
    ... What happens if i build a business delegate that caches the reference ... Will this lock down the session bean for as long ... for one particular client. ...
    (comp.lang.java.programmer)
  • Sharing EJB and notifying client
    ... I am developing an online chess-like game on JBoss. ... The clients are both an applet and an application, ... SessionFacade session bean directly. ...
    (comp.lang.java.programmer)