Single Service Layer across multiple web apps

M

mdjj

Can anyone tell me the options and advantages/disadvantages for sharing
a service layer across different web apps.

We are talking about having several different web apps (both internal
and external) that talk to the same service (including authentication)
and persistence layers. These layers are non-EJB, they're POJOs working
with Hibernate talking to different databases.

I see the service layer as an application in it's own right but without
a presentation layer. The presentation layer comes from each web app.
Is it right to be thinking about packaging it up as a separate jar?

I then see two options :

1. Put the service jar into each web apps lib directory.

Means you have to maintain it across n web apps.
I have some issues about how you'd maintain connections for this. Are
you configuring connections pure web app?
Surely the service layer is effectively doing the same thing n times.
This doesn't seem quite right to me?

2. Put the service jar into a shared lib directory.

Seems sensible I assume you can do this?
Are there going to be any contention issues with this approach?


What other issues am I going to come across with the two options above?
Are there other options I haven't even thought of?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top