-----Original Message----- From: Automatic digest processor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 2:00 AM To: Recipients of EJB-INTEREST digests Subject: EJB-INTEREST Digest - 5 Mar 2001 to 6 Mar 2001 (#2001-66) There are 24 messages totalling 1389 lines in this issue. Topics of the day: 1. restriction on Stateless Session Beans (4) 2. Stateless and Statefull (4) 3. Problem while running client (2) 4. All new! - Investigate Anyone or Anything now! 5. EJB container, back office systems and sockets (10) 6. problem getting InitialContext.... 7. signoff (to moderator of the list) 8. Trip planning problem... transactoin attributes? =========================================================================== 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". ---------------------------------------------------------------------- Date: Tue, 6 Mar 2001 16:18:17 +0530 From: sOUMYA dUTTA <[EMAIL PROTECTED]> Subject: restriction on Stateless Session Beans Could someone tell me why should the Stateless Session Bean not be allowed to implement the SessionSynchronization interface? Thanks, - Dutta. ------------------------------ Date: Tue, 6 Mar 2001 02:42:46 -0800 From: Hariharan N <[EMAIL PROTECTED]> Subject: Stateless and Statefull Could anyone (with a sample application) demonstrate the exact difference between Statefull and Stateless bean. Say for example in the sample application(may be with one function) when <session-type>Stateful</session-type> tag in the ejb-jar.xml is changed to <session-type>Stateless</session-type> should show the persistence which happens with statefull and not with stateless!!! Also explain clearly with respect to the sample app. the underground process. Like when this sample app is invoked as a statefull then it should maintain state etc.. Also how does app server maintain client state??? thro' cookies or machine IP etc... Thanks!! ------------------------------ Date: Tue, 6 Mar 2001 16:26:40 +0530 From: Ashwani Kalra <[EMAIL PROTECTED]> Subject: Re: Stateless and Statefull Hi, If you are asking from the application server point of view then . There is no such thing like cookies etc. The state is maintained by not pooling the statefull bean instances. It remains bound to the client through out its life cycle till it gets destroyed.Obvious the client has to have the reference to this bean through remote reference which should be held in session on the client ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warm Regards Ashwani Kalra Sr. Member Dev. Staff Aithent Technologies(P) Ltd. Email : [EMAIL PROTECTED] [EMAIL PROTECTED] Phone : 91- 6346338,6397836-37,6397533 6397324,6397277 Ext :307 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Hariharan N Sent: Tuesday, March 06, 2001 4:13 PM To: [EMAIL PROTECTED] Subject: Stateless and Statefull Could anyone (with a sample application) demonstrate the exact difference between Statefull and Stateless bean. Say for example in the sample application(may be with one function) when <session-type>Stateful</session-type> tag in the ejb-jar.xml is changed to <session-type>Stateless</session-type> should show the persistence which happens with statefull and not with stateless!!! Also explain clearly with respect to the sample app. the underground process. Like when this sample app is invoked as a statefull then it should maintain state etc.. Also how does app server maintain client state??? thro' cookies or machine IP etc... Thanks!! =========================================================================== 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". ------------------------------ Date: Tue, 6 Mar 2001 16:40:56 +0530 From: Harvinder Singh <[EMAIL PROTECTED]> Subject: Re: restriction on Stateless Session Beans As we know that in the case of session beans instance variables are not transactional. We implement SessionSynchronization interface in session bean to make instance variable in sync with database/initial val i.e. during the course of transaction you modified yr beans instance variables and then transaction is rolled back, so by using callback methods of SessionSynchronization interface (like beforeCompletion() or afterCompletion()) that can be achieved. In the case of stateless session beans we dont have any instance variable becos we dont want to maintain any state, so no question of such synchronization. I hope i answered you. Regards, Harvinder -----Original Message----- From: sOUMYA dUTTA [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 06, 2001 4:18 PM To: [EMAIL PROTECTED] Subject: restriction on Stateless Session Beans Could someone tell me why should the Stateless Session Bean not be allowed to implement the SessionSynchronization interface? Thanks, - Dutta. =========================================================================== 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". ------------------------------ Date: Tue, 6 Mar 2001 06:24:58 -0500 From: "Alex, Prince Jacob (CTS)" <[EMAIL PROTECTED]> Subject: Re: Problem while running client Hi there, Check if you have specified the <jndi-name> properly in weblogic-ejb-jar.xml file. prince > -----Original Message----- > From: vikram veeravelu [SMTP:[EMAIL PROTECTED]] > Sent: Monday, March 05, 2001 12:50 PM > To: [EMAIL PROTECTED] > Subject: Problem while running client > > Hello, > I am new to ejb ,I had a problem while running a > client ,I through a exception by name > javax.naming.NameNotFoundException:'HelloHome'; > Remaining Name:'HelloHome'. > I am using stateless session bean in weblogic > server.Using DDCreator utility,i created manifest and > jar file sussesfully. > And also i changed weblogic property file. > > My program is given below: > 1) > > import javax.ejb.*; > import java.rmi.*; > public interface Hello extends EJBObject > { > String sayHello(String s) throws RemoteException; > } > > 2) > import javax.ejb.*; > public interface HelloHome extends EJBHome > > { > public Hello create() throws java.rmi.RemoteException, > javax.ejb.CreateException; > } > > > 3) > > import javax.ejb.*; > > public class HelloBean implements SessionBean > { > SessionContext ctx; > public void ejbCreate() > { > } > public String sayHello(String s) > { > return "Hello There,"+s; > } > public void ejbRemove() > { > } > public void ejbPassivate() > { > } > public void ejbActivate() > { > } > public void setSessionContext(SessionContext ctx) > { > this.ctx = ctx; > } > } > > 4) > Client program > > import java.rmi.*; > import javax.naming.*; > public class HelloClient > { > public static void main(String arg[]) > { > try > { > InitialContext ic = new InitialContext(); > HelloHome home=(HelloHome) ic.lookup("HelloHome"); > Hello hel= home.create(); > String retval=hel.sayHello("VIKRAM"); > System.out.println("returned:"+retval); > hel.remove(); > } > catch(java.rmi.RemoteException e) > { > System.out.println("remote exception occured:"+e); > } > catch(javax.ejb.CreateException e) > { > System.out.println("create exception occured:"+e); > } > catch(javax.ejb.RemoveException e) > { > System.out.println("remote exception occured:"+e); > } > catch(javax.naming.NamingException e) > { > System.out.println("naming exception occured:"+e); > } > } > } > > all the programs I am writing in the directory by name > > d:\ejb including client.I am compiling all the program > in the same directory. > If i write package statement in the program i can't > able to create > DD.ser file. > Please help me in this problem.wheater i have to > import any other > things to the client program. > > > > I set my classpath properyly.Please help me in this.I > also change my weblogic property file > ie > weblogic.ejb.deploy=/d:\weblogic\classes\HelloBean.jar;/ > d:\weblogic is the directory where i store weblogic > server. > I am using weblogic 4.5.1 server.Because of that i > gives me error or > else i have to use higher version. > > > > > > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > ========================================================================== > = > 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". This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful... Visit us at http://www.cognizant.com ------------------------------ Date: Tue, 6 Mar 2001 13:24:54 +0200 From: Avi Kivity <[EMAIL PROTECTED]> Subject: Re: restriction on Stateless Session Beans > > Could someone tell me why should the Stateless Session Bean > not be allowed > to implement the SessionSynchronization interface? > It is meaningless - SessionSynchronization's methods are called when the transaction commits or aborts. At that time, however, the SLSB can be assigned to another client. There is no place to keep the state for the operation you want to perform at commit or abort time. - Avi -- And now for something completely different. ------------------------------ Date: Fri, 2 Mar 2001 20:34:04 -0800 From: [EMAIL PROTECTED] Subject: All new! - Investigate Anyone or Anything now! <HTML><HEAD><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-8859-1"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> </HEAD> <BODY bgColor=3D#eeeeff> <DIV> <TABLE width=3D"100%" border=3D0> <TBODY>=20 <TR bgColor=3D#000099 valign=3D"middle" align=3D"center">=20 <TD><font size=3D"6" face=3D"Arial, Helvetica, sans-serif"=20 color=3D"#FFFFFF"><b><font color=3D"#FFFF99">INTERNET=20 INVESTIGATOR</font></b></font> <font color=3D"#FFFF99" face=3D"Aria= l,=20 Helvetica, sans-serif" size=3D"6">™</font></TD> </TR></TBODY></TABLE> <P align=3Dcenter><B><FONT face=3D"Arial, Helvetica, sans-serif" color=3D= #000000=20 size=3D5>All <FONT color=3D#ff0000>NEW</FONT> for <font=20 color=3D"#0000cc">2001</font></FONT><FONT=20 face=3D"Arial, Helvetica, sans-serif"><BR> </FONT></B><FONT=20 face=3D"Arial, Helvetica, sans-serif" size=3D4><B> Internet Software Progra= m for=20 Online=20 Investigation</B></FONT></P> <P align=3Dcenter><B><FONT face=3D"Arial, Helvetica, sans-serif" color=3D= #0000cc=20 size=3D5>Find out Anything about </FONT></B><B><FONT=20 face=3D"Arial, Helvetica, sans-serif" color=3D#0000cc size=3D5> Anyone=20 Online</FONT></B></P> <P align=3Dcenter><FONT face=3D"Arial, Helvetica, sans-serif" color=3Dbla= ck=20 size=3D5><B><font size=3D"4" color=3D"#000000">Become an "Internet Investig= ator"=20 and=20 explore a whole new world of<br> valuable information.<br> <br> </font></B></FONT><FONT=20 face=3D"Arial, Helvetica, sans-serif"><B><FONT size=3D4>Uncover Information= =20 about:<br> </FONT></B><FONT color=3D#000099> <B>Neighbors, Friends, Enemies, Debto= rs,=20 Employees,=20 Your Boss, Yourself... <br> <font size=3D"3">even a New Love In</font>terest<br> <br> </B></FONT></FONT><font face=3D"Arial, Helvetica, sans-serif" color=3Db= lack=20 size=3D5><b><font size=3D"4" color=3D"#000000"> <font size=3D"3">You can In= vestigate=20 <font color=3D"#FF0000">ANYTHING</font>=20 and <font color=3D"#FF0000">ANYONE:</font></font></font></b></font><br> <b><font size=3D"2" face=3D"Arial, Helvetica, sans-serif"=20 color=3D"#000099">Locate=20 people and their - credit - social security - military - school - drivi= ng=20 - or criminal records - age - employment history - addresses - phone=20 numbers=20 (some unlisted) - locate hidden assets - car they drive - value of=20 home<br> check family trees - and much, much more... </font></b></P> <P align=3Dcenter><font face=3D"Arial, Helvetica, sans-serif" size=3D"4">= <b><font=20 color=3D"#FF0000">For=20 more information </font><font color=3D"#CCCCCC"><font color=3D"#3300CC"= ><a=20 href=3D"http://www.bigdreaming.com/iia">Click=20 Here</a>!</font></font></b></font></P> <hr> <p><font face=3D"Verdana, Arial, Helvetica, sans-serif" size=3D"2">All re= quests=20 to be taken off our mailing list are honored Immediately and=20 AUTOMATICALLY=20 upon receipt.</font></p> <p><a href=3D"mailto:[EMAIL PROTECTED]?subject=3Ddelete"><font size=3D"+= 1"=20 face=3D"Verdana, Arial, Helvetica, sans-serif"><b><font size=3D"3">Click=20 here to be taken off our mailing list.</font></b></font></a></p> <p><font size=3D"2" face=3D"Verdana, Arial, Helvetica, sans-serif">PLEASE= know=20 that=20 efforts to disrupt, close or block this Link to our "Removal=20 List"=20 can ONLY result in difficulties and prevention of others who desire=20 removal=20 from our mailing list.</font></p> <hr> <p><font size=3D"2" face=3D"Verdana, Arial, Helvetica, sans-serif">ARE YO= U=20 AWARE=20 THAT... each year, over 400 million trees are cut down in order to=20 provide=20 the paper for the "postal" bulk mail industry in the United=20 States?=20 By using e-mail instead, we can significantly reduce this unessary=20 consumption=20 as well as decrease the billions of tons of resulting waste material th= at=20 clogs our landfills. </font><font color=3D#ff0000=20 size=3D+1><a href=3D"http://www.environmentaldefense.org/issues/Recycling. html"><font size=3D"3" face=3D"Verdana, Arial, Helvetica, sans-serif"><b>SA= VE=20 THE TREES, SAVE THE PLANET, USE E-MAIL INSTEAD!</b></font></a></font></= p> </DIV></BODY></HTML> ------------------------------ Date: Tue, 6 Mar 2001 13:10:54 +0100 From: Marco Pas <[EMAIL PROTECTED]> Subject: EJB container, back office systems and sockets 13:05 / 6-3-2001 In our application (running on WL 5.1 Servicepack 8) we have to access a remote machine via a socket connection, this to retrieve remote data. I know this is not in the specs but we have to do so ! When the remote machine is ok the socket connection is accepted very quickly. But when the remote system is ofline it takes about 2 minutes to get an answer back from the socket. (a timeout occurs) If i have a lot of requests this fills all my available threads on waiting back-office systems. Does anyone know how to tackle this problem, i want to check if the remote system is alive and capable of answering ! regards, Marco Pas ------------------------------ Date: Tue, 6 Mar 2001 17:48:25 +0530 From: [EMAIL PROTECTED] Subject: Re: Problem while running client hey u should instead write down the code of " DDCreator.Ser ". You will have to make a proper entry for Your bean in the Serialized file via DeploymentDescriptor. And make sure you are working on a Architecture that was EJB1.0 draft which has been deprecated by the EJB1.1 draft .So when the sun has launched EJB2.0 draft you are working on EJB1.0 Model.You need to check which version of EJB is supported by weblogic you are using. *********************** enJoy Life with Technology *********************** pirbhu ------------------------------ Date: Tue, 6 Mar 2001 09:47:30 -0300 From: Sven van =?ISO-8859-1?Q?=B4t?= Veer <[EMAIL PROTECTED]> Subject: Re: Stateless and Statefull I think you should be better off reading a book on EJB. Changing the deployment descriptor for a bean from stateless to statefull does noet really make much sence. It´s a design question! A ShoppingCartBean is a typical example for a Statefull session bean (you would want the shopping cart to hold the items you buy now wouldn´t you) the BuyEverytingThatsInYourShoppingCartBean is a typical example of a Sateless session bean. When at K-Mart you use the cashier once and you surely would not want it to maintain state for you (Keep your creditcard number etc). It does nat make any sence to change the SoppingCartBean to stateless (unless ofcource you are going to maintain state at the web application) and it does even make less sence to make BuyEverytingThatsInYourShoppingCartBean statefull since all it does is something like BuyEverytingThatsInYourShoppingCartBean.buy(Cart c) There is no real definition for the underground process, it has different implementations for each app server. The specs don´t say anything on how this process works, all it says s that Statefull beans maintain information on behalf of the clients and stateless don´t. In general Stateless session beans are maintained in a pool and the app server picks one from the pool whenever it´s needed. Statefull session beans cannot be pooled, they´re passivated whenever the app server thinks it´s necessary (their fields should be serialized and stored). Cookies and Machine IP have nothing to do with App Servers, that´s web server. An HTTP Session is something completely different (http is a stateless protocol) Sven Hariharan N wrote: > Could anyone (with a sample application) demonstrate the exact difference > between Statefull and Stateless bean. Say for example in the sample > application(may be with one function) when > <session-type>Stateful</session-type> tag in the ejb-jar.xml is changed to > <session-type>Stateless</session-type> should show the persistence which > happens with statefull and not with stateless!!! > Also explain clearly with respect to the sample app. the underground > process. Like when this sample app is invoked as a statefull then it should > maintain state etc.. > > Also how does app server maintain client state??? thro' cookies or machine > IP etc... > Thanks!! > > =========================================================================== > 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". > > ------------------------------ Date: Tue, 6 Mar 2001 13:01:36 -0000 From: John Harby <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets This sounds like a good candidate for JMS. >From: Marco Pas <[EMAIL PROTECTED]> >Reply-To: Marco Pas <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: EJB container, back office systems and sockets >Date: Tue, 6 Mar 2001 13:10:54 +0100 > >13:05 / 6-3-2001 > > > In our application (running on WL 5.1 Servicepack 8) we have to access >a remote > machine via a socket connection, this to retrieve remote data. > I know this is not in the specs but we have to do so ! > > When the remote machine is ok the socket connection is accepted > very quickly. But when the remote system is ofline it takes about 2 > minutes to get an answer back from the socket. (a timeout occurs) > > If i have a lot of requests this fills all my available threads on > waiting back-office systems. > > Does anyone know how to tackle this problem, i want to check if the > remote system is alive and capable of answering ! > > regards, > Marco Pas > >=========================================================================== >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". > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com ------------------------------ Date: Tue, 6 Mar 2001 14:27:00 +0100 From: Marco Pas <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets 14:26 / 6-3-2001 JMS seems to me as a solution for a-synchronous messaging. I want (near)real-time information.. Do you still think JMS is an option ? Or do you have other suggestions ? groeten / regards, Marco Pas CMG Trade, Transport & Industry B.V. -------------------------------------------- JH> This sounds like a good candidate for JMS. >>From: Marco Pas <[EMAIL PROTECTED]> >>Reply-To: Marco Pas <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Subject: EJB container, back office systems and sockets >>Date: Tue, 6 Mar 2001 13:10:54 +0100 >> >>13:05 / 6-3-2001 >> >> >> In our application (running on WL 5.1 Servicepack 8) we have to access >>a remote >> machine via a socket connection, this to retrieve remote data. >> I know this is not in the specs but we have to do so ! >> >> When the remote machine is ok the socket connection is accepted >> very quickly. But when the remote system is ofline it takes about 2 >> minutes to get an answer back from the socket. (a timeout occurs) >> >> If i have a lot of requests this fills all my available threads on >> waiting back-office systems. >> >> Does anyone know how to tackle this problem, i want to check if the >> remote system is alive and capable of answering ! >> >> regards, >> Marco Pas >> >>========================================================================== = >>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". >> JH> _________________________________________________________________ JH> Get your FREE download of MSN Explorer at http://explorer.msn.com JH> =========================================================================== JH> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body JH> of the message "signoff EJB-INTEREST". For general help, send email to JH> [EMAIL PROTECTED] and include in the body of the message "help". ------------------------------ Date: Tue, 6 Mar 2001 14:38:28 +0100 From: Sacha Labourey <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets Hello Marco, > JMS seems to me as a solution for a-synchronous messaging. > I want (near)real-time information.. JMS can be very efficient. You need to decide what you mean by "near real-time". a few seconds? mili-seconds? ... Anyway, if your current system is willing to accept waiting 2 minutes for a timeout to occur, I am sure that JMS will be more than efficient for this task ;) > Do you still think JMS is an option ? > Or do you have other suggestions ? You may have a subsystem that continously checks for available data on this server through sockets. When data is found, it is forwarded in a JMS message. On your EJB server, a Message Driven Bean (MDB) would then automagically receive this message and take appropriate action (call another bean, ...) cheers, Sacha ------------------------------ Date: Tue, 6 Mar 2001 14:52:28 -0000 From: Krishnan Subramanian <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets Hi Marco, I would suggest using the Socket class's "setSoTimeout(int milliseconds)" i.e. only if you *absolutely* need to use the socket class. I noticed that you were using WLS 5.1, and if you are doing this from within your EJB's, this is restricted by the EJB spec 1.1 (If WLS indeed allows it, as you mention, you might need to take into account that other EJB vendors might be more 'strict' and hence your code might not be portable across containers) -krish > >From: Marco Pas <[EMAIL PROTECTED]> > >Reply-To: Marco Pas <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: EJB container, back office systems and sockets > >Date: Tue, 6 Mar 2001 13:10:54 +0100 > > > >13:05 / 6-3-2001 > > > > > > In our application (running on WL 5.1 Servicepack 8) we have to access > >a remote > > machine via a socket connection, this to retrieve remote data. > > I know this is not in the specs but we have to do so ! > > > > When the remote machine is ok the socket connection is accepted > > very quickly. But when the remote system is ofline it takes about 2 > > minutes to get an answer back from the socket. (a timeout occurs) > > > > If i have a lot of requests this fills all my available threads on > > waiting back-office systems. > > > > Does anyone know how to tackle this problem, i want to check if the > > remote system is alive and capable of answering ! > > > > regards, > > Marco Pas > > > >=========================================================================== > >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". > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > =========================================================================== > 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". > > ------------------------------ Date: Tue, 6 Mar 2001 13:56:46 -0000 From: John Harby <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets The only other way I've used in these situations is to write a native lib (dll or so) that can serve as a facade for select() calls. Then some Java object can call into it using JNI. Java doesn't support select() unfortunately. Here's a link: http://developer.java.sun.com/developer/bugParade/bugs/4075058.html >From: Marco Pas <[EMAIL PROTECTED]> >Reply-To: Marco Pas <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: EJB container, back office systems and sockets >Date: Tue, 6 Mar 2001 14:27:00 +0100 > >14:26 / 6-3-2001 > > JMS seems to me as a solution for a-synchronous messaging. > I want (near)real-time information.. > > Do you still think JMS is an option ? > Or do you have other suggestions ? > > groeten / regards, > Marco Pas > CMG Trade, Transport & Industry B.V. > >-------------------------------------------- > >JH> This sounds like a good candidate for JMS. > > > >>From: Marco Pas <[EMAIL PROTECTED]> > >>Reply-To: Marco Pas <[EMAIL PROTECTED]> > >>To: [EMAIL PROTECTED] > >>Subject: EJB container, back office systems and sockets > >>Date: Tue, 6 Mar 2001 13:10:54 +0100 > >> > >>13:05 / 6-3-2001 > >> > >> > >> In our application (running on WL 5.1 Servicepack 8) we have to >access > >>a remote > >> machine via a socket connection, this to retrieve remote data. > >> I know this is not in the specs but we have to do so ! > >> > >> When the remote machine is ok the socket connection is accepted > >> very quickly. But when the remote system is ofline it takes about 2 > >> minutes to get an answer back from the socket. (a timeout occurs) > >> > >> If i have a lot of requests this fills all my available threads on > >> waiting back-office systems. > >> > >> Does anyone know how to tackle this problem, i want to check if the > >> remote system is alive and capable of answering ! > >> > >> regards, > >> Marco Pas > >> > >>========================================================================== = > >>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". > >> > >JH> _________________________________________________________________ >JH> Get your FREE download of MSN Explorer at http://explorer.msn.com > >JH> >=========================================================================== >JH> To unsubscribe, send email to [EMAIL PROTECTED] and include in the >body >JH> of the message "signoff EJB-INTEREST". For general help, send email to >JH> [EMAIL PROTECTED] and include in the body of the message "help". > >=========================================================================== >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". > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com ------------------------------ Date: Tue, 6 Mar 2001 15:02:37 +0100 From: Sacha Labourey <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets Hello, Beans are allowed to be socket clients (but not socket server). Consequently, what he does seems legal : "The EJB architecture allows an enterprise bean instance to be a network socket client, but it does not allow it to be a network server." (p277) Cheers, Sacha > i.e. only if you *absolutely* need to use the socket class. > I noticed that you were using WLS 5.1, and if you > are doing this from within your EJB's, this is restricted > by the EJB spec 1.1 (If WLS indeed allows it, as you > mention, you might need to take into account that > other EJB vendors might be more 'strict' and hence > your code might not be portable across containers) ------------------------------ Date: Tue, 6 Mar 2001 19:44:01 +0500 From: "B, Chandrasekhar" <[EMAIL PROTECTED]> Subject: problem getting InitialContext.... Hi all, I have a constructor in DAO(Data Access Object) which gets InitialContext. I am using this DAO in my EJB. its working fine if i use this DAO independently. The problem is when i use this DAO in my EJB it couldn't get me the context and giving the following exception. java.rmi.RemoteException: Weblogic RemoteException(weblogic.rmi.ServerError) remapped from:weblogic.rmi.ServerError: A RemoteException occurred in the server method - with nested exception: [java.lang.NoClassDefFoundError: javax/naming/NamingException]; nested exception is: weblogic.rmi.ServerError: A RemoteException occurred in the server method - with nested exception: [java.lang.NoClassDefFoundError: javax/naming/NamingException] java.lang.NoClassDefFoundError: javax/naming/NamingException at com.qpi.components.instrument.entity.InstrumentDAO.<init>(InstrumentDAO.java :35) at com.qpi.components.instrument.entity.InstrumentEntityEJB.ejbFindByPrimaryKey (InstrumentEntityEJB.java:140) at com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl.findByPrima ryKey(InstrumentEntityEJBHomeImpl.java:81) at com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl_WLSkel.invo ke(InstrumentEntityEJBHomeImpl_WLSkel.java:90) at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda pter.java, Compiled Code) at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle r.java:69) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1 5) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code) --------------- nested within: ------------------ weblogic.rmi.ServerError: A RemoteException occurred in the server method - with nested exception: [java.lang.NoClassDefFoundError: javax/naming/NamingException] at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76) at com.qpi.components.instrument.entity.InstrumentEntityEJBHomeImpl_WLStub.find ByPrimaryKey(InstrumentEntityEJBHomeImpl_WLStub.java:222) at com.qpi.components.instrument.entity.GetInstrumentEntityDetails.main(GetInst rumentEntityDetails.java:25) CODE FOR THIS: ----------------------- public InstrumentDAO() throws InstrumentDAOException{ try { System.out.println("before ic context"); InitialContext ic1 = new InitialContext(); System.out.println("after ic context"); ds = (DataSource) ic1.lookup("weblogic.jdbc.jts.MCRSPool"); } catch(NamingException ne) { throw new InstrumentDAOException("Naming Exception while looking "+ " up DataSource Connection weblogic.jdbc.jts.MCRSPool: \n" + ne.getMessage()); } } in ejb i am instantiating DAO like this InstrumentDAO iDao = new InstrumentDAO(); can anybody help me.... Thanx in advance chandra. ------------------------------ Date: Tue, 6 Mar 2001 15:48:04 +0100 From: Marco Pas <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets 15:42 / 6-3-2001 Krishnan, I just want to test on the existence of the remote system, and the ability to reply ! The socket class you mention creates a socket and waits until the socket is connected or gets a timeout. If it is connected no problem, but when the system is offline the timeout could be around 2 to 10 seconds for example. This is not ok for me. I want an immediate reply from the socket if the system is offline. Maybe a java ping/telnet on a specific port would be sufficient, but this is not implemented in Java. groeten / regards, Marco Pas CMG Trade, Transport & Industry B.V. -------------------------------------------- KS> Hi Marco, KS> I would suggest using the Socket class's KS> "setSoTimeout(int milliseconds)" KS> i.e. only if you *absolutely* need to use the socket class. KS> I noticed that you were using WLS 5.1, and if you KS> are doing this from within your EJB's, this is restricted KS> by the EJB spec 1.1 (If WLS indeed allows it, as you KS> mention, you might need to take into account that KS> other EJB vendors might be more 'strict' and hence KS> your code might not be portable across containers) KS> -krish >> >From: Marco Pas <[EMAIL PROTECTED]> >> >Reply-To: Marco Pas <[EMAIL PROTECTED]> >> >To: [EMAIL PROTECTED] >> >Subject: EJB container, back office systems and sockets >> >Date: Tue, 6 Mar 2001 13:10:54 +0100 >> > >> >13:05 / 6-3-2001 >> > >> > >> > In our application (running on WL 5.1 Servicepack 8) we have to KS> access >> >a remote >> > machine via a socket connection, this to retrieve remote data. >> > I know this is not in the specs but we have to do so ! >> > >> > When the remote machine is ok the socket connection is accepted >> > very quickly. But when the remote system is ofline it takes about 2 >> > minutes to get an answer back from the socket. (a timeout occurs) >> > >> > If i have a lot of requests this fills all my available threads on >> > waiting back-office systems. >> > >> > Does anyone know how to tackle this problem, i want to check if the >> > remote system is alive and capable of answering ! >> > >> > regards, >> > Marco Pas >> > >> >>========================================================================== = >> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the KS> body >> >of the message "signoff EJB-INTEREST". For general help, send email to >> >[EMAIL PROTECTED] and include in the body of the message "help". >> > >> >> _________________________________________________________________ >> Get your FREE download of MSN Explorer at http://explorer.msn.com >> >> KS> =========================================================================== >> To unsubscribe, send email to [EMAIL PROTECTED] and include in the KS> body >> of the message "signoff EJB-INTEREST". For general help, send email to >> [EMAIL PROTECTED] and include in the body of the message "help". >> >> KS> =========================================================================== KS> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body KS> of the message "signoff EJB-INTEREST". For general help, send email to KS> [EMAIL PROTECTED] and include in the body of the message "help". ------------------------------ Date: Tue, 6 Mar 2001 15:41:16 +0100 From: Saleem Raza Ahmed <[EMAIL PROTECTED]> Subject: signoff (to moderator of the list) Hallo, Please signoff me from the mailing list. I have tried to signoff automatically without success. I do not who had added me in the list. My email-address in the list may be: [EMAIL PROTECTED] or [EMAIL PROTECTED] with regards -Saleem -----Original Message----- From: Sacha Labourey [mailto:[EMAIL PROTECTED]] Sent: 6. mars 2001 15:03 To: [EMAIL PROTECTED] Subject: Re: EJB container, back office systems and sockets Hello, Beans are allowed to be socket clients (but not socket server). Consequently, what he does seems legal : "The EJB architecture allows an enterprise bean instance to be a network socket client, but it does not allow it to be a network server." (p277) Cheers, Sacha > i.e. only if you *absolutely* need to use the socket class. > I noticed that you were using WLS 5.1, and if you > are doing this from within your EJB's, this is restricted > by the EJB spec 1.1 (If WLS indeed allows it, as you > mention, you might need to take into account that > other EJB vendors might be more 'strict' and hence > your code might not be portable across containers) ======================================================================== === 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". ------------------------------ Date: Tue, 6 Mar 2001 16:23:19 -0600 From: Amit k Gupta <[EMAIL PROTECTED]> Subject: Re: Stateless and Statefull Stateful -multiple method calls Stateless -single method call ----- Original Message ----- From: "Hariharan N" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 06, 2001 4:42 AM Subject: Stateless and Statefull > Could anyone (with a sample application) demonstrate the exact difference > between Statefull and Stateless bean. Say for example in the sample > application(may be with one function) when > <session-type>Stateful</session-type> tag in the ejb-jar.xml is changed to > <session-type>Stateless</session-type> should show the persistence which > happens with statefull and not with stateless!!! > Also explain clearly with respect to the sample app. the underground > process. Like when this sample app is invoked as a statefull then it should > maintain state etc.. > > Also how does app server maintain client state??? thro' cookies or machine > IP etc... > Thanks!! > > =========================================================================== > 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". > > ------------------------------ Date: Tue, 6 Mar 2001 13:24:54 +0200 From: Avi Kivity <[EMAIL PROTECTED]> Subject: Re: restriction on Stateless Session Beans > > Could someone tell me why should the Stateless Session Bean > not be allowed > to implement the SessionSynchronization interface? > It is meaningless - SessionSynchronization's methods are called when the transaction commits or aborts. At that time, however, the SLSB can be assigned to another client. There is no place to keep the state for the operation you want to perform at commit or abort time. - Avi -- And now for something completely different. =========================================================================== 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". ------------------------------ Date: Tue, 6 Mar 2001 14:38:28 +0100 From: Sacha Labourey <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets Hello Marco, > JMS seems to me as a solution for a-synchronous messaging. > I want (near)real-time information.. JMS can be very efficient. You need to decide what you mean by "near real-time". a few seconds? mili-seconds? ... Anyway, if your current system is willing to accept waiting 2 minutes for a timeout to occur, I am sure that JMS will be more than efficient for this task ;) > Do you still think JMS is an option ? > Or do you have other suggestions ? You may have a subsystem that continously checks for available data on this server through sockets. When data is found, it is forwarded in a JMS message. On your EJB server, a Message Driven Bean (MDB) would then automagically receive this message and take appropriate action (call another bean, ...) cheers, Sacha =========================================================================== 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". ------------------------------ Date: Tue, 6 Mar 2001 14:52:28 -0000 From: Krishnan Subramanian <[EMAIL PROTECTED]> Subject: Re: EJB container, back office systems and sockets Hi Marco, I would suggest using the Socket class's "setSoTimeout(int milliseconds)" i.e. only if you *absolutely* need to use the socket class. I noticed that you were using WLS 5.1, and if you are doing this from within your EJB's, this is restricted by the EJB spec 1.1 (If WLS indeed allows it, as you mention, you might need to take into account that other EJB vendors might be more 'strict' and hence your code might not be portable across containers) -krish > >From: Marco Pas <[EMAIL PROTECTED]> > >Reply-To: Marco Pas <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Subject: EJB container, back office systems and sockets > >Date: Tue, 6 Mar 2001 13:10:54 +0100 > > > >13:05 / 6-3-2001 > > > > > > In our application (running on WL 5.1 Servicepack 8) we have to access > >a remote > > machine via a socket connection, this to retrieve remote data. > > I know this is not in the specs but we have to do so ! > > > > When the remote machine is ok the socket connection is accepted > > very quickly. But when the remote system is ofline it takes about 2 > > minutes to get an answer back from the socket. (a timeout occurs) > > > > If i have a lot of requests this fills all my available threads on > > waiting back-office systems. > > > > Does anyone know how to tackle this problem, i want to check if the > > remote system is alive and capable of answering ! > > > > regards, > > Marco Pas > > > >=========================================================================== > >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". > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > =========================================================================== > 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". > > =========================================================================== 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". ------------------------------ Date: Tue, 6 Mar 2001 22:55:39 -0800 From: Robert Nicholson <[EMAIL PROTECTED]> Subject: Trip planning problem... transactoin attributes? Suppose you have to plan a world trip (Ed Romans Trip Planning example) and there are three legs and you want to be able to retry each leg if it fails and if it continues to fail you then want to roll back the entire transaction. How do you structure the methods and their transaction attributes to support this? The key here is that just because you fail to plan a leg the first time doesn't mean that you will roll back everything. However, if you continue to fail you will want to roll back everything that took place before. Can somebody describe the transaction attributes if you have planTrip() purchaseFirstLeg() purchaseSecondLeg() purchaseThirdLeg() What would the transaction attributes have to be for this to work? What I don't understand is if you need to be able to both rollback just an individual leg and also have the flexibility to roll back the planTrip all together. How can you do this when you use TX_REQUIRES_NEW for the inner legs and choose not to keep conversational state that indicates failure with any one inner level? ------------------------------ End of EJB-INTEREST Digest - 5 Mar 2001 to 6 Mar 2001 (#2001-66) **************************************************************** =========================================================================== 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".
