JTAConnection leaked due to using it in non-xa mode without close it - Weblogic

This is a discussion on JTAConnection leaked due to using it in non-xa mode without close it - Weblogic ; I am running WebLogic 8.1 and developing small Web applications with CMP persistance. This is the part of my code causing the problem: ResultSet pInbox = null; try { pInbox = mailboxHome.getMailboxSummaryInbox(pProId); logger.debug("Inbox messages found for proId : "+pProId); while ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: JTAConnection leaked due to using it in non-xa mode without close it

  1. JTAConnection leaked due to using it in non-xa mode without close it


    I am running WebLogic 8.1 and developing small Web applications with CMP persistance.

    This is the part of my code causing the problem:

    ResultSet pInbox = null;
    try {
    pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    logger.debug("Inbox messages found for proId : "+pProId);
    while (pInbox.next()) {
    if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ)) {
    pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    }
    else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    {
    pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    }
    }
    pInbox.close(); // closing the result set
    logger.debug("Inbox connection closed for proId = "+pProId);
    }

    I am getting warning message:

    leak was detected.
    A connection leak occurs when a connection obtained from the pool was not closed
    explicitly by calling
    close() and then was disposed by the garbage collector and returned to the connection
    pool.
    The following stack trace at create shows where the leaked connection was created.

    JTAConnection leaked due to using it in non-xa mode without close it.>

    In my code I am closing the result set. It looks like that close() has not any
    effect.

    Any help?

  2. Re: JTAConnection leaked due to using it in non-xa mode without close it

    Vlada,

    Can you show us how you close the Statement and the connection?

    Regards,

    Slava Imeshev

    "Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    >
    > I am running WebLogic 8.1 and developing small Web applications with CMP persistance.
    >
    > This is the part of my code causing the problem:
    >
    > ResultSet pInbox = null;
    > try {
    > pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    > logger.debug("Inbox messages found for proId : "+pProId);
    > while (pInbox.next()) {
    > if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ)) {
    > pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    > pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    > }
    > else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    > {
    > pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    > pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    > }
    > }
    > pInbox.close(); // closing the result set
    > logger.debug("Inbox connection closed for proId = "+pProId);
    > }
    >
    > I am getting warning message:
    >
    >
    > leak was detected.
    > A connection leak occurs when a connection obtained from the pool was not closed
    > explicitly by calling
    > close() and then was disposed by the garbage collector and returned to the connection
    > pool.
    > The following stack trace at create shows where the leaked connection was created.
    >
    > JTAConnection leaked due to using it in non-xa mode without close it.>
    >
    > In my code I am closing the result set. It looks like that close() has not any
    > effect.
    >
    > Any help?




  3. Re: JTAConnection leaked due to using it in non-xa mode without close it


    Hi Slava,

    I close neither the statement nor the connection. I am using CMP persistance and
    @ejbgen:select stanza
    in the EJB. The definition of @ejbgen:select stanza is as follows:

    /**
    * @ejbgen:select
    * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId) FROM MailboxEJB
    AS o
    * WHERE o.fromProId = ?1
    * GROUP BY o.fromProId,o.mailStatus"
    */
    public abstract java.sql.ResultSet ejbSelectQueryMailboxSummaryOutbox(Long pProId)
    throws FinderException;

    /**
    * @ejbgen:local-home-method
    */
    public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long pProId) throws
    FinderException {
    return ejbSelectQueryMailboxSummaryOutbox(pProId);
    }

    I call the method "getMailboxSummaryOutbox" from the stateless session bean. This
    is correct because
    I am getting the correct result from Oracle.

    Regarding the connection I expect WebLogic to close it. The same is with the statement
    in the EJB.

    Am I right?


    "Slava Imeshev" wrote:
    >Vlada,
    >
    >Can you show us how you close the Statement and the connection?
    >
    >Regards,
    >
    >Slava Imeshev
    >
    >"Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    >>
    >> I am running WebLogic 8.1 and developing small Web applications with

    >CMP persistance.
    >>
    >> This is the part of my code causing the problem:
    >>
    >> ResultSet pInbox = null;
    >> try {
    >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    >> logger.debug("Inbox messages found for proId : "+pProId);
    >> while (pInbox.next()) {
    >> if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))

    >{
    >> pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    >> }
    >> else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    >> {
    >> pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    >> }
    >> }
    >> pInbox.close(); // closing the result set
    >> logger.debug("Inbox connection closed for proId = "+pProId);
    >> }
    >>
    >> I am getting warning message:
    >>
    >>

    >pool connection
    >> leak was detected.
    >> A connection leak occurs when a connection obtained from the pool was

    >not closed
    >> explicitly by calling
    >> close() and then was disposed by the garbage collector and returned

    >to the connection
    >> pool.
    >> The following stack trace at create shows where the leaked connection

    >was created.
    >>
    >> JTAConnection leaked due to using it in non-xa mode without close it.>
    >>
    >> In my code I am closing the result set. It looks like that close()

    >has not any
    >> effect.
    >>
    >> Any help?

    >
    >



  4. Re: JTAConnection leaked due to using it in non-xa mode without close it

    Interesting. This message should print a stack trace. Do you have it?

    Slava

    "Vlada V" wrote in message news:40acea6c@newsgroups.bea.com...
    >
    > Hi Slava,
    >
    > I close neither the statement nor the connection. I am using CMP persistance and
    > @ejbgen:select stanza
    > in the EJB. The definition of @ejbgen:select stanza is as follows:
    >
    > /**
    > * @ejbgen:select
    > * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId) FROM MailboxEJB
    > AS o
    > * WHERE o.fromProId = ?1
    > * GROUP BY o.fromProId,o.mailStatus"
    > */
    > public abstract java.sql.ResultSet ejbSelectQueryMailboxSummaryOutbox(Long pProId)
    > throws FinderException;
    >
    > /**
    > * @ejbgen:local-home-method
    > */
    > public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long pProId) throws
    > FinderException {
    > return ejbSelectQueryMailboxSummaryOutbox(pProId);
    > }
    >
    > I call the method "getMailboxSummaryOutbox" from the stateless session bean. This
    > is correct because
    > I am getting the correct result from Oracle.
    >
    > Regarding the connection I expect WebLogic to close it. The same is with the statement
    > in the EJB.
    >
    > Am I right?
    >
    >
    > "Slava Imeshev" wrote:
    > >Vlada,
    > >
    > >Can you show us how you close the Statement and the connection?
    > >
    > >Regards,
    > >
    > >Slava Imeshev
    > >
    > >"Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    > >>
    > >> I am running WebLogic 8.1 and developing small Web applications with

    > >CMP persistance.
    > >>
    > >> This is the part of my code causing the problem:
    > >>
    > >> ResultSet pInbox = null;
    > >> try {
    > >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    > >> logger.debug("Inbox messages found for proId : "+pProId);
    > >> while (pInbox.next()) {
    > >> if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))

    > >{
    > >> pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    > >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    > >> }
    > >> else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    > >> {
    > >> pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    > >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    > >> }
    > >> }
    > >> pInbox.close(); // closing the result set
    > >> logger.debug("Inbox connection closed for proId = "+pProId);
    > >> }
    > >>
    > >> I am getting warning message:
    > >>
    > >>

    > >pool connection
    > >> leak was detected.
    > >> A connection leak occurs when a connection obtained from the pool was

    > >not closed
    > >> explicitly by calling
    > >> close() and then was disposed by the garbage collector and returned

    > >to the connection
    > >> pool.
    > >> The following stack trace at create shows where the leaked connection

    > >was created.
    > >>
    > >> JTAConnection leaked due to using it in non-xa mode without close it.>
    > >>
    > >> In my code I am closing the result set. It looks like that close()

    > >has not any
    > >> effect.
    > >>
    > >> Any help?

    > >
    > >

    >




  5. Re: JTAConnection leaked due to using it in non-xa mode without close it


    Hi,

    I have none.


    "Slava Imeshev" wrote:
    >Interesting. This message should print a stack trace. Do you have it?
    >
    >Slava
    >
    >"Vlada V" wrote in message news:40acea6c@newsgroups.bea.com...
    >>
    >> Hi Slava,
    >>
    >> I close neither the statement nor the connection. I am using CMP persistance

    >and
    >> @ejbgen:select stanza
    >> in the EJB. The definition of @ejbgen:select stanza is as follows:
    >>
    >> /**
    >> * @ejbgen:select
    >> * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId) FROM

    >MailboxEJB
    >> AS o
    >> * WHERE o.fromProId = ?1
    >> * GROUP BY o.fromProId,o.mailStatus"
    >> */
    >> public abstract java.sql.ResultSet ejbSelectQueryMailboxSummaryOutbox(Long

    >pProId)
    >> throws FinderException;
    >>
    >> /**
    >> * @ejbgen:local-home-method
    >> */
    >> public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long pProId)

    >throws
    >> FinderException {
    >> return ejbSelectQueryMailboxSummaryOutbox(pProId);
    >> }
    >>
    >> I call the method "getMailboxSummaryOutbox" from the stateless session

    >bean. This
    >> is correct because
    >> I am getting the correct result from Oracle.
    >>
    >> Regarding the connection I expect WebLogic to close it. The same is

    >with the statement
    >> in the EJB.
    >>
    >> Am I right?
    >>
    >>
    >> "Slava Imeshev" wrote:
    >> >Vlada,
    >> >
    >> >Can you show us how you close the Statement and the connection?
    >> >
    >> >Regards,
    >> >
    >> >Slava Imeshev
    >> >
    >> >"Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    >> >>
    >> >> I am running WebLogic 8.1 and developing small Web applications

    >with
    >> >CMP persistance.
    >> >>
    >> >> This is the part of my code causing the problem:
    >> >>
    >> >> ResultSet pInbox = null;
    >> >> try {
    >> >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    >> >> logger.debug("Inbox messages found for proId : "+pProId);
    >> >> while (pInbox.next()) {
    >> >> if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))
    >> >{
    >> >> pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    >> >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    >> >> }
    >> >> else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    >> >> {
    >> >> pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    >> >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    >> >> }
    >> >> }
    >> >> pInbox.close(); // closing the result set
    >> >> logger.debug("Inbox connection closed for proId = "+pProId);
    >> >> }
    >> >>
    >> >> I am getting warning message:
    >> >>
    >> >>
    >> >pool connection
    >> >> leak was detected.
    >> >> A connection leak occurs when a connection obtained from the pool

    >was
    >> >not closed
    >> >> explicitly by calling
    >> >> close() and then was disposed by the garbage collector and returned
    >> >to the connection
    >> >> pool.
    >> >> The following stack trace at create shows where the leaked connection
    >> >was created.
    >> >>
    >> >> JTAConnection leaked due to using it in non-xa mode without close

    >it.>
    >> >>
    >> >> In my code I am closing the result set. It looks like that close()
    >> >has not any
    >> >> effect.
    >> >>
    >> >> Any help?
    >> >
    >> >

    >>

    >
    >



  6. Re: JTAConnection leaked due to using it in non-xa mode without close it

    Vlada,

    I'd also check if the session bean method that calls the search method
    runs in a transaction - it should have Required or Mandatory TX
    attribute in its deployment descriptor.

    Slava


    "Vlada V." wrote in message news:40acf1e4$1@newsgroups.bea.com...
    >
    > Hi,
    >
    > I have none.
    >
    >
    > "Slava Imeshev" wrote:
    > >Interesting. This message should print a stack trace. Do you have it?
    > >
    > >Slava
    > >
    > >"Vlada V" wrote in message news:40acea6c@newsgroups.bea.com...
    > >>
    > >> Hi Slava,
    > >>
    > >> I close neither the statement nor the connection. I am using CMP persistance

    > >and
    > >> @ejbgen:select stanza
    > >> in the EJB. The definition of @ejbgen:select stanza is as follows:
    > >>
    > >> /**
    > >> * @ejbgen:select
    > >> * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId) FROM

    > >MailboxEJB
    > >> AS o
    > >> * WHERE o.fromProId = ?1
    > >> * GROUP BY o.fromProId,o.mailStatus"
    > >> */
    > >> public abstract java.sql.ResultSet ejbSelectQueryMailboxSummaryOutbox(Long

    > >pProId)
    > >> throws FinderException;
    > >>
    > >> /**
    > >> * @ejbgen:local-home-method
    > >> */
    > >> public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long pProId)

    > >throws
    > >> FinderException {
    > >> return ejbSelectQueryMailboxSummaryOutbox(pProId);
    > >> }
    > >>
    > >> I call the method "getMailboxSummaryOutbox" from the stateless session

    > >bean. This
    > >> is correct because
    > >> I am getting the correct result from Oracle.
    > >>
    > >> Regarding the connection I expect WebLogic to close it. The same is

    > >with the statement
    > >> in the EJB.
    > >>
    > >> Am I right?
    > >>
    > >>
    > >> "Slava Imeshev" wrote:
    > >> >Vlada,
    > >> >
    > >> >Can you show us how you close the Statement and the connection?
    > >> >
    > >> >Regards,
    > >> >
    > >> >Slava Imeshev
    > >> >
    > >> >"Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    > >> >>
    > >> >> I am running WebLogic 8.1 and developing small Web applications

    > >with
    > >> >CMP persistance.
    > >> >>
    > >> >> This is the part of my code causing the problem:
    > >> >>
    > >> >> ResultSet pInbox = null;
    > >> >> try {
    > >> >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    > >> >> logger.debug("Inbox messages found for proId : "+pProId);
    > >> >> while (pInbox.next()) {
    > >> >> if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))
    > >> >{
    > >> >> pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    > >> >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    > >> >> }
    > >> >> else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    > >> >> {
    > >> >> pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    > >> >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    > >> >> }
    > >> >> }
    > >> >> pInbox.close(); // closing the result set
    > >> >> logger.debug("Inbox connection closed for proId = "+pProId);
    > >> >> }
    > >> >>
    > >> >> I am getting warning message:
    > >> >>
    > >> >>
    > >> >pool connection
    > >> >> leak was detected.
    > >> >> A connection leak occurs when a connection obtained from the pool

    > >was
    > >> >not closed
    > >> >> explicitly by calling
    > >> >> close() and then was disposed by the garbage collector and returned
    > >> >to the connection
    > >> >> pool.
    > >> >> The following stack trace at create shows where the leaked connection
    > >> >was created.
    > >> >>
    > >> >> JTAConnection leaked due to using it in non-xa mode without close

    > >it.>
    > >> >>
    > >> >> In my code I am closing the result set. It looks like that close()
    > >> >has not any
    > >> >> effect.
    > >> >>
    > >> >> Any help?
    > >> >
    > >> >
    > >>

    > >
    > >

    >




  7. Re: JTAConnection leaked due to using it in non-xa mode without close it

    This sounds like a bug. The container should clean up the connection for
    you. Have you contacted BEA support?

    "Vlada V." wrote in message
    news:40acf1e4$1@newsgroups.bea.com...
    >
    > Hi,
    >
    > I have none.
    >
    >
    > "Slava Imeshev" wrote:
    > >Interesting. This message should print a stack trace. Do you have it?
    > >
    > >Slava
    > >
    > >"Vlada V" wrote in message

    news:40acea6c@newsgroups.bea.com...
    > >>
    > >> Hi Slava,
    > >>
    > >> I close neither the statement nor the connection. I am using CMP

    persistance
    > >and
    > >> @ejbgen:select stanza
    > >> in the EJB. The definition of @ejbgen:select stanza is as follows:
    > >>
    > >> /**
    > >> * @ejbgen:select
    > >> * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId) FROM

    > >MailboxEJB
    > >> AS o
    > >> * WHERE o.fromProId = ?1
    > >> * GROUP BY o.fromProId,o.mailStatus"
    > >> */
    > >> public abstract java.sql.ResultSet

    ejbSelectQueryMailboxSummaryOutbox(Long
    > >pProId)
    > >> throws FinderException;
    > >>
    > >> /**
    > >> * @ejbgen:local-home-method
    > >> */
    > >> public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long pProId)

    > >throws
    > >> FinderException {
    > >> return ejbSelectQueryMailboxSummaryOutbox(pProId);
    > >> }
    > >>
    > >> I call the method "getMailboxSummaryOutbox" from the stateless session

    > >bean. This
    > >> is correct because
    > >> I am getting the correct result from Oracle.
    > >>
    > >> Regarding the connection I expect WebLogic to close it. The same is

    > >with the statement
    > >> in the EJB.
    > >>
    > >> Am I right?
    > >>
    > >>
    > >> "Slava Imeshev" wrote:
    > >> >Vlada,
    > >> >
    > >> >Can you show us how you close the Statement and the connection?
    > >> >
    > >> >Regards,
    > >> >
    > >> >Slava Imeshev
    > >> >
    > >> >"Vlada V." wrote in message

    news:40acc99b$1@newsgroups.bea.com...
    > >> >>
    > >> >> I am running WebLogic 8.1 and developing small Web applications

    > >with
    > >> >CMP persistance.
    > >> >>
    > >> >> This is the part of my code causing the problem:
    > >> >>
    > >> >> ResultSet pInbox = null;
    > >> >> try {
    > >> >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    > >> >> logger.debug("Inbox messages found for proId : "+pProId);
    > >> >> while (pInbox.next()) {
    > >> >> if

    (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))
    > >> >{
    > >> >>

    pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    > >> >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    > >> >> }
    > >> >> else if

    (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    > >> >> {
    > >> >>

    pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    > >> >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    > >> >> }
    > >> >> }
    > >> >> pInbox.close(); // closing the result set
    > >> >> logger.debug("Inbox connection closed for proId = "+pProId);
    > >> >> }
    > >> >>
    > >> >> I am getting warning message:
    > >> >>
    > >> >>
    > >> >pool connection
    > >> >> leak was detected.
    > >> >> A connection leak occurs when a connection obtained from the pool

    > >was
    > >> >not closed
    > >> >> explicitly by calling
    > >> >> close() and then was disposed by the garbage collector and returned
    > >> >to the connection
    > >> >> pool.
    > >> >> The following stack trace at create shows where the leaked

    connection
    > >> >was created.
    > >> >>
    > >> >> JTAConnection leaked due to using it in non-xa mode without close

    > >it.>
    > >> >>
    > >> >> In my code I am closing the result set. It looks like that close()
    > >> >has not any
    > >> >> effect.
    > >> >>
    > >> >> Any help?
    > >> >
    > >> >
    > >>

    > >
    > >

    >




  8. Re: JTAConnection leaked due to using it in non-xa mode without close it


    Hi,

    Here are the part of deployment descriptors of the session bean;

    * @ejbgen:session
    * max-beans-in-free-pool = 1000
    * initial-beans-in-free-pool = 0
    * trans-timeout-seconds = 0
    * type = Stateless
    * default-transaction = Required
    * transaction-type = Container
    * enable-call-by-reference = True
    * ejb-name = ProfileSessionEJB

    and for the EJB:

    * @ejbgen:entity
    * max-beans-in-cache = 1000
    * data-source-name = SMSTxDataSource
    * trans-timeout-seconds = 0
    * ejb-name = StopUnwantedEJB
    * reentrant = False
    * delay-database-insert-until = ejbPostCreate
    * concurrency-strategy = Database
    * table-name = stopunwanted
    * read-timeout-seconds = 600
    * prim-key-class = java.lang.Long
    * default-transaction = Required
    * abstract-schema-name = StopUnwantedEJB

    I think that the TX is set properly.


    "Slava Imeshev" wrote:
    >Vlada,
    >
    >I'd also check if the session bean method that calls the search method
    >runs in a transaction - it should have Required or Mandatory TX
    >attribute in its deployment descriptor.
    >
    >Slava
    >
    >
    >"Vlada V." wrote in message news:40acf1e4$1@newsgroups.bea.com...
    >>
    >> Hi,
    >>
    >> I have none.
    >>
    >>
    >> "Slava Imeshev" wrote:
    >> >Interesting. This message should print a stack trace. Do you have

    >it?
    >> >
    >> >Slava
    >> >
    >> >"Vlada V" wrote in message news:40acea6c@newsgroups.bea.com...
    >> >>
    >> >> Hi Slava,
    >> >>
    >> >> I close neither the statement nor the connection. I am using CMP

    >persistance
    >> >and
    >> >> @ejbgen:select stanza
    >> >> in the EJB. The definition of @ejbgen:select stanza is as follows:
    >> >>
    >> >> /**
    >> >> * @ejbgen:select
    >> >> * ejb-ql = "SELECT o.fromProId,o.mailStatus,count(o.mailId)

    >FROM
    >> >MailboxEJB
    >> >> AS o
    >> >> * WHERE o.fromProId = ?1
    >> >> * GROUP BY o.fromProId,o.mailStatus"
    >> >> */
    >> >> public abstract java.sql.ResultSet ejbSelectQueryMailboxSummaryOutbox(Long
    >> >pProId)
    >> >> throws FinderException;
    >> >>
    >> >> /**
    >> >> * @ejbgen:local-home-method
    >> >> */
    >> >> public java.sql.ResultSet ejbHomeGetMailboxSummaryOutbox(Long

    >pProId)
    >> >throws
    >> >> FinderException {
    >> >> return ejbSelectQueryMailboxSummaryOutbox(pProId);
    >> >> }
    >> >>
    >> >> I call the method "getMailboxSummaryOutbox" from the stateless session
    >> >bean. This
    >> >> is correct because
    >> >> I am getting the correct result from Oracle.
    >> >>
    >> >> Regarding the connection I expect WebLogic to close it. The same

    >is
    >> >with the statement
    >> >> in the EJB.
    >> >>
    >> >> Am I right?
    >> >>
    >> >>
    >> >> "Slava Imeshev" wrote:
    >> >> >Vlada,
    >> >> >
    >> >> >Can you show us how you close the Statement and the connection?
    >> >> >
    >> >> >Regards,
    >> >> >
    >> >> >Slava Imeshev
    >> >> >
    >> >> >"Vlada V." wrote in message news:40acc99b$1@newsgroups.bea.com...
    >> >> >>
    >> >> >> I am running WebLogic 8.1 and developing small Web applications
    >> >with
    >> >> >CMP persistance.
    >> >> >>
    >> >> >> This is the part of my code causing the problem:
    >> >> >>
    >> >> >> ResultSet pInbox = null;
    >> >> >> try {
    >> >> >> pInbox = mailboxHome.getMailboxSummaryInbox(pProId);
    >> >> >> logger.debug("Inbox messages found for proId : "+pProId);
    >> >> >> while (pInbox.next()) {
    >> >> >> if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_READ))
    >> >> >{
    >> >> >> pSummary.setReadStatusInbox(SMSConstants.MESSAGE_S TATUS_READ);
    >> >> >> pSummary.setNumOfReadInbox(new Long(pInbox.getLong(3)));
    >> >> >> }
    >> >> >> else if (pInbox.getString(2).equals(SMSConstants.MESSAGE_S TATUS_UNREAD))
    >> >> >> {
    >> >> >> pSummary.setUnreadStatusInbox(SMSConstants.MESSAGE _STATUS_UNREAD);
    >> >> >> pSummary.setNumOfUnreadInbox(new Long(pInbox.getLong(3)));
    >> >> >> }
    >> >> >> }
    >> >> >> pInbox.close(); // closing the result set
    >> >> >> logger.debug("Inbox connection closed for proId = "+pProId);
    >> >> >> }
    >> >> >>
    >> >> >> I am getting warning message:
    >> >> >>
    >> >> >>

    >JDBC
    >> >> >pool connection
    >> >> >> leak was detected.
    >> >> >> A connection leak occurs when a connection obtained from the

    >pool
    >> >was
    >> >> >not closed
    >> >> >> explicitly by calling
    >> >> >> close() and then was disposed by the garbage collector and returned
    >> >> >to the connection
    >> >> >> pool.
    >> >> >> The following stack trace at create shows where the leaked connection
    >> >> >was created.
    >> >> >>
    >> >> >> JTAConnection leaked due to using it in non-xa mode without close
    >> >it.>
    >> >> >>
    >> >> >> In my code I am closing the result set. It looks like that close()
    >> >> >has not any
    >> >> >> effect.
    >> >> >>
    >> >> >> Any help?
    >> >> >
    >> >> >
    >> >>
    >> >
    >> >

    >>

    >
    >