0 Replies Latest reply on Mar 21, 2006 8:44 AM by Amit Sharma

    A CMP Entity Bean executing findByPrimaryKey incorrectly on

    Amit Sharma Newbie

      Hi,

      I've an Entity bean ResponseBean with a local interface ResponseLocal. The declaration of the ResponseLocal is as follows

      public interface ResponseLocal extends javax.ejb.EJBLocalObject , GBMessage {
      /**
      * This method was generated for supporting the relationship role named sender.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public com.doubledyno.goodblock.users.UserLocal getSender();
      /**
      * This method was generated for supporting the relationship role named sender.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public void setSender(com.doubledyno.goodblock.users.UserLocal aSender);
      /**
      * This method was generated for supporting the relationship role named serviceprovider.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public com
      .doubledyno
      .goodblock
      .serviceProviders
      .ServiceProviderLocal getServiceprovider();
      /**
      * This method was generated for supporting the relationship role named serviceprovider.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public void setServiceprovider(
      com
      .doubledyno
      .goodblock
      .serviceProviders
      .ServiceProviderLocal aServiceprovider);
      /**
      * This method was generated for supporting the relationship role named servicerequest.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public com
      .doubledyno
      .goodblock
      .recommendations
      .ServiceRequestLocal getServicerequest();
      /**
      * This method was generated for supporting the relationship role named servicerequest.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public void setServicerequest(
      com
      .doubledyno
      .goodblock
      .recommendations
      .ServiceRequestLocal aServicerequest);
      /**
      * Get accessor for persistent attribute: readStatus
      */
      public boolean getReadStatus();
      /**
      * Set accessor for persistent attribute: readStatus
      */
      public void setReadStatus(boolean newReadStatus);
      /**
      * Get accessor for persistent attribute: removed
      */
      public java.lang.String getSubject();
      /**
      * Set accessor for persistent attribute: subject
      */
      public void setSubject(java.lang.String newSubject);
      /**
      * Get accessor for persistent attribute: body
      */
      public java.lang.String getBody();
      /**
      * Set accessor for persistent attribute: body
      */
      public void setBody(java.lang.String newBody);
      /**
      * Get accessor for persistent attribute: createDate
      */
      public java.util.Date getCreateDate();
      /**
      * Set accessor for persistent attribute: createDate
      */
      public void setCreateDate(java.util.Date newCreateDate);
      /**
      * Get accessor for persistent attribute: responded
      */
      public boolean getResponded();
      /**
      * Set accessor for persistent attribute: responded
      */
      public void setResponded(boolean newResponded);
      /**
      * This method was generated for supporting the relationship role named receiver.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public com.doubledyno.goodblock.users.UserLocal getReceiver();
      /**
      * This method was generated for supporting the relationship role named receiver.
      * It will be deleted/edited when the relationship is deleted/edited.
      */
      public void setReceiver(com.doubledyno.goodblock.users.UserLocal aReceiver);

      public boolean getSenderRemoved();
      /**
      * Set accessor for persistent attribute: senderRemoved
      */
      public void setSenderRemoved(boolean newSenderRemoved);
      /**
      * Get accessor for persistent attribute: removed
      */
      public boolean getRemoved();
      /**
      * Set accessor for persistent attribute: removed
      */
      public void setRemoved(boolean newReceiverRemoved);

      /**
      * Get accessor for persistent attribute: thanked
      */
      public boolean getThanked();
      /**
      * Set accessor for persistent attribute: thanked
      */
      public void setThanked(boolean newThanked);

      /**
      * Get accessor for persistent attribute: senderReadStatus
      */
      public boolean getSenderReadStatus();
      /**
      * Set accessor for persistent attribute: senderReadStatus
      */
      public void setSenderReadStatus(boolean senderReadStatus);

      /*** Get accessor for persistent attribute: openedFromInbox*/
      public abstract boolean getOpenedFromInbox();

      /*** Set accessor for persistent attribute: openedFromInbox */
      public abstract void setOpenedFromInbox(boolean openedFromInbox);

      /*** Get accessor for persistent attribute: openedFromHomePage */
      public abstract boolean getOpenedFromHomePage();

      /*** Set accessor for persistent attribute: openedFromHomePage */
      public abstract void setOpenedFromHomePage(boolean openedFromHomePage);

      /*** Get accessor for persistent attribute: openedFromMail */
      public abstract boolean getOpenedFromMail();

      /*** Set accessor for persistent attribute: openedFromMail */
      public abstract void setOpenedFromMail(boolean openedFromMail);

      /*** Get accessor for persistent attribute: openedFromDailyDigest */
      public abstract boolean getOpenedFromDailyDigest();

      /*** Set accessor for persistent attribute: openedFromDailyDigest */
      public abstract void setOpenedFromDailyDigest(boolean openedFromDailyDigest);

      /*** Get accessor for persistent attribute: shareAdvicePublic */
      public abstract boolean getShareAdvicePublic();

      /*** Set accessor for persistent attribute: shareAdvicePublic */
      public abstract void setShareAdvicePublic(boolean shareAdvice);

      // Start Roorkee change #1309
      /*** Get accessor for persistent attribute: openedFromPastRequests */
      public abstract boolean getOpenedFromPastRequests();

      /*** Set accessor for persistent attribute: openedFromPastRequests */
      public abstract void setOpenedFromPastRequests(boolean openedFromPastRequests);

      /*** Get accessor for persistent attribute: openedFromBookmarks */
      public abstract boolean getOpenedFromBookmarks();

      /*** Set accessor for persistent attribute: openedFromBookmarks */
      public abstract void setOpenedFromBookmarks(boolean openedFromBookmarks);
      }

      I also have the corresponding abstract accessors inside ResponseBean class. But when the findByPrimaryKey is executed, the following log is printed by server.log corresponding to JDBCLoadEntityCommand :

      Executing SQL: SELECT responseId, readStatus, senderRemoved, subject, body, createDate, responded, removed, thanked, senderReadStatus, openedFromInbox, openedFromMail, openedFromHomePage, openedFromDailyDigest, shareAdvicePublic, openedFromPastRequests, openedFromBookmarks, servicerequest, sender, receiver, serviceprovider FROM response WHERE (responseId=?) OR (responseId=?)

      Since I'm passing a single argument to the findByPrimaryKey method, I suspect that the PreparedStatement hangs in the background as it expects two arguments. The control seems to be jammed at any method call on ResponseLocal interface. Please suggest a work-around......Also note that the same code works perfectly fine with JBoss 3.2.3 but I'm trying to migrate to JBoss 3.2.7