-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Does the Transaction Commit
PostPosted: Mon Oct 06, 2008 3:46 am 
Newbie

Joined: Tue Aug 26, 2008 7:01 am
Posts: 12
Location: Zuerich, Switzerland
Hi

The only thing I could figure out was that the weblogic itself shows the transaction as commited. But I guess that Hibernate does somehow not get informed about that commit.... I thought that my configuration is wrong and that I am missing an important point in configuration but couldn't figure it out.

I don't saw anything that hibernate get's information about a commiting transaction. So you'll find the log configuration and the log output below.

Could you give me some hint what to look into?

Log4j.properties:
As far as I understood my hibernate logging should be on debugg. Below my configuration:

Code:
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### direct messages to file hibernate.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=C:/bea103/wlserver/samples/domains/medrec/servers/MedRecServer/logs/hibernate.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.rootLogger=warn, stdout, file

#log4j.logger.org.hibernate=info
log4j.logger.org.hibernate=debug

### log HQL query parser activity
#log4j.logger.org.hibernate.hql.ast.AST=debug

### log just the SQL
#log4j.logger.org.hibernate.SQL=debug

### log JDBC bind parameters ###
log4j.logger.org.hibernate.type=info
#log4j.logger.org.hibernate.type=debug

### log schema export/update ###
log4j.logger.org.hibernate.tool.hbm2ddl=debug

### log HQL parse trees
#log4j.logger.org.hibernate.hql=debug

### log cache activity ###
#log4j.logger.org.hibernate.cache=debug

### log transaction activity
#log4j.logger.org.hibernate.transaction=debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc=debug

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace


Log Output when executing PatientRepositoryImpl.approvePatient(...)

As already said the Weblogic Transaction is commited started at the beggining of this slice and commited in the end

09:21:06,400 DEBUG SessionImpl:247 - opened session at timestamp: 12232776664
09:21:06,410 DEBUG JDBCContext:199 - successfully registered Synchronization
09:21:06,420 DEBUG AbstractEntityManagerImpl:439 - Looking for a JTA transaction to join
09:21:06,430 WARN AbstractEntityManagerImpl:543 - Cannot join transaction: do not override hibernate.transaction.factory_class
09:21:06,440 DEBUG Loader:1873 - loading entity: [com.bea.medrec.model.Patient#51]
09:21:06,450 DEBUG AbstractBatcher:410 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
09:21:06,460 DEBUG ConnectionManager:444 - opening JDBC connection
09:21:06,490 DEBUG SQL:111 -
select
patient0_.id as id1_0_,
patient0_.version as version1_0_,
patient0_.email as email1_0_,
patient0_.password as password1_0_,
patient0_.username as username1_0_,
patient0_.firstName as firstName1_0_,
patient0_.lastName as lastName1_0_,
patient0_.middleName as middleName1_0_,
patient0_.phone as phone1_0_,
patient0_.city as city1_0_,
patient0_.country as country1_0_,
patient0_.state as state1_0_,
patient0_.street1 as street13_1_0_,
patient0_.street2 as street14_1_0_,
patient0_.zip as zip1_0_,
patient0_.dob as dob1_0_,
patient0_.gender as gender1_0_,
patient0_.ssn as ssn1_0_,
patient0_.status as status1_0_
from
patients patient0_
where
patient0_.id=?
09:21:06,510 DEBUG AbstractBatcher:426 - about to open ResultSet (open ResultSets: 0, globally: 0)
09:21:06,519 DEBUG Loader:1197 - result row: EntityKey[com.bea.medrec.model.Patient#51]
09:21:06,549 DEBUG AbstractBatcher:433 - about to close ResultSet (open ResultSets: 1, globally: 1)
09:21:06,559 DEBUG AbstractBatcher:418 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
09:21:06,579 DEBUG ConnectionManager:427 - aggressively releasing JDBC connection
09:21:06,589 DEBUG ConnectionManager:464 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
09:21:06,599 DEBUG TwoPhaseLoad:130 - resolving associations for [com.bea.medrec.model.Patient#51]
09:21:06,609 DEBUG TwoPhaseLoad:226 - done materializing entity [com.bea.medrec.model.Patient#51]
09:21:06,619 DEBUG StatefulPersistenceContext:860 - initializing non-lazy collections
09:21:06,629 DEBUG Loader:1904 - done entity load


Top
 Profile  
 
 Post subject: Sorry
PostPosted: Mon Oct 06, 2008 3:50 am 
Newbie

Joined: Tue Aug 26, 2008 7:01 am
Posts: 12
Location: Zuerich, Switzerland
This post isn't a new thread, it's the a reply to Thread
"Problem / Question: EJB 3 with CMT and Hibernate 3.4 GA JPA"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.