DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • A Maven Story
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • Request Routing Through Service Mesh for WebSphere Liberty Profile Container on Kubernetes
  • How to Use JMS ActiveMQ With Mule 4: Part 1

Trending

  • Unlocking AI Coding Assistants Part 4: Generate Spring Boot Application
  • Unlocking the Benefits of a Private API in AWS API Gateway
  • Breaking Bottlenecks: Applying the Theory of Constraints to Software Development
  • Unlocking AI Coding Assistants Part 3: Generating Diagrams, Open API Specs, And Test Data
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Renaming Glassfish Application Server's Domain Name

Renaming Glassfish Application Server's Domain Name

By 
Sam  Sepassi user avatar
Sam Sepassi
·
Feb. 11, 14 · Interview
Likes (1)
Comment
Save
Tweet
Share
15.9K Views

Join the DZone community and get the full member experience.

Join For Free

Renaming domain names is not supported by Glassfish application server. There is no toolkit or any command available by Glassfish to perform domain name rename. You can choose your desired domain name when you install glassfish 3.x, but Glassfish 4 doesn’t let you choose your desired domain name (auto selecting domain1 for domain name). Without diving into domain configuration files or messing with domain XML files, the rename operation can be done quickly and cleanly. In case another name is required for currently operating Glassfish domain, follow these simple steps:

Steps are so easy and simple:

1.  Execute asadmin utility of your Glassfish distribution.

2.  Stop your domain if it’s running by issuing stop-domain <YOUR DOMAIN NAME> command.

3.  Run backup-domain <YOUR DOMAIN NAME>.

4.  After executing the backup domain command, your backed up domain is located under glassfish_ home/domains/<YOUR DOMAIN NAME>/backups  directory a .zip file.

5.  Copy the generated .zip backup file to other location.

6.  Now delete your existing domain by issuing delete-domain <YOUR DOMAIN NAME> command. Don’t worry you have already backed up your domain settings, remember?

7.  Open your backup file, normally packaged as a zip file. Open the backup.properties file and change the domain.name property to your desired name.

8.  Save the file and make sure that the modification is applied to your zip file too.

9.  Bring up asadmin utility up and issue the following command

restore-domain  domain1 --filename <PATH TO BACKUP ZIP FILE> --force

10.  Execute list-domains command to see your domain with its new name.

That's it. Your domain name is changed and your settings are restored as well.

GlassFish Application server application

Opinions expressed by DZone contributors are their own.

Related

  • A Maven Story
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • Request Routing Through Service Mesh for WebSphere Liberty Profile Container on Kubernetes
  • How to Use JMS ActiveMQ With Mule 4: Part 1

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: