Solved

EAR to EAR communication

Posted on 2010-09-21
7
1,372 Views
Last Modified: 2013-12-10
I have 2 EARs deployed in same JVM. I would need to invoke a method in EAR2 class from EAR1 class, what are the best ways available to achieve this?. Both the classes are neither EJBs nor servlets.
0
Comment
Question by:MatrixStar
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Accepted Solution

by:
Hegemon earned 125 total points
ID: 33725935
With JBoss you would need to specify the same class loading repository for both .ears. Not sure how it is done in WebSphere but the principle should be the same - organising a common class loading space.
0
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 375 total points
ID: 33725944
0
 
LVL 10

Expert Comment

by:Hegemon
ID: 33725962
The question says there are no EJBs in the ears..
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 375 total points
ID: 33726287
expose those methods through EJBs
0
 

Author Comment

by:MatrixStar
ID: 33727089
Thanks for the quick advise.

If there is no other approaches available then I would need to think about exposing classes through EJB.

Hegemon: I would need to check how to specify the same class loading repository for both .ears if that approach will work out.
0
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 375 total points
ID: 33728203
All EARs have their own containers.
If you want the execution to be done is same EAR container, then why have it in a separate container itself. put those classes in the same EAR.

If you want the execution to be done in the respective EJB container, then it those methods (which needs to be executed) should be exposed publically, either through EJB or servlet
0
 

Author Comment

by:MatrixStar
ID: 33729204
Yes, You're right. I'm analyzing which approach would be suitable for me requirement. Thank you!!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now