Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have modularized our API into some independent components. Independent meaning these can be built via Maven and used as dependencies for other projects such as webapps.

Now, to use this API, there needs to be an intermediate processing class which does a translation of the client data model into the callee (component) data model.

The question is does this handler/processor class belong and need to be packaged along with the client application JAR/WAR or is it part of the component JAR.

What is the convention?

share|improve this question
up vote 2 down vote accepted

I've typically used a separate module for this. That way it's also versioned alongside the client and the server components.

share|improve this answer
Yeah we thought of that, would it be a set of Adapters/Translators sitting in a separate JAR? Not many in the team were in favour, believing it should be in A or B and not a separate C. I'm glad someone else has used this approach. – JoseK Aug 16 '11 at 9:12
Another cryptic clue for this problem domain is "What would OSGi push you towards doing?". – Martijn Verburg Aug 16 '11 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.