This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

design decision: variation of session fassade

 
nimo frey
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I have all my jpa-queries within a Stateless Session Bean.

Look at that:





Now, I am wondering what will be the drawbacks,
if I use a static method within the PersistenceBean returning the related Query-Instance to my session bean:






My Questions:

1. What version is better, version 1 or version 2 ? Why?

2. Are there any pitfalls when using entityManager-Instance within a static method?

3. Are there any lacks of performance when using a static method to retrieve a query-instance instead of retrieving it via a typical (non-static) ejb-method (for example, because of pooling or transaction, ..)?

4. In generally, are there any pittfalls, drawbacks, performance losses when using or invoking static methods within a ejb-bean ?

In my opinion, version 2 is better because of maintenance: I have all my query-related things of a object within the object itself. But I am really in doubt about my opinion.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic