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

  • SEARCH
  • Home
  • 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 6864587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:55:49+00:00 2026-05-27T02:55:49+00:00

If I have a hosted web application, is it good practise to split the

  • 0

If I have a hosted web application, is it good practise to split the web and api web service into 2 different projects/hosted applications in tomcat?

I can see that if people try and abuse the API it will effect the performance of the web application.

If I was to go with creating 2 separate projects (or if not initially but build for the potential to split things off), can I somehow share my hibernate data layer between 2 projects?

I’m using IntelliJ, how can I do this? Would it be to create a seperate module for hibernate (domain entities, Dao, and Service classes).

  • 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-27T02:55:49+00:00Added an answer on May 27, 2026 at 2:55 am

    I wouldn’t say is a good practice in general, but maybe a good idea for some scenarios.

    In a service oriented architecture, a service layer is consumed by not only the web layer, but potentially other clients. In this case is probably a good idea to build the web and service layers in separate servers.

    Another case would be when you want to perform separate deployments, because e.g. work in both layers is done by different teams or in separate workstreams – I would question whether this is a good practice though as opposed to teams working in vertical features rather than in layers.

    You can create your service layer in many different ways:

    • As web services. When you need interoperability.
    • As remote EJBs (this is possible in TomEE). When interoperability is not necessary.
    • You can also create a combination of the both above, they are not mutually exclusive.

    In terms of splitting the projects, you could create:

    • A set of domain objects in a jar module that is to be shared between your web and service layers.
    • A war module for your web layer.
    • A jar module for your service layer interfaces that is a dependency for your web layer.
    • A jar/war module for your service layer containing services and DAOs.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to consume a .NET hosted web service from a Java application. Interoperability
I have two web application hosted on different server.For eg. one is main application
I have a WCF Ajax-Service hosted within a Web Application (.NET 4.0, C#). I
I have a WCF service hosted at IIS7 web application. It's created by a
We have built a hosted web application, that is developed in a way that
We have an ASP.NET web application hosted by a web farm of many instances
I have a .net web-service hosted in IIS 6.0 that periodically fails with an
I have a web service that serves widgets. It is hosted on a server
I have a simple WCF Web service. It's hosted on IIS under the default
I have a hosted web application that has MongoDB as its DB. Now, I

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.