• 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

Directory Structure

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if this is the right forum to post my question.

I am working on a J2ee Application using Jsp, Struts, EJB technologies.

Tha target enviroment of the system would be Oracle 10g AS (this is one more reason why I am posting this here) with clustered environment.

In my application, I have a bunch of
- Java classes like ActionForms, ActionClasses, Facade Classes (used to lookup for EJB), Service Locator(Used to cache EJB home objects) which are more specific to presentation tier. Hence I thought I could hold in the WAR file along with JSP and other WEB deployment descriptors and struts files.

- EJB Business components and database components with some of the POJO's (Utility classes)that are used by EJB components. Hence I thought I would bundle them in a jar file along with Deployment Descriptors.

- Transfer Objects, some String and Date parser utilities which are implemeted using POJO's. These classes are used by both Web and Business components. Now I am not that clear where I have to bundle these classes.

As the target environment could be a clustered env where there is potential that web and business components could use different JVM's, if I plan to bundle them with Business components, then will my web components will be able to access these POJO's.

I see one solution, But I am not sure if it really happens in real world. solution would be to have business component jar file in the class path. so that web component can use them.

With Oracle 10g Application, the stubs and skels of the EJB are generated at runtime when client (web component) in this case issues request onto the EJB. I guess at that point of time, the application server ships stubs onto the client side. I am not sure how this works with POJO's.

I would greatly appreciate if you could help me in comming up with a good directory structure and if possible help me undertanding the architecture.

I would also greatly appreciate if you could point out some of the important considerations that need to be taken care of while developing the product for clustered environment.

Thank you very much in advance
Saritha
[ November 03, 2004: Message edited by: Saritha ventrapragada ]
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Saritha,
This could have been posted either here or the J2EE forum. So here is fine.

I would put the things used by both the EJB and Web projects is a separate project/jar. Then refer to the jar from both projects. (I think this is the same as the solution you are describing.) If you don't want to do that, put them in the EJB project. The EJB should not reference the Web project. Remember that the POJOs are just code. Each clustered instance will have it's own copy of the class. And the object itself will get passed around as needed.

Why are the stubs/skeletons generated at runtime? We generate ours at deployment time.

Also, I recommend using the "prefer local" setting so the web project usually calls the EJB project on the same server. It's more efficient that way.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I recommend using the "prefer local" setting so the web project usually calls the EJB project on the same server. It's more efficient that way.


I agree with Jeanne. That's why EJB 2.0 provides the capability of Local interfaces.

BTW, Jeanne, I would like to ask which deployment tool you use for deploying J2EE applications on Oracle10g AS. JDeveloper?

Nick
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nick,
I actually use WebSphere, not OAS. (I'm moderating this forum because I'm interested in learning new things. And I do know about the Oracle db.) I use WSAD to deploy to WebSphere because it provides an easy deployment. Presumably, it is similar with JDeveloper.
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Jeanne,

I guess I will go with making all common classes in a seperate jar file, that can be used by both EJB and WEB components

Thank you very much for clarifying my doubt
Saritha
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I actually use WebSphere, not OAS.


So do I. I guess IBM's WAS and WSAD have a large portion of coverage on the AS market, isnt it?

Nick
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I guess I will go with making all common classes in a seperate jar file, that can be used by both EJB and WEB components


Or you may create a seperate project that contains all common classes, and set it in the classpath as well as a dependent project.

Your IDE would help you to do all these.

Nick
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:

So do I. I guess IBM's WAS and WSAD have a large portion of coverage on the AS market, isnt it?

Nick


Yes I believe the big three are WebSphere, WebLogic and JBoss (in no particular order. But OAS must have sufficient market share to warrant writing a book!
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the existance of OAS aims to provide a better integrated J2EE platform with Oracle DB, even though there is no evidence for this at all, but it seems that Oracle has a strong reason to do that.

Nick
 
reply
    Bookmark Topic Watch Topic
  • New Topic