Extend Login Class - Websphere

This is a discussion on Extend Login Class - Websphere ; I create a class LoginUserAuth that extends com.ibm.wps.engine.commands.LoginUserAuth. In doPostLogin method I want to register in a DB2 Database the date of login. I use the file in attach to get connection to database. If I execute some SELECT SQL ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Extend Login Class

  1. Extend Login Class

    I create a class LoginUserAuth that extends com.ibm.wps.engine.commands.LoginUserAuth.

    In doPostLogin method I want to register in a DB2 Database the date of login.

    I use the file in attach to get connection to database. If I execute some SELECT SQL from that database-table, I have no problem and results are ok.

    When I execute the update SQL the connection not respond. And after some 5 minutes appears a message in log file:



    3/11/08 1:13:57:541 WET 00000064 InternalGener I DSRA8203I: Database product name : DB2/LINUX

    3/11/08 1:13:57:546 WET 00000064 InternalGener I DSRA8204I: Database product version : SQL08027

    3/11/08 1:13:57:547 WET 00000064 InternalGener I DSRA8205I: JDBC driver name : IBM DB2 JDBC Universal Driver Architecture

    3/11/08 1:13:57:550 WET 00000064 InternalGener I DSRA8206I: JDBC driver version : 2.9.31

    3/11/08 1:13:57:552 WET 00000064 WSRdbDataSour I DSRA8208I: JDBC driver type : 4

    3/11/08 1:13:57:931 WET 00000064 SharedPool I J2CA0086W: Shareable connection MCWrapper id 55982fb9 Managed connection WSRdbManagedConnectionImpl@55c4afb9 State:STATE_TRAN_WRAPPER_INUSE

    from resource jdbc/usrlogon was used within a local transaction containment boundary.

    3/11/08 1:18:04:308 WET 00000064 ConnectionEve A J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource jdbc/usrlogon. The exception which was received is com.ibm.websphere.ce.cm.StaleConnectionException: Execution failed due to a distribution protocol error that caused deallocation of the conversation. The command requested could not be completed because of a permanent error condition detected at the target system. DB2ConnectionCorrelator: GA4D0144.K184.080311011332

  2. Re: Extend Login Class

    I already find a solution, that I think is not the better.



    If I don't use the connection managed by server(ctx.lookup(USRLOGON_JNDI_NAME)), and create connection using driver



    DriverManager.registerDriver(new com.ibm.db2.jcc.DB2Driver());

    conn = DriverManager.getConnection("jdbc:db2://10.77.1.69:50001/USRLOGON", "db2user", "db2pwd");

    No problem occurs.



    Some has some suggestion for this problem.

+ Reply to Thread