• Post Reply Bookmark Topic Watch Topic
  • New Topic

Static Methods in Entity Bean  RSS feed

 
Mann B
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am working on a project on Weblogic 4.5. We have Entity Beans for Database Access, and all the database access is done through static methods in the EJB. And in turn they are called by session Beans so no remote access issue. Its working fine. Now the issue is, is this way of usage of Entity Beans is good? Also will there be any concurrancy and sunchronization related issues? For e.g. if more than one cilent accessing the same static method at same time, what will happen? one will wait while other gets processed?
Anticipating Ans from all directions
Thanks in Advance
Mann
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mann, because our naming policy requires both a first name (or initials) and a last name, I'll have to ask you to change your display name accordingly.
Thanks.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, considering that putting a static method on an Entity bean violates the EJB specification, I'd say no, that's not an appropriate way of doing things.
Kyle
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
considering that putting a static method on an Entity bean violates the EJB specification

It is only the business/home/select method that cannot be static, other methods can be static. Defining static methods in a bean class does not make sense though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!