YouTube Icon

Interview Questions.

Top 100+ Glassfish Interview Questions And Answers - May 30, 2020

fluid

Top 100+ Glassfish Interview Questions And Answers

Question 1. What Is Glassfish Application Server?

Answer :

GlassFish Server Open Source Edition offers a server for the improvement and deployment of  Java Platform, Enterprise Edition (Java EE platform) applications and internet technologies

primarily based on Java generation. GlassFish Server three.1 gives the following:

A light-weight and extensible core primarily based on OSGi Alliance requirements
A net field
An easy-to-use Administration Console for configuration and management
Update Tool connectivity for updates and add-on additives
Support for excessive availability clustering and load balancing.
Question 2. What Are The Default Administrator Values For Glassfish Server?

Answer :

Domain call : domain1
Master password : changeit
asadmin(1M) command-line utility : as-installation/bin
Configuration files : area-dir/config
Log documents : area-dir/logs
Administration server port : 4848
HTTP port : 8080
HTTPS port : 8181
Pure JMX customers port : 8686
Message Queue port : 7676
IIOP port : 3700
IIOP/SSL port : 3820
IIOP/SSL port with mutual authentication : 3920
HTML five Interview Questions
Question 3. How To Start And Stop The Default Domain?

Answer :

When you put in GlassFish Server, a default domain nameddomain1 is created. The following  methods describe how to begin and stopdomain1when it's miles the only domain.

To Start the Default Domain

GlassFish Server software program must be hooked up before you begin the area.

Run the asadmin start-area command without an operand:

as-deploy/bin/asadmin begin-domain

The command starts offevolved the default area, domain1.

For beginning any area (e.G domain name: worker): as-set up/bin/asadmin begin-area employee

To Stop the Default Domain

Run the asadmin forestall-area command without an operand:

as-deploy/bin/asadmin forestall-domain

The command stops the default domain, domain1. For preventing any area (e.G domain name: worker): as-install/bin/asadmin prevent-area worker

Question four. How To Start And Stop Database Server Through Glassfish?

Answer :

A database server isn't started by means of default when you start the GlassFish Server domain. If your applications require a database returned give up, you have to start and stop the database server manually.

The following methods describe how to begin and forestall the Java DB server this is bundled with GlassFish Server. For information about starting and stopping different database servers, see the documentation on your unique product.

To Start the Java DB Server

At least one GlassFish Server domain ought to be started earlier than you start the database server.

Run the asadmin start-database command.

The preferred shape for the command is as follows:

as-set up/bin/asadmin start-database --dbhome listing-direction

For instance, to start the Java DB server from its default vicinity:

as-deploy/bin/asadmin start-database --dbhome as-install-parent/javadb

To Stop the Java DB Server

Run the asadmin stop-database command:

as-deploy/bin/asadmin stop-database.

HTML 5 Tutorial
Question five. How To Start Administration Console In Glassfish?

Answer :

The GlassFish Server Administration Console presents a browser interface for configuring,

administering, and monitoring GlassFish Server.

To Start the Administration Console

At least one GlassFish Server domain must be began.

Type the URL on your browser.

The default URL for the Administration Console on the neighborhood host is as follows:

http://localhost:4848

If brought on, log in to the Administration Console.

You will be induced to log in if you selected to require an management password on the time GlassFish Server changed into hooked up.

J2EE Interview Questions
Question 6. How To Deploy And Undeploy Applications In Glassfish Command Line?

Answer :

The technique of configuring and permitting applications to run inside the GlassFish Server

framework is referred to asdeployment.

To Obtain the Sample Application

Download a replica of thehello.Warsample software fromhttp://glassfish.Java.Net/

downloads/quickstart/hey.Conflict.

Save thehello.Warfile in the directory of your choice.

This directory is referred to as sample-dir

To Deploy the Sample Application From the Command Line

The pattern utility ought to be available earlier than you start this challenge. To down load the sample, see “To Obtain the Sample Application” on web page eight. At least one GlassFish Server domain must be started out before you deploy the sample software.

Run the asadmin installation command.

The wellknown form for the command is as follows:

as-installation/bin/asadmin set up struggle-name

To installation the good day.Warfare sample, the command is as follows:

as-set up/bin/asadmin installation sample-dir/hey.Struggle

Access thehelloapplication by using typing the subsequent URL in your browser:

http://localhost:8080/hello

The application's start web page is displayed, and you are triggered to type your name.

Type your name and click on Submit.

The utility displays a custom designed reaction, giving you a private Hello.

To List Deployed Applications From the Command Line

Run the asadmin list-applications command:

as-installation/bin/asadmin list-applications

To Undeploy the Sample Application From the Command Line

Run the asadmin undeploy command.

The preferred shape for the command is as follows:

as-install/bin/asadmin undeploy war-name

Forwar-name, use the literal hello, no longer the overall hey.Warname.

For the whats up.Battle instance, the command is as follows:

as-set up/bin/asadmin undeploy whats up

Question 7. How To Deploy And Undeploy Applications By Using The Administration Console?

Answer :

The graphical Administration Console of GlassFish Server enables you to perform the subsequent deployment-related tasks:

To Deploy the Sample Application by way of Using the Administration Console

The pattern software must be to be had before you begin this assignment. At least one GlassFish Server area should be started before you set up the pattern utility.

Launch the Administration Console by means of typing the subsequent URL in your browser: http://localhost:4848

Click the Applications node within the tree at the left. The Applications web page is displayed.
Click the Deploy button. The Deploy Applications or Modules web page is displayed.
Select Packaged File to be Uploaded to the Server, and click on Browse.
Navigate to the area in that you stored thehello.Warsample, select the record, and click on  Open .You are back to the Deploy Applications or Modules page.
Specify an outline within the Description area, for instance: howdy
Accept the alternative default settings, and click on OK.You are lower back to the Applications page.
Select the test container subsequent to thehelloapplication and click the Launch link to run the software.
The default URL for the application is as follows:
http://localhost:8080/hey/
To View Deployed Applications inside the Administration Console

1) Launch the Administration Console by means of typing the following URL for your browser:

http://localhost:4848

2) Click the Applications node in the tree at the left.

Expand the node to listing deployed applications. Deployed applications are also listed within the desk on the Applications web page.

To Undeploy the Sample Application through Using the Administration Console

Launch the Administration Console by using typing the subsequent URL in your browser http://localhost:4848
Click the Applications node within the tree on the left.
The Applications page is displayed.
Select the check field subsequent to thehellosample utility.
Remove or disable the software.
To cast off the software, click the Undeploy button.
To disable the software, click the Disable button.
J2EE Tutorial Core Java Interview Questions
Question 8. How To Deploy And Undeploy Application Automatically In Glassfish?

Answer :

To Deploy the Sample Application Automatically

You can deploy programs routinely by way of placing them within the  as-install/domains/domain-call/autodeploydirectory, wheredomain-nameis the call of the area for which you need to configure computerized deployment.

For this situation, use the default domain, domain1:

as-installation/domain names/domain1/autodeploy

The sample software should be available earlier than you begin this challenge.

Copy the applicationWAR report to theas-deploy/domains/domain-call/autodeploydirectory.

On UNIX, Linux, and Mac OS X systems, type this command:

cp sample-dir/howdy.Struggle as-installation/domain names/area-name/autodeploy

OnWindows structures, kind this command:

replica sample-dirhello.Warfare as-installdomainsdomain-nameautodeploy

GlassFish Server robotically discovers and deploys the utility. The default URL for the application is as follows:

http://localhost:8080/hiya/

To Undeploy the Sample Application Automatically

Change to the domain'sautodeploydirectory.

Cd as-installation/domain names/area-call/autodeploy

Delete the sample software'sWAR file to undeploy and eliminate the utility.

On UNIX, Linux, and Mac OS X systems, type this command:

rm hello.Battle

OnWindows systems, type this command:

del hi there.Warfare

Question 9. What Is The Relationship Between Sun Glassfish Enterprise Server And Oracle Glassfish Server?

Answer :

Sun GlassFish Enterprise Server was renamed Oracle GlassFish Server in February 2010 when Oracle Corporation acquired Sun Microsystems.

Java-Springs Interview Questions
Question 10. When Should I Deploy Oracle Glassfish Server 2 Versus Oracle Glassfish Server three?

Answer :

Oracle GlassFish Server 2 is first-rate for deployments that require guide for Java Platform, Enterprise Edition 5 (Java EE 5) standard, centralized management, or clustering guide for high availability. Oracle GlassFish Server 3 is right for groups that want to leverage Java EE 6 popular, improve developer productivity, and permit lightweight deployments the usage of the Java EE 6 Web Profile. It additionally offers service availability through the mod_jk load balancing.

Core Java Tutorial
Question 11. What Is The Difference Between Sun Glassfish Enterprise Manager And Oracle Glassfish Server Control?

Answer :

Sun GlassFish Enterprise Manager will be rebranded as Oracle GlassFish Server Control inside the next release of the product. 

Hibernate Interview Questions
Question 12. Does Oracle Glassfish Server Include All Oracle Glassfish Server Control Features?

Answer :

All Oracle GlassFish Server Control functions are to be had with an Oracle GlassFish Server license.

HTML 5 Interview Questions
Question 13. Can I Evaluate Oracle Glassfish Server Or Oracle Glassfish Server Control Before Purchasing A Subscription?

Answer :

Yes. Organizations interested in evaluating the technology can down load it from e-delivery.

Java-Springs Tutorial




CFG