I have one simple CMP entity bean and one session bean. The part of the session bean
is here:
| /** Business method.
| * @ejb.interface-method
| */
| public long testCMP() {
| long time = System.currentTimeMillis();
|
| try {
| for (int i = 0; i < 10; i++) {
| System.out.println("CMP " + i);
| AccountCMPLocalHome home = AccountCMPUtil.getLocalHome();
| java.util.Collection accs = home.findAll();
|
| java.util.Iterator itr = accs.iterator();
|
| while (itr.hasNext()) {
| AccountCMPLocal acc = (AccountCMPLocal) itr.next();
| String u = acc.getUserId();
| System.out.println("CMP " + u);
| String p = acc.getPassword();
| }
| }
| } catch (Exception e) {
| throw new javax.ejb.EJBException(e);
| }
|
| return System.currentTimeMillis() - time;
| }
|
AccountCMPUtil is the cache generated by XDoclet.
The 'for' cycle executes only once and then the server and the client hang up!
The last words of the server are:
| 2004-07-09 15:03:39,988 INFO [STDOUT] CMP 0
| 2004-07-09 15:03:39,988 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountCMP#findAll] Executing SQL:
SELECT t0_a.userId FROM T_ACCOUNT t0_a
| 2004-07-09 15:03:39,988 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT pwd FROM T_ACCOUNT WHERE (userId=?)
| 2004-07-09 15:03:40,004 INFO [STDOUT] CMP user1
| 2004-07-09 15:03:40,004 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT userId, pwd FROM T_ACCOUNT WHERE (userId=?) OR (userId=?) OR (userId=?) OR
(userId=?) OR (userId=?)
| 2004-07-09 15:03:40,004 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT pwd FROM T_ACCOUNT WHERE (userId=?)
| 2004-07-09 15:03:40,004 INFO [STDOUT] CMP user2
| 2004-07-09 15:03:40,004 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT pwd FROM T_ACCOUNT WHERE (userId=?)
| 2004-07-09 15:03:40,020 INFO [STDOUT] CMP user3
| 2004-07-09 15:03:40,020 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT pwd FROM T_ACCOUNT WHERE (userId=?)
| 2004-07-09 15:03:40,020 INFO [STDOUT] CMP user4
| 2004-07-09 15:03:40,020 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.AccountCMP] Executing SQL:
SELECT pwd FROM T_ACCOUNT WHERE (userId=?)
| 2004-07-09 15:03:40,035 INFO [STDOUT] CMP user5
| 2004-07-09 15:03:40,035 INFO [STDOUT] CMP 1
| 2004-07-09 15:03:40,035 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountCMP#findAll] Executing SQL:
SELECT t0_a.userId FROM T_ACCOUNT t0_a
| 2004-07-09 15:08:39,278 DEBUG [org.jboss.resource.connectionmanager.IdleRemover]
run: IdleRemover notifying pools, interval: 450000
| 2004-07-09 15:08:39,996 WARN [org.jboss.tm.TransactionImpl] Transaction
TransactionImpl:XidImpl [FormatId=257, GlobalId=sysm1029//137, BranchQual=] timed out.
status=STATUS_ACTIVE
|
So, did I make a mistake or a method of a CMP bean can be invoked only once per
trasaction?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841519#3841519
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841519
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user