Re: [JBoss-user] Readonly Methods ?

2001-05-28 Thread Per Lewau


On Sat, 26 May 2001, Chris DeGreef wrote:

> How do I make the getter methods in my CMP bean be readonly?  Apparently
> ejbStore is called when I call a get.. method.  A sample log4j output with
> log.debug statements in every method in my CMP bean.
> 
> 1043 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbActivate
> 1047 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbLoad()
> 1055 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - getName()
> 1063 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbStore()


Define a method isModified that returns true if the bean is modified and
false otherwise. 

public boolean isModified() {
return modifiedFlag;
}

The container will call isModified prior to calling ejbStore and only call
ejbStore if isModified returns true. This is not by the spec but JBoss
(and someone mentioned WebLogic) supports this. To remain compatible with
other EJB containers simply call the isModified method the first thing
you do in ejbStore.




---
Per Lewau ([EMAIL PROTECTED]) 

"Why waste time learning, when ignorance is instantaneous?"
- Hobbes


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Readonly Methods ?

2001-05-26 Thread Chris DeGreef

How do I make the getter methods in my CMP bean be readonly?  Apparently
ejbStore is called when I call a get.. method.  A sample log4j output with
log.debug statements in every method in my CMP bean.

1043 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbActivate
1047 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbLoad()
1055 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - getName()
1063 [Thread-28] DEBUG SchoolDataBean uhtuve8ku1 - ejbStore()


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user