Hi Adrian
Thanks you very much for the quick response.

        The issue described in the earlier mail(below) has been solved while using 
jboss-3.2.2RC4 ( latest jboss release ), as advised by you.
Now i am facing a new error.

        java.sql.SQLException: You cannot commit with autocommit set!

        I had also set  CachedConnectionManager in transaction-service.xml( 
SpecCompliant to true ) ),

code is given below:
===============
public Connection getConnection(){
        String m_strDefaultDataSource   ="java:comp/env/jdbc/Data";

        InitialContext ic                       = new InitialContext();
        DataSource m_dsCommmon  = ( DataSource ) ic.lookup( m_strDefaultDataSource );
        m_dbCon                 = m_dsCommmon.getConnection();
        m_dbCon.setAutoCommit(false);
        
        return m_dbCon;
}

private boolean storeSignInDetails(String  strUserName,String strClientIp , Connection 
m_dbCon){

        String strUserId        = getUserId();
        strUserId                       = ( null == strUserId )?"Invalid":strUserId;

        String strQuery ="//sql statement for logging //
        try{
                Statement stmt = m_dbCon.createStatement();
                int iCount = stmt.executeUpdate(strQuery);
                m_dbCon.commit();

        }catch(Exception e){
                e.printStackTrace();
                return false;
        }

        return true;

        }

// Also pls note that i am not closing the connection, as this is used for further 
transaction.
// We are using bean managed transaction . We are handling the transaction using JDBC 
only (not using JavaTransaction API).
//Initially after successful logging of the user, the user details are logged and it 
is commited
        ( Given in the  above function --storeSignInDetails () ).
//Later it is commited , only when the user finishes his transaction.
// So we need to use setAutoCommit( false );

Is there any way to prevent this issue....

Also can u please clarify as to what JBoss is expecting. Do we need to disable 
CachedConnectionManager??
        

10:45:37,843 ERROR [STDERR] java.sql.SQLException: You cannot commit with autocommit 
set!
10:45:37,859 ERROR [STDERR]     at 
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit
BaseWrapperManagedConnection.java:494)
10:45:37,859 ERROR [STDERR]     at 
org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:465)
10:45:37,859 ERROR [STDERR]     at 
com.suntec.tbms3.ui.CUserValidateSB.storeSignInDetails(CUserValidateSB.java:318)

-----Original Message-----
From: Adrian Brock [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 8:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] error while trying to open a new connection


You'll have to provide some more information.
It says you are closing a connection that it does not know about
were there previous errors?

There has been some cleanup of the error checking in the 3.2.2RC 
releases can you check if you still have the problem with 3.2.2RC4?

This actual error shouldn't cause any problems it is a sanity
check in the internal datastructure tidyup code. 
I would expect the connection has already 
been tidied up by a previous error?

Regards,
Adrian

On Tue, 2003-09-23 at 15:46, rajeshnn wrote:
> Hi All
> While trying to create a new connection before closing an existing
> connection
> the following error  occured. 
> Can anyone pls help..
> 
> 
> java.lang.IllegalStateException: Trying to return an unknown
> connection2! org.jboss.resource.adapter
> [EMAIL PROTECTED]
>         at
> org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedC
> onnectionManager.java:275)
>         at
> org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connec
> tionClosed(TxConnectionManager.java:550)
>         at
> org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManag
> edConnection.java:280)
>         at
> org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:127)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
> org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll(CachedConnectionMan
> 
> Rajesh N Nair
> SunTec Business Solution,
> # 311, Nila ,Technopark, Trivandrum,
> Kerala, India. Pin:695581.
> Phone ( +91-471-2700984-95)
> 
> 
> 
>  
> 
> 
> ______________________________________________________________________
> This electronic mail (including any attachment thereto) may be
> confidential and privileged and is intended only for the individual or
> entity named above. Any unauthorized use, printing, copying,
> disclosure or dissemination of this communication may be subject to
> legal restriction or sanction. Accordingly, if you are not the
> intended recipient, please notify the sender by replying to this email
> immediately and delete this email (and any attachment thereto) from
> your computer system....Thank You
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



This electronic mail (including any attachment thereto) may be confidential and 
privileged and is intended only for the individual or entity named above. Any 
unauthorized use, printing, copying, disclosure or dissemination of this communication 
may be subject to legal restriction or sanction. Accordingly, if you are not the 
intended recipient, please notify the sender by replying to this email immediately and 
delete this email (and any attachment thereto) from your computer system...Thank You



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to