aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes java bean subsystem? 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 "java bean subsystem?" Watch "java bean subsystem?" New topic
Author

java bean subsystem?

Clarice Lin
Greenhorn

Joined: Jan 16, 2003
Posts: 10
Currently I'm comin up with a internet portal for my final year project.Got some problems in understanding about system architecture.
When we talk about system architecture and the n-tier model,is javabeans included as a tier?
for example,The tiers used for this example include the client, presentation, business logic, integration, and data.
if i want to include a chat room or discussion forum in my structure, which tier does it fall under?
i used this site as reference
http://www.macromedia.com/desdev/articles/ntier.html
Can anyone kindly explain to mi?Or some reference sites that will enhance my understandin on this?
thank you.
Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 307
Originally posted by Clarice Lin:
... n-tier model,is javabeans included as a tier?

Hi Clarice,
I assume you are talking about ordinary JavaBeans (according to JAF - Java Activation Framework) and not Enterprise JavaBeans (EJB), which have pretty different technologies.
JavaBeans when used in GUI programming I would put into client tier.
JavaBeans called in JSPs work for the server and can not make things like _client-side_ input validation.
JavaBeans called by JSPs or servlets (in web tier) may recide in the web tier too (but not EJBs). What good reasons exist to introduce an additional tier for the JavaBeans? They would have to be in the web container anyway (not EJB container). Logically splitting the web tier into a "normal web tier" and a "JavaBean web tier" would separate JSP/servlet code from JavaBean code, ok. You could have only your "JavaBean web tier" access the database directly via JDBC. The "normal web tier" would be free of data access functionality. But at this point I would think about treating the JavaBeans being "the data access tier", i.e. "the enterprise integration tier" (with no business logic (EJB) tier between). This assumes that you do not have EJBs anyway; otherwise there would be an uggly mix of EJBs and JavaBeans. I appreciate your intents but I would just put your JavaBeans into different _packages_. Do you others agree?
When your JavaBeans are to separate the business logic without using EJBs: Then the JavaBeans are the business logic tier but run in the web container (but are not part of the web tier). Would that still be worth to use a J2EE _application_ server?
You even could use JavaBeans in the business logic tier calling specialized JavaBeans in the data access tier for reasons of _logically_ splitting into all the recommended tiers. But only if you use an EJB tier as
your business logic tier then you get the additional _non-logical_ benefits of scalability for the business logic tier. So if you probabely will need scalability of the business logic tier then you should use EJBs instead of JavaBeans.


... chat room ..., which tier does it fall under?

Assuming your business logic tier is to be an EJB tier I would put the chatter into a session EJB. Each chatter starts a session. If there are member variables to be saved from request to request then you will need a statefull session EJB, otherwise a stateless one.


... discussion forum ..., which tier does it fall under?

The discussion forum can be a stateLESS EJB because a new topic is sent as "fire-and-forget". In replies each replier has his own session (i.e. with another session state). Do you agree?
(BTW the article you quoted did not help me deciding anything - too vendor specific and no relation to chat rooms or discussion forums)
Thomas.


www.classic-and-class.com - www.evalulearn.com
Interfaces are the glue of OO.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java bean subsystem?
 
Similar Threads
3-Tier or 2-Tier?
Three-Tier vs. Multi-Tier
Multi-tier architecture
Tiers and layers - integration
Is this right architecture