Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Delay looking up Stateless Session Bean  RSS feed

 
Mateus Lucio
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody!
I'm maintaining an application that uses Tapestry and EJB 3, and in all my tapestry services I look up session beans on demand, this feature is implemented using the Service Locator pattern, after that, the session bean is cached for future use.

Now the real problem:
In some cases the look up is made by an AJAX request, at that moment the bean is not cached yet, so the AJAX request has the look up overhead. That situation sometimes causes me problems because of chained AJAX request (I'm also working to fix that).

I wonder if it's a better choice to look up all beans I need at once, what could possibly cause the delay during the look up? Any resources, JPA maybe?
Or is my theory just a shoot in the dark?

I hope I could make myself clear, English is not my native language.

Thanks in advance.
 
Mateus Lucio
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well ... I studied a little bit more about EJB and I came to the conclusion that looking up beans from anything that is not in the same jar/ear of that bean has an extra overhead, because it has to deal with all the remote issues.

I'll keep running my tests and if anything comes up, I'll post again!


Anyway thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!