From: Ara A. <ar...@ya...> - 2002-07-30 19:41:25
|
Check out from cvs. It no longer caches it. A new instance is created whenever you call getData(). Ara. > -----Original Message----- > From: xdo...@li... [mailto:xdoclet-user- > ad...@li...] On Behalf Of manish sharan > Sent: Tuesday, July 30, 2002 4:19 AM > To: xdo...@li... > Subject: [Xdoclet-user] refreshing the data object after setXX modifies > the bean > > > Hi > > I am using xdoclet and its is the greatest tool yet ! However , I have run > into this difficulty and am hoping one of the gurus can help me out. > > I have an ejb called Task. I have coded a TaskBean -- and defined xdoclet > tags etc. to do code generation. I am able to use this bean and everyting > works fine when I am accessing this bean through a session facade and > using > a call to taskLocal.getData() to view the ejb and taskLocal.setData( > TaskData ) to update the bean . The problem shows up when one of the ejb > clients uses a setter method directly on the ejb . For example, If I have > defined my setter and getter methods in the TaskBean such as: > > > > /** > * task Status > * @ejb:interface-method > * @ejb:persistent-field > * > * @ejb:transaction type="Required" > * @jboss:column-name "status" > * @weblogic:dbms-column status > * > */ > > public abstract int getStatus(); > > /** > * > * @ejb:interface-method > * @ejb:transaction type="Required" > */ > public abstract void setStatus( int st); > > > The problem shows up when one client (a timer based mdb)calls > taskLocal.setStatus(0). > > Now when my session bean accesses the taskBean, I am able to verify that > taskLocal.getStatus() is not the same as taskLocal.getData().getStatus(). > > > by looking at the xdoclet generated TaskCMP.java , I can tell that the > data > object is being cached. and calling the getData() method returns a cached > dataHolder object. The problem is that after the client invokes a specific > setter method , the data holder is not refreshed. > > How can I ensure that the taskLocal.getData() always loads the data fresh > into the data holder. > > > -regards > manish > > > > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > _______________________________________________ > Xdoclet-user mailing list > Xdo...@li... > https://lists.sourceforge.net/lists/listinfo/xdoclet-user |