[JBoss-user] Question : RollbackException, BMP entity bean, ejbStore,...
Hi guys, I've just started out to program EJB. Now I've just reached the end of chapter BMP entity bean. >From my humble experiment with BMP, I'm faced with a question,... which I don't know the answer :) On the client : from invocation of create(...) method, the client get a reference to ejb object. I can confirm that the create(...) method was executed succesfully by seeing the content of database (a new row was inserted). After that, the client called one of business method of that ejb object, getName() : public String getName() { return name; } But an execption, RollbackException, was thrown to the client as a result of that getName() invocation. I wondered, what can go wrong with such a simple business method ? After several hours of tracing, I found out that the ejbStore() method was incorrect (I mispelled the the SQL query. The SQLException was wrapped as EJBException). So I fixed the SQL query, and everything's allright. The question is : Why ejbStore() ? What does it has to do with getName() ? At first I didn't suspect the root of the problem was ejbStore(), but instead ejbLoad(). My suspicion to ejbStore() came the last,...and this time it was right, but I still don't know the reason. Would somebody help me, by explaining that (perhaps it's related to entity bean life cycle, and the way jboss implement...I forgot um... lazy "something" ???). Thanks a lot in advance, Raka (http://members.nbci.com/don_raka) __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Non-Reentrant (Thanks)
Thanks a lot :), Raka --- Burkhard Vogel <[EMAIL PROTECTED]> wrote: > Hi, > a reentrant bean has to be used if the following > scenario occurs: > Have a Bean A call a method in Bean B whereupon Bean > B calls within this > method another method on Bean A. In this case Bean A > has to be reentrant! > Hope this is a good enough explanation for the > sharp-eyed of all the pros on > this list. >8-/ > Burkhard __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Non-Reentrant
Hi all, I'm having difficulty grasping some material in EJB 1.1 spec, as it requires some experience in building EJB app (I guess) which I don't have yet. >From EJB 1.1 specification : - 6.11.6 Non-reentrant instances The container must ensure that only one thread can be executing an instance at any time. If a client request arrives for an instance while the instance is executing another request, the container must throw the java.rmi.RemoteException to the second request. Note that a session object is intended to support only a single client. Therefore, it would be an application error if two clients attempted to invoke the same session object. *One implication of this rule is that an application cannot make loopback calls to a session bean instance.* - Would somebody please explain the implication (bold-ed) a little more ? A simple example might help a lot. Thanks in Advance, Raka __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] DataSource, JDBC, and stuffs
Hi, I have exactly the same problem (please see email with subject: JNDI and Connection Pool, etc. From Pellegrini, John. Posted on Sun, 01 Apr 2001 06:49:56 -0700). Please, does anybody know the answer to this problem. thanks a lot, Raka --- Cokorda Raka Angga Jananuraga <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a newbie to EJB and JBoss. > Now, I'm entering creating BMP entity bean chapter > in > my EJB book. > > I have trouble in deploying the bean, especially > mapping a jndi name to a connection pool (?). > > Which files to configure, and how ? I can't find > enough clues in JBoss documentation. > > I've searched the maillist archive, but found little > reference. > > Any hints would be very appriciated. > > Thanks a lot, > Raka > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great > prices > http://auctions.yahoo.com/ > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] DataSource, JDBC, and stuffs
Hi, I'm a newbie to EJB and JBoss. Now, I'm entering creating BMP entity bean chapter in my EJB book. I have trouble in deploying the bean, especially mapping a jndi name to a connection pool (?). Which files to configure, and how ? I can't find enough clues in JBoss documentation. I've searched the maillist archive, but found little reference. Any hints would be very appriciated. Thanks a lot, Raka __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user