• 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

Shall I Use EJB or Java Interfaces

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are working for a project which is developed using Servlets,
Stateless EJB and Hibernate. Basic HTTPServlet will receive request
data from client and it delegates processing job to respective
stateless EJB. The request message is an XML string(some times size >
5 KB). DAO layer using Hibernate will take care of accessing database.
There are some handler, utility classes which have calls from EJBs.
According to our business logic, No need of maintaining transactions
and security at EJB layer. Application is running in Jboss App server.
We are using mysql data source manged by Jboss and accessing from
Hibernate DAO layer

My Question is: In this case, Should I use Stateless EJB or Shall I go
with normal java interfaces ?
What is the necessity of EJB layer here ?
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you go with interfaces and when you think they fit better as EJBs you can transform them to EJB(vers 3+) with no so much effort.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Other option would be directly use EJB3, You will not have to spend lot of time on coding. If you have to use transactions and security in future there will not be any need to refactor your code.
 
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not understand your desing. You have wtitten that you do not need any transactions. So you have thread local Hibernate sessions that are not associated with JPA transactions?
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic