0 Replies Latest reply on Oct 29, 2002 9:55 PM by tdhak

    JBoss not working right, Please help me!!

    tdhak

      Hi, I've posted details about this problem before, but I didn't get it resolved, and now I just don't know what else I can do.

      I've deployed an enitiy bean, which I'm creating in a separte client. The problem is that jboss will not call back the ejbPostCreate() method.

      I've tried delving into the JBoss source and found that the ejbPostCreate method does actually exist as a Method class, its just that nothing is invoking it.

      Below is an extract from the entity bean I'm creating:-

      /**
      * @ejb.create-method view-type="local"
      */
      public java.lang.Integer ejbCreate(String username, String password,
      int state)
      throws javax.ejb.CreateException
      {
      this.setUsername(username);
      this.setPassword(password);
      this.setState(state);
      this.setCreated(new Date());

      return null;
      }

      public void ejbPostCreate(String username, String password,
      int state)
      {
      System.out.println("ejbPostCreate() got called !!");
      }

      /**
      * @ejb.create-method view-type="local"
      */
      public java.lang.Integer ejbCreate(String username, String password,
      int state, UserDetailsEntityEJBLocal userDetails)
      throws javax.ejb.CreateException
      {
      this.setUsername(username);
      this.setPassword(password);
      this.setState(state);
      this.setCreated(new Date());

      return null;
      }

      public void ejbPostCreate(String username, String password,
      int state, UserDetailsEntityEJBLocal userDetails)
      {
      System.out.println("ejbPostCreate got called !!");
      this.setUserDetails(userDetails);
      }

      Hi, here's a the contents of the logs if this helps anyone track down the problem. As you can see no error or warning is generated, so where do I look for the problem !!


      2002-10-28 01:38:14,996 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=create
      2002-10-28 01:38:15,003 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2002-10-28 01:38:15,011 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for create
      2002-10-28 01:38:15,015 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2002-10-28 01:38:15,031 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//12, BranchQual=]
      2002-10-28 01:38:15,037 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@25753d#true#class tsd_software.j2ee.user_management.ejbs.implementations.UserManageSessionEJB
      2002-10-28 01:38:15,374 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryAdded, entry=key: 1035742691703, object: 968f9, entry: cae5b7
      2002-10-28 01:38:15,387 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-10-28 01:38:15,396 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:before commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//12, BranchQual=]
      2002-10-28 01:38:15,405 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:after commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//12, BranchQual=]
      2002-10-28 01:38:15,410 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
      2002-10-28 01:38:17,099 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=addUser
      2002-10-28 01:38:17,106 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2002-10-28 01:38:17,131 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for addUser
      2002-10-28 01:38:17,135 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2002-10-28 01:38:17,148 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:17,703 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=findByUsername
      2002-10-28 01:38:17,712 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:17,717 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for findByUsername
      2002-10-28 01:38:17,727 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:17,735 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance org.jboss.ejb.plugins.EntityInstancePool@c8c6d9#true#class tsd_software.j2ee.user_management.ejbs.implementations.UserEntityEJB
      2002-10-28 01:38:17,917 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=ams-web, password=ams-web}
      2002-10-28 01:38:18,147 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.UserEntityEJB.findByUsername] Executing SQL: SELECT t0_o.id FROM USER t0_o WHERE t0_o.username = ?
      2002-10-28 01:38:18,197 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-10-28 01:38:18,208 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=findByUsername
      2002-10-28 01:38:18,224 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=create
      2002-10-28 01:38:18,246 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:18,256 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for create
      2002-10-28 01:38:18,279 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:18,291 TRACE [org.jboss.ejb.plugins.EntityInstancePool] Get instance org.jboss.ejb.plugins.EntityInstancePool@c8c6d9#true#class tsd_software.j2ee.user_management.ejbs.implementations.UserEntityEJB
      2002-10-28 01:38:18,446 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.UserEntityEJB] Create: pk=null
      2002-10-28 01:38:18,455 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.UserEntityEJB] Executing SQL: SELECT COUNT(*) FROM USER WHERE id=?
      2002-10-28 01:38:18,480 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.UserEntityEJB] Executing SQL: INSERT INTO USER (id, username, password, created, last_login, state) VALUES (?, ?, ?, ?, ?, ?)
      2002-10-28 01:38:18,517 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.UserEntityEJB] Rows affected = 1
      2002-10-28 01:38:18,528 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-10-28 01:38:18,533 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
      2002-10-28 01:38:18,542 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-10-28 01:38:18,551 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:before commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:18,555 TRACE [org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor] beforeCompletion called
      2002-10-28 01:38:18,566 TRACE [org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor] afterCompletion called
      2002-10-28 01:38:18,575 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:after commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//13, BranchQual=]
      2002-10-28 01:38:18,581 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=addUser
      2002-10-28 01:38:18,644 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=remove
      2002-10-28 01:38:18,651 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2002-10-28 01:38:18,657 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for remove
      2002-10-28 01:38:18,662 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2002-10-28 01:38:18,676 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//14, BranchQual=]
      2002-10-28 01:38:18,700 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryRemoved, entry=key: null, object: null, entry: cae5b7
      2002-10-28 01:38:18,704 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2002-10-28 01:38:18,713 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:before commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//14, BranchQual=]
      2002-10-28 01:38:18,718 TRACE [org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor] beforeCompletion called
      2002-10-28 01:38:18,722 TRACE [org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor] afterCompletion called
      2002-10-28 01:38:18,732 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT:after commit of TransactionImpl:XidImpl [FormatId=257, GlobalId=pluto//14, BranchQual=]
      2002-10-28 01:38:18,737 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=remove

      I really don't understand whats going on, this is now a case of a simple entity EJB where JBoss is not calling back the ejbPostCreate method. It must be something I'm doing wrong, cos nobody else seems to be having this problem.

      Thanks a again to anyone that can help me.

      Tarwinder Dhak