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

Can 2 ear files talk to each other  RSS feed

 
nand rai
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have application that i want to break into multple sub application.


Can i break one ear file into multiple ear files, if so how i can maintain the session and the security between the two.

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do this? What is it you are trying to achieve? How do you want ot divide yuior application?

 
nand rai
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:Why do you want to do this? What is it you are trying to achieve? How do you want ot divide yuior application?



My application is getting bigger and bigger, so i would like break the app into multiple sub appliaction.

The flow is as follows.

1)Client log in to the applications.
user is validated

2) Based on the user's role a menu is displayed on the left.

3) When the user click the link i would like to go to a (new ear) or (a new war file with in a ear).


My question here is when i click the link and if i go to a different ear or war file, how will i maintain the security and roles of the user in the other war or ear file.

I guess we cannot Share the session between the war files or Ear files.

Thanks
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBs can communicate with each other using RMI/IIOP, and a servlet can use networking APIs to call on any other resource available over the HTTP protocol, so, EJBs and Servlets can certainly interact with EJBs and Servlets packaged in different EARs, or even deployed to different servers.

However, the semantics do differ. War files, even if in the same war, cannot share session data by default. Security contexts don't span multiple ears. Transactional contexts will need rethinking.

Application packaging is both an art and a science. There's much to consider when architecting and packaging an application for deployment.

-Cameron McKenzie
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!