aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Advise needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Advise needed" Watch "Advise needed" New topic
Author

Advise needed

Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Hi all,
I'm designing forum. Client side is applet. Storage of forum info is in Oracle DB.
What can you advise for server-side?
-EJB
-Servlets
-or smth. different
I want to use EJB(Entity BMP). What can you advise me?
Thanx,
Jamal.
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
I think that using applets and EJBs will be a overkill for designing a forum application. I would rather suggest use JSP and Servlets in a MVC architecture.


Shubhrajit
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
You think that Servlets must perform all Oracle connection/select/update/delete operations? Isn't too hard for servlet?
BTW, what is MVC?
Thanx,
Jamal
Maggy Zhang
Greenhorn

Joined: Dec 17, 2001
Posts: 8
You should use java bean to connect to DB. Servlet is just for controll and used to invoke corresonding java bean .
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Yes, i think that, there'll be
Applet <-> Servlet <-> EJB <-> OracleDB
But, what type of EJB can you suggest? Entity or Session?
Thanx,
Jamal
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
MVC Stands for Model View Controller
Use JSP for your front end. This is your view layer. You want to use applets... But I have not seen any forum which is designed with applets ... IMHO applets will be an overkill.
Use a Servlet as your application controller. All forms in JSPs are posted to this servlet, which then delegates it's job to different java beans ( not EJBs) to carry out your business logic.
The java beans will wrap your business logic, make database calls, etc... This is your model
After doing processing the controller will forward its response to another JSP.

Using EJBs for such a simple application will definitely be an overkill. Still, if you insist to use EJB...
1. Session beans can be used to do anything ... however people use entity beans as they offer a good logical design... they can model a database entity.
2. If you use entity beans, be careful when you design your finder methods. If any finder method uses a query like 'select * from java_ranch_users' huge amount of entity beans will be instantiated(No of rows of the table), which will deteriorate performance (If it does not crash the server)

Originally posted by Jamal Hasanov:
Yes, i think that, there'll be
Applet <-> Servlet <-> EJB <-> OracleDB
But, what type of EJB can you suggest? Entity or Session?
Thanx,
Jamal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Advise needed
 
Similar Threads
Tips needed to start off SCWCD
Please advice
@Ejb annotation does not work
request scope question
SCBCD beta