Article View: comp.lang.java.programmer
Article #245Re: EJB and none Thread safe legacy code
From: 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
Technical Details
Message-ID:
<vhiB7.2060$Z_1.382448@newsc.telia.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.algonet.se!algonet!news-stob.telia.net!news-sto.telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mailReferences:
<d1d4144b.0110181522.21332a64@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcfbb,1806e1854d3bca2c X-Google-Attributes: gidfcfbb,public X-Google-Thread: 1090f0,1806e1854d3bca2c X-Google-Attributes: gid1090f0,public X-Google-Thread: fcfb6,1806e1854d3bca2c X-Google-Attributes: gidfcfb6,public X-Google-Thread: 10a146,1806e1854d3bca2c X-Google-Attributes: gid10a146,public X-Google-Thread: 102719,1806e1854d3bca2c X-Google-Attributes: gid102719,public X-Google-ArrivalTime: 2001-10-23 11:10:09 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.algonet.se!algonet!news-stob.telia.net!news-sto.telia.net!194.22.194.4.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: "Bengt B�verman" <bengt@baverman.se> Newsgroups: comp.lang.java.programmer,comp.lang.java.beans,weblogic.developer.interest.ejb,borland.public.appserver.ejb,ibm.software.websphere.application-server References: <d1d4144b.0110181522.21332a64@posting.google.com> Subject: Re: EJB and none Thread safe legacy code Lines: 37 Organization: B�verman Konsult X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <vhiB7.2060$Z_1.382448@newsc.telia.net> Date: Tue, 23 Oct 2001 18:03:07 GMT NNTP-Posting-Host: 217.208.95.216 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1003860187 217.208.95.216 (Tue, 23 Oct 2001 20:03:07 CEST) NNTP-Posting-Date: Tue, 23 Oct 2001 20:03:07 CEST