• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

remove method + transaction attribute

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I'm doing laundry! Look how clean this tiny ad is:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic