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 7561687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:13:16+00:00 2026-05-30T13:13:16+00:00

I have deployed a web service with Jax-ws that use a database for storing

  • 0

I have deployed a web service with Jax-ws that use a database for storing some state. I have packaged everything inside a EAR application and deployed it with Glassfish. I want to deploy multiple copies of this application on the same server (and then the same physical machine) but Glassfish does not allow it. Each application need to have a different WS endpoint (that is different url and/or port) and a different database so that each web service mantains its own state.

I tried deploying my application on different virtual servers and so different http listeners. So I got my application responding to different urls. Unfortunately the application is the same and so it is my database.

Can anyone help me?

  • 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-30T13:13:18+00:00Added an answer on May 30, 2026 at 1:13 pm

    I don’t think glassfish will forbid deploying the same app more than once, if it has a different name.

    The problem probably comes from the way the differentiating date is provisioned. The usual approach is to read these properties (for example – the database connection string, username, password) from an external source:

    • external properties file
    • JNDI
    • (if exists) application-server-specific provisioning

    However, you’d need a way to look for different files on the file system depending on the deployment. You can read the (web) context name on startup (from ServletContext) and look for:

     String path = System.getProperty("config.location") + "/" + ctx.getServletContextName();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have deployed some jax-ws webservices in a tomcat: web.xml: ... <servlet> <servlet-name>WebServiceJaxWs</servlet-name> <servlet-class>...a
We have a C++ (SOAP-based) web service deployed Using Systinet C++ Server, that has
We have a web service that is deployed on 2 separate machines in different
I have a web service deployed and ready to use. The client application is
I have a web service application that I deployed successfully on Apache Tomcat using
I have created a custom SharePoint web service that was deployed to, and successfully
I have deployed a Java metro web service that is being consumed by a
I have a web service that I have deployed and am using an Oracle
I have some code that makes a call to a third party web service
I have deployed ASP.NET web site and ASP.NET web service on the same web

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.