Hi, 

using JBoss-4.0.2 with applied Patch (Principal-Propagation-Probems, @see 
Announcements), this doesn't work correctly, since it only deletes one of two 
players:


  | 
  |                     java.util.Iterator iterator = 
game.getPlayers().iterator();
  |                     while (iterator.hasNext()) {
  |                             player = (PlayerLocal) iterator.next();
  |                             logger.debug("removing player with 
namePK="+player.getNamePK());
  |                             iterator.remove();
  |                     }
  | 
  | 


But this works:

  |                     Object[] playerArray = game.getPlayers().toArray();
  |                     for (int index=0; index<playerArray.length; index++) {
  |                             player = (PlayerLocal) playerArray[index];
  |                             logger.debug("removing player with 
namePK="+player.getNamePK());
  |                             player.remove();
  |                     }
  | 

I think the code with the iterator should work, no? 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880630#3880630

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880630


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to