[jboss-user] [JBoss Seam] - Running the Booking sample on MS SQL Srv hungs when pressing

kaolle do-not-reply at jboss.com
Wed Jan 3 13:33:46 EST 2007


Hi 
Is there anyone that knows how to get the booking sample to fully work with the MS SQL Server.  I've changed the booking-ds.xml to:

<?xml version="1.0" encoding="UTF-8"?>


    <local-tx-datasource>
        <jndi-name>bookingDatasource</jndi-name>
           <connection-url>jdbc:jtds:sqlserver://localhost:1433;DatabaseName=booking;SelectMethod=cursor;user=sa;password=xx</connection-url> 
        <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>

    </local-tx-datasource>


when I press the final "confirm"-button which fires the "hotelBooking.confirm" the transaction hungs. My Jboss server.log looks like this:

2007-01-02 18:55:17,843 DEBUG [org.jboss.seam.core.Events] Processing event:bookingConfirmed
2007-01-02 18:55:17,843 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: bookingList
2007-01-02 18:55:17,859 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] ++++ LongLivedSessionPropagationInterceptor
2007-01-02 18:55:17,859 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: user
2007-01-02 18:55:17,859 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
2007-01-02 18:55:17,859 DEBUG [org.jboss.seam.Component] selected row: null
2007-01-02 18:55:17,859 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4783147081150464
2007-01-02 18:55:17,859 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-01-02 18:55:17,859 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2007-01-02 18:55:17,859 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-01-02 18:55:17,859 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
2007-01-02 18:55:17,859 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-01-02 18:55:17,859 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2007-01-02 18:55:17,859 DEBUG [org.hibernate.SQL] select booking0_.id as id0_, booking0_.user_username as user10_0_, booking0_.checkinDate as checkinD2_0_, booking0_.checkoutDate as checkout3_0_, booking0_.hotel_id as hotel11_0_, booking0_.creditCard as creditCard0_, booking0_.smoking as smoking0_, booking0_.beds as beds0_, booking0_.creditCardName as creditCa7_0_, booking0_.creditCardExpiryMonth as creditCa8_0_, booking0_.creditCardExpiryYear as creditCa9_0_ from Booking booking0_ where booking0_.user_username=? order by booking0_.checkinDate
2007-01-02 18:55:17,859 INFO  [STDOUT] Hibernate: select booking0_.id as id0_, booking0_.user_username as user10_0_, booking0_.checkinDate as checkinD2_0_, booking0_.checkoutDate as checkout3_0_, booking0_.hotel_id as hotel11_0_, booking0_.creditCard as creditCard0_, booking0_.smoking as smoking0_, booking0_.beds as beds0_, booking0_.creditCardName as creditCa7_0_, booking0_.creditCardExpiryMonth as creditCa8_0_, booking0_.creditCardExpiryYear as creditCa9_0_ from Booking booking0_ where booking0_.user_username=? order by booking0_.checkinDate
2007-01-02 18:55:17,859 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() stefan -> username [1]
2007-01-02 19:00:17,828 WARN  [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=se10offws0009/37, BranchQual=, localId=37] timed out. status=STATUS_ACTIVE
2007-01-02 19:00:17,859 WARN  [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=se10offws0009/38, BranchQual=, localId=38] timed out. status=STATUS_ACTIVE

end server.log extract

I compared this with the corresponding log when I used the default database engine: HSQL 

which looks like this:
2007-01-03 18:49:18,906 DEBUG [org.jboss.seam.core.Events] Processing event:bookingConfirmed
2007-01-03 18:49:18,906 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: bookingList
2007-01-03 18:49:18,906 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] ++++ LongLivedSessionPropagationInterceptor
2007-01-03 18:49:18,906 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: user
2007-01-03 18:49:18,906 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: user
2007-01-03 18:49:18,906 DEBUG [org.jboss.seam.Component] selected row: null
2007-01-03 18:49:18,906 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4783499505278976
2007-01-03 18:49:18,906 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-01-03 18:49:18,906 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
2007-01-03 18:49:18,906 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
2007-01-03 18:49:18,906 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
2007-01-03 18:49:18,906 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-01-03 18:49:18,906 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2007-01-03 18:49:18,906 DEBUG [org.hibernate.SQL] select booking0_.id as id0_, booking0_.user_username as user10_0_, booking0_.checkinDate as checkinD2_0_, booking0_.checkoutDate as checkout3_0_, booking0_.hotel_id as hotel11_0_, booking0_.creditCard as creditCard0_, booking0_.smoking as smoking0_, booking0_.beds as beds0_, booking0_.creditCardName as creditCa7_0_, booking0_.creditCardExpiryMonth as creditCa8_0_, booking0_.creditCardExpiryYear as creditCa9_0_ from Booking booking0_ where booking0_.user_username=? order by booking0_.checkinDate
2007-01-03 18:49:18,906 INFO  [STDOUT] Hibernate: select booking0_.id as id0_, booking0_.user_username as user10_0_, booking0_.checkinDate as checkinD2_0_, booking0_.checkoutDate as checkout3_0_, booking0_.hotel_id as hotel11_0_, booking0_.creditCard as creditCard0_, booking0_.smoking as smoking0_, booking0_.beds as beds0_, booking0_.creditCardName as creditCa7_0_, booking0_.creditCardExpiryMonth as creditCa8_0_, booking0_.creditCardExpiryYear as creditCa9_0_ from Booking booking0_ where booking0_.user_username=? order by booking0_.checkinDate
2007-01-03 18:49:18,906 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() stefan -> username [1]
2007-01-03 18:49:18,906 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
2007-01-03 18:49:18,906 DEBUG [org.hibernate.loader.Loader] result row: EntityKey[org.jboss.seam.example.booking.Booking#1]

It seems that the "...AbstractBatcher" could never open the booking ResultSet for some reason when I'm using the MS SQL Server.

I'm currently running JBoss SEAM 1.1 GA with JBoss Server 4.0.5 GA 
I've also tried the Jboss SEAM 1.0.1 GA with JBoss 4.0.4 EJB3-RC8 with the same problem as result.

Please, someone help me!!   

/kaolle



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997656#3997656

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997656



More information about the jboss-user mailing list