On 2002.01.17 18:22:12 -0500 Kris Kristensen wrote: > Just read through my own post and found a typo that might give more > meaning to the "showstopper". WLS takes approx. 1- to 3+ SECONDS not > minutes, for JBoss it is sadly enough correct with 3+ minutes. > > Any help will be very appreciated. > > -Kris > ----- Original Message ----- > From: Kris Kristensen > To: Jboss-support > Sent: Thursday, January 17, 2002 7:59 PM > Subject: [JBoss-user] calling ejbStore() too many times > > > Moving down the path of porting from WLS to JBoss, I came across this > issue. > > We are using both XA and non-XA datasources/drivers in our application. > > I have a testprogram that calls a number of sessionbeans each of which > calls a number of entity beans. These entity beans all use the non-xa > driver. these entity beans collects a number of informations(definitions) > that is used to call external databases to create dynamic SQL statements. > The external databases all use XA-datasources. > > Doing this with WLS takes approx. 1- to 3+ minuts, depending on the > amount of data being retrieved. Doing it in JBoss is something of a > showstopper (3+ minuts). > During executing, JBoss insists on calling ejbStore() contantly, where > WLS just calls ejbStore() when the transaction is about to end. > Without actually counting the number of times JBoss makes these calls, > my best guess is more than 100!!, although the number a entity beans > being accessed is around 10-15. > > Further info: > We are using BMP for the entity beans. Every bean has its own record > class the implements the Serializable interface. The record class acts as > data-container between the server and client.
Since you are using bmp, you are free to implement a dirty flag and avoid accessing the db in ejbStore if nothing has changed. (with cmp, implement a boolean isModified() method and JAWS will call it for advice). Some of the calls to ejbStore were added because if you don't do them more or less immediately it's easy to get fk constraint violations when you are removing rows, and you first set the reference to the removed row to null (or something else). You might take a look at the commit option also. Is everything executing within the same "transaction" as far as jboss is concerned? (jboss does not argue with you if you access several non xa resources within the same tx, it just tries to commit everything at once. Of course if something fails, you're in trouble.) Hope this helps david jencks > > JBoss2.4.4_Tomcat4.0.1 > > -Kris > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> > <META content="MSHTML 5.00.3315.2870" name=GENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=#ffffff> > <DIV><FONT face=Arial size=2>Just read through my own post and found a > typo that > might give more meaning to the "showstopper". WLS takes approx. 1- > to 3+ > SECONDS not minutes, for JBoss it is sadly enough correct with 3+ > minutes.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>Any help will be very > appreciated.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>-Kris</FONT></DIV> > <BLOCKQUOTE > style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: > 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> > <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> > <DIV > style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: > black"><B>From:</B> > <A href="mailto:[EMAIL PROTECTED]" > [EMAIL PROTECTED]>Kris Kristensen</A> </DIV> > <DIV style="FONT: 10pt arial"><B>To:</B> <A > href="mailto:[EMAIL PROTECTED]" > [EMAIL PROTECTED]>Jboss-support</A> </DIV> > <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 17, 2002 > 7:59 > PM</DIV> > <DIV style="FONT: 10pt arial"><B>Subject:</B> [JBoss-user] calling > ejbStore() > too many times</DIV> > <DIV><BR></DIV> > <DIV><FONT face=Arial size=2>Moving down the path of porting from WLS > to > JBoss, I came across this issue.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>We are using both XA and non-XA > datasources/drivers in our application. </FONT></DIV> > <DIV><FONT face=Arial size=2>I have </FONT><FONT face=Arial size=2>a > testprogram that calls a number of sessionbeans each of which calls a > number > of entity beans. These entity beans all use the non-xa driver. these > entity > beans collects a number of informations(definitions) that is used > to call > external databases to create dynamic SQL statements. The external > databases > all use XA-datasources.</FONT></DIV> > <DIV><FONT face=Arial size=2></FONT> </DIV> > <DIV><FONT face=Arial size=2>Doing this with WLS takes approx. 1- > to 3+ > minuts, depending on the amount of data being retrieved. Doing it in > JBoss is > something of a showstopper (3+ minuts). </FONT></DIV> > <DIV><FONT face=Arial size=2>During executing, JBoss insists on calling > > ejbStore() contantly, where WLS just calls ejbStore() when the > transaction is > about to end. </FONT></DIV> > <DIV><FONT face=Arial size=2>Without actually counting the number of > times > JBoss makes these calls, my best guess is more than 100!!, although the > number > a entity beans being accessed is around 10-15.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>Further info:</FONT></DIV> > <DIV><FONT face=Arial size=2>We are using BMP for the entity beans. > Every bean > has its own record class the implements the Serializable interface. The > record > class acts as data-container between the server and > client.</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>JBoss2.4.4_Tomcat4.0.1</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=Arial size=2>-Kris</FONT></DIV></BLOCKQUOTE></BODY></HTML> > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
