• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

remove method + transaction attribute

 
cyril vidal
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

in spec p.352, it's said that for an entity bean, the transaction attributes must be specified, for the methods defined in the component interface and all the direct and indirect superinterfaces of the component interface, exluding some methods, and including by example remove() from EJBObject.

My question is the following: how we do to declare it in the DD, under the name of ejbRemove()?
And what about the EJBHome's remove(Object PK) and remove(Handle handle) ? We declare them also under the name of ejbRemove() in the DD?



Thanks for your response,
Regards,
Cyril.
 
X. Li
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think they should be remove() methods in Component/Home interfaces. You can use <method-intf> Home/Remote/LocalHome/Local <method-intf> to differentiate them.
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Perhaps we should declare the transaction attribute in the following way:

EJBObject.remove()



and for ejbHome.remove(Object PK):




Regards,
Cyril.
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that if any element <method-intf> is specified, as in following extract:



then all of the methods EJBLocalHome.remove(Object PK), EJBHome.remove(Object PK) and EJBHome.remove(Handle h), EJBObject.remove() and EJBLocalObject.remove() will be assigned a transaction attribute Required, because without any method-int element specified, the transaction attribute applies to all the methods remove() (including overloaded ones).

Regards,
Cyril.
 
X. Li
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I misunderstood your original question and gave wrong reply: element <method-intf> is used within <method-permission> element, not for <container-transaction> element.

I don't if we should use "remove" or "ejbRemove" for <method-name> element in <container-transaction>, but I don't think we need differentiate it from Home interface or component interface, becasue all removes go to a ejbRemove in bean class.

Who knows which method name ("remove" or "ejbRemove") should be used in <container-transaction> element?

Thanks,

X.Li
 
Swamy Nathan
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<!ELEMENT method (description?, ejb-name, method-intf?, method-name,
method-params?)>
Can be Used in: container-transaction, exclude-list, method-permission

Method names must be of client view when dealing with session and entity beans. Method names must be of business and business like methods in terms of beanness.

Method names must onMessage when dealing with MDBs.
(I dont know if in MDB we are allowed to specify ejbCreate and ejbRemove() for container-transaction, exclude-list, method-permission)

All this is my guesswork.
Yet to read the ejbspec.
Yet to read the DTD properly.

[ November 28, 2004: Message edited by: Swamy Nathan ]
[ November 28, 2004: Message edited by: Swamy Nathan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic