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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:48:12+00:00 2026-05-27T23:48:12+00:00

I need to setup jndi datasource in my web application deployed on the glassfish

  • 0

I need to setup jndi datasource in my web application deployed on the glassfish server. I don’t want to use glassfish admin console for creating connection pool and jndi datasource. (This works though.)

I would want to use some xml files like context.xml (used in tomcat) to specify the jndi datasource details which will be bundled with the application war file.

This way if I deploy my app war file I would not have to do any changes in the glassfish from the admin console.

Please help.

PS. I tried putting context.xml in war META-INF, but its not working. When I deploy my war on glassfish it says jndi name not found.

  • 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-27T23:48:13+00:00Added an answer on May 27, 2026 at 11:48 pm

    You can’t set up resources on Glassfish application server from within an enterprise application; I would even say it’s true for any Java EE-compliant application server. It’s simply against EJB separation of roles: preparing the application is the role of Enterprise Bean Provider and Application Assembler, and installing it on the server belongs to the Deployer (see EJB 3.1 spec, chapter 2.2).

    You surely don’t have to set up everything manually, though. Glassfish has a command line tool asadmin, with the help of which you can script all operations accessible from the GUI admin console — take a look at the Glassfish Admin Guide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want oAuth verification process for a mobile application.For that i need to setup
Does mojolicious working under the lighttpd web-server? How to cofigure? Does I need setup
I need to setup an application that watches for files being created in a
I need to setup some 301 permanent redirects in the web.config of an ASP.NET
I usually work with PHP but need to setup this JSP with a server
I need to setup an Apache 2 server with SSL. I have my *.key
I need to setup an Asp.Net application w/ forms authentication so that it meets
I need to setup an application to scan a barcode from a packing slip
I need to setup a kerberos server on my Ubuntu machine for the authentication
I need to setup a POP3/SMTP server on our Ubuntu server ( example.com ).

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.