• 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

ejbFindByPrimarykey and security questions

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, first question I posted on notes posted by Anurag, but there wasn't any reply...so I post a new one.

1)I need a quick correction if I'm not correct.........??? ejbFindByPrimaryKey doesnt need to have EJBQL......!!! I mean ...all finders except ejbFindByPrimaryKey need ejbql.
Please tell me the correct option....it will make me feel better

2) The App Assembler can differentiate between remote and local interfaces and home and local-home while specifing the security for methods...
<method-permission>
<role-name>Admin</role-name>
<method>
<ejb-name>UserEJB</ejb-name>
<method-name>setData</method-name>
<method-intf>local</method-intf>
</method>

</method-permission>

Can he do the same while specifing transaction attributes to methods in <method> element of <container-transaction> element? Since its same method element out there it may be ok...but XML parser may disallow it here....
What the spec say about this???
Amol.



Amol.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1)ejbFindByPrimaryKey doesnt need to have EJBQL......!!! I mean ...all finders except ejbFindByPrimaryKey need ejbql.
Please tell me the correct option....it will make me feel better


There is no need to specify the ejb-ql for this method. The container has enough information in the deployment descriptor, the primary key class/field, to generate the query.


2) The App Assembler can differentiate between remote and local interfaces and home and local-home while specifing the security for methods...
<method-permission>
<role-name>Admin</role-name>
<method>
<ejb-name>UserEJB</ejb-name>
<method-name>setData</method-name>
<method-intf>local</method-intf>
</method>

</method-permission>

Can he do the same while specifing transaction attributes to methods in <method> element of <container-transaction> element? Since its same method element out there it may be ok...but XML parser may disallow it here....


Yes, of course. As an application assembler, I would like to have different transaction attributes for the methods of remote than that of local interface. Also, as long as the DTD of <method> element allows <method-intf> element, why would you think that the parse may complain? It won't.
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
Thankx Keerti , yeah in fact I also thought it would allow, but since HF and Spec are mum about it, I raised the concern.

You have been very co-operative and responsive, I thank you for that.
Amol.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic