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

Should I use EJB ?  RSS feed

 
Vesko Jel
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two Java SE projects , which makes some calculations and JDBC stuff and I'm wondering whether to "convert" them to EJB modules or use like class libraries. The reason why thinking about EJB is because of clear business logic and that they could become services.

1. Could I just make them stateless beans?
2. What are pros and cons and am I missing something?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You generally make something an EJB if you want to use EJB services (transaction, security, etc) or plan to expose them as a web service. One thing to think about is who your callers are. If they are all in the same application, you can create the EJB later when the need arises.
 
Vesko Jel
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Callers are different web modules. This is the reason to reorganize the code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!