-->
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.  [ 4 posts ] 
Author Message
 Post subject: JBoss JMX Synchronization issue
PostPosted: Fri Aug 06, 2004 11:00 am 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:35 pm
Posts: 35
All,

I have Hibernate working as a JMX bean within JBoss. I have it working perfectly except I am seeing some weird behavior with caching, I think. By default, I do not turn on caching. The behavior I am seeing is that, I insert/update a row in the database in Session 1 [Thread Local Session in the 1 session per view pattern] and it gets written correctly to the database, by if I immediately turn around a attempt to display retrieve that row [via another Session] the update information does not display. but if I change to a different record and go back to that one, it displays properly.

I have also seen this issue occur, if I update the database directly I see the same behavior.

The version of Hibernate I am using is 2.1.2, JBoss 3.2.3 and Microsoft SQL Server 2000. I am using the MS JDBC driver.

Thanks,

Ron


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 09, 2004 12:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Has the transaction commited?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 09, 2004 9:20 pm 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:35 pm
Posts: 35
Near as I can tell it has. My jboss-service.xml looks like the following:

<?xml version='1.0'?>
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=TIMHibernateFactory,name=TIMHibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=TIMDS</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">
mappings/com/tascon/tim/hibernate/AccessoriesSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/AdditionalCabinetSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/AutumnRunSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/AssociateReportView.hbm.xml,
mappings/com/tascon/tim/hibernate/BathroomSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/ClosingInfo.hbm.xml,
mappings/com/tascon/tim/hibernate/Commission.hbm.xml,
mappings/com/tascon/tim/hibernate/Contact.hbm.xml,
mappings/com/tascon/tim/hibernate/CustomerService.hbm.xml,
mappings/com/tascon/tim/hibernate/ExteriorSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/FanSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/FinalSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/FinancingInfo.hbm.xml,
mappings/com/tascon/tim/hibernate/FlooringSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/InteriorSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/Issue.hbm.xml,
mappings/com/tascon/tim/hibernate/June27AutumnRunUsingmap.hbm.xml,
mappings/com/tascon/tim/hibernate/KitchenSelection.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupCommunity.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupBuildingNumber.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupBuildingType.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupSidingColor.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupSidingType.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupBrickColor.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupStoneColor.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupShingleColor.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupContactLevel.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupCsStage.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupDateNeeded.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupFloorplan.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupHom.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupPriceRange.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupRoom.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupSource.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupStage.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupStatu.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupSubcontractor.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupTaskType.hbm.xml,
mappings/com/tascon/tim/hibernate/LookupType.hbm.xml,
mappings/com/tascon/tim/hibernate/Message.hbm.xml,
mappings/com/tascon/tim/hibernate/PricingRul.hbm.xml,
mappings/com/tascon/tim/hibernate/Realtor.hbm.xml,
mappings/com/tascon/tim/hibernate/RealtorVisitView.hbm.xml,
mappings/com/tascon/tim/hibernate/RealtyCompany.hbm.xml,
mappings/com/tascon/tim/hibernate/Report.hbm.xml,
mappings/com/tascon/tim/hibernate/ReportAssociat.hbm.xml,
mappings/com/tascon/tim/hibernate/ReportField.hbm.xml,
mappings/com/tascon/tim/hibernate/SalesAssociatesView.hbm.xml,
mappings/com/tascon/tim/hibernate/SalesOpportunity.hbm.xml,
mappings/com/tascon/tim/hibernate/SalesReportView.hbm.xml,
mappings/com/tascon/tim/hibernate/Task.hbm.xml,
mappings/com/tascon/tim/hibernate/TaskArchive.hbm.xml,
mappings/com/tascon/tim/hibernate/TextForTim.hbm.xml,
mappings/com/tascon/tim/hibernate/TimUser.hbm.xml,
mappings/com/tascon/tim/hibernate/TrafficReportView.hbm.xml,
mappings/com/tascon/tim/hibernate/TrellisCrossingSelection.hbm.xml
</attribute>
<attribute name="JndiName">TIMHibernateFactory</attribute>
<attribute name="Datasource">java:/TIMDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.SybaseDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>
</server>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 12:30 am 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:35 pm
Posts: 35
Okay, you got me thinking, and I realized that this was a classic problem. I am idiot! For some reason even though I was explicitly closing my sessions [via aspectj], for some reasons it was not happening. I moved the open/close code into a JSP Filter and it worked like a champ!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.