Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7536893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:41:59+00:00 2026-05-30T06:41:59+00:00

We are developing several separate applications/modules, that we deploy onto Glassfish 3.1.1 application server.

  • 0

We are developing several separate applications/modules, that we deploy onto Glassfish 3.1.1 application server. There are cases where these applications need to call each others methods, through a remote interface. What is the best practice when it comes to packaging these remote interfaces? E.g. if A needs to call B’s remote interface, would you extract B’s remote interface in a separate JAR file and package it together with module A? What if this remote interface references an entity class. Would you package this entity class together with the interface in this JAR file?

If you have any feedback on this topic, feel free to suggest how you think this should be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:42:00+00:00Added an answer on May 30, 2026 at 6:42 am

    I spent my last job solving this exact problem.

    This is what EJBs are designed to do. An EJB has both an implementation and an interface. The interface goes into a client jar that is used by your applications:

    @EJB
    MyService myService;
    

    The implementation is packaged separately and installed somewhere else your server:

    @Stateless
    @Remote({MyService.class})
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class MyServiceBean implements MyService {
    ...
    }
    

    You should not have applications calling each other directly in Java EE! (But you can, in some cases) Think of EJBs as extremely lightweight, single purpose services, where you extract common business logic between your apps.

    Your question sounds like a circular dependency situation where AppA calls AppB and AppB calls AppA. Extract the business logic AppA and AppB are using from AppA and put it into and EJB. Do the same for AppB. Now you have 2 apps and 2 EJBs, where common business logic can be called from either app.

    Easy, right? Let me know how to explain this better!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are developing several web applications to run on our own server that will
I am developing an application that distributes rendering across several devices (a university project).
I am developing a desktop application with a MainForm that's grown rather large. There
I'm developing a JavaScript application that uses several open source JavaScript projects. All their
We're developing an android application that has several different tabs. We've been trying to
I am currently developing an application that processes several files, containing around 75,000 records
I am developing an iPhone app that displays several views, all acessed via Tab
I'm developing an app that checks several conditions during an incoming phone call. The
There are several people about (myself being one of them) who have been developing
I'm developing a new admin website to update several tables. There is no complicated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.