0

Architecture question: I have a Java EE enterprise application that is targeted to be deployed to a lot of different customers. It consists of:

  • a standard backend: the same core for every customer
  • a separate module for EAI adapters: intended to contain all the customer specific integrations (financials, CRM, ERP, ...) - one different implementation for each customer

I can see 2 options:

  • Only one backend-cust1.ear with core.jar and adapter-cust1.jar in it.
  • A separate WAR for adapters. So we would have: backend.ear with only core.jar, that is the same delivery for every customer and a separate adapter-cust1.war.

The problem is that with the first solution the core can call an adapter with a simple java method call, customer specific implementation can be injected with some CDI code.

But with the second solution, we need some remoting technique to communicate between the core and adapter: JMS or WS for example. It seems to me quite a heavy way.

But we think that the adapters could have dependencies on anything (MQ, SAP-client, really anything) and we want to be sure that these dependencies will not impact our common core in any way, that's why we consider having a separate war.

Any thoughts on that?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
jps
  • 164
  • 2
  • 8

2 Answers2

0

I see two good ways:

  • Java EE Connector - it will allow create managed connections, transactions and so on, but old and not popular
  • OSGI - will solve your problem with possible jar hell, modules and theirs interfaces, much better
Michail Nikolaev
  • 3,733
  • 22
  • 18
0

You should be able to inject the "needed classes"/components/modules from other EARs. This is supported by all Java EE application servers.

For example, if it is EJBs: WebSphere 7. Inject EJB from another application

In other cases, specifying project dependencies should solve the problem.

Architecturally, ESB sounds a better fit here. But in my belief, you don't ideally need an ESB as you will have only one customer integration.

Good Luck

Community
  • 1
  • 1
Radha
  • 1