> Hi, > > This is what happening..... We are using Struts framework.... > > From within the Action class, we are calling "modifyClientDetails" > defined in > the Client Session Bean. This in turn calls "modifyClientDetails" in > ClientDAO. From within ClientDAO, "findByPrimaryKey" is called which is > defined in CastorMain. It is within the CastorMain that the actual > database > calls occur. > > I am looking up for a DataObject and then performing "getDatabase()" on > it. I > don't need to perform db.begin() or db.commit() as the transaction is > CMT. > > > Any suggestions why the connection does not get closed automatically ?
> Although it opens up and transaction occurs successfully with Database > being > updated. > > Regards, > Arijit > > > > > ClientBean > ---------- > > public void modifyClientDetails(Client aClientEntity){ > clientdao.modifyClientDetails(aClientEntity); > } > > > > ClientDAO > --------- > > public void modifyClientDetails(Client aClient) throws > ApplicationException { > > ..... > > try{ > clientJDO = (ClientJDO)castor.findByPrimaryKey(ClientJDO.class, new > Long(aClient.getClientID())); > BeanUtils.populate(clientJDO,BeanUtils.describe(aClient)); > }catch(Exception e){ > ...... > } > } > > > > CastorMain > ---------- > . > . > . > dobj = (DataObjects) ctx.lookup( "java:/comp/env/jdo/mydb" ); > . > . > . > > public Object findByPrimaryKey(Class aClass, Object aKey) throws > CastorException > { > OQLQuery findOql; > Object aData = null; > try > { > db = dobj.getDatabase(); > aData = db.load(aClass, aKey); > } > catch(Exception e) > { > ...... > } > finally > { > try > { > if(db!=null) db.close(); > } > catch(PersistenceException e) > { > ...... > } > } > return aData; > } > > > > > Regards, > Arijit > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user