Thread View: comp.lang.java.programmer
2 messages
2 total messages
Started by wilhelm
Thu, 18 Oct 2001 23:22
EJB and none Thread safe legacy code
Author: wilhelm
Date: Thu, 18 Oct 2001 23:22
Date: Thu, 18 Oct 2001 23:22
19 lines
1854 bytes
1854 bytes
I have a dll which is not thread safe -> legacy code (c/c++/fortran) Is there a way of importing the JNI/DLL so each Statefull Session Bean user can concurrently access to it ? DLL are load in the process space, so there is one load per Application Server This mean that I can have one user at a time....this does not seem a good design, isn't it? Can I spawn a process with each statefull EJB. This process will communicate via RMI and follow the exact same life-cycle state machine as the Statefull Session Bean, this should work, isn't it ? Other idea ? Thanks Wilhelm
Re: EJB and none Thread safe legacy code
Author: Bengt B๏ฟฝverman
Date: Tue, 23 Oct 2001 18:03
Date: Tue, 23 Oct 2001 18:03
35 lines
2742 bytes
2742 bytes
Actually EJB components are NOT ALLOWED to call native methods. You can find this in the back pages of the EJB specification. What you could do is open a socket to another program, outside the EJB container and JVM, that has loaded the DLL and can handle that logic, and communicate with it. Unfortunately you wouldn't gain much from using EJB in that case, unless you already have clients calling EJB components. /BengtB "wilhelm" <wilhelmt@mdli.com> wrote in message news:d1d4144b.0110181522.21332a64@posting.google.com... > I have a dll which is not thread safe -> legacy code (c/c++/fortran) > Is there a way of importing the JNI/DLL so each Statefull Session Bean > user > can concurrently access to it ? > > DLL are load in the process space, so there is one load per > Application Server > This mean that I can have one user at a time....this does not seem a > good design, isn't it? > > Can I spawn a process with each statefull EJB. This process will > communicate via RMI and follow the exact same life-cycle state machine > as the Statefull Session Bean, this should work, isn't it ? > > Other idea ? > > Thanks > > Wilhelm
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads