Menu Search Sign up

Glassfish

Starting & Stopping

http://docs.oracle.com/javaee/6/tutorial/doc/bnadi.html

asadmin start-domain mydomain

The output of starting a domain:

Successfully started the domain : cgta-interim-client-registry
domain  Location: /opt/glassfish3/glassfish/domains/mydomain
Log File: /var/log/glassfish/mydomain/server.log
Admin Port: 16048

Where are the domains located?

.\glassfish3\glassfish\domains

The primary configuration file is located at /opt/glassfish3/glassfish/domains/mydomain/config/domain.xml

In the domain.xml, you can find the definition of various configs including the configs for ports:

      <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
      <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property>
      <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property>
      <system-property name="JMS_PROVIDER_PORT" value="27676"></system-property>
      <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property>
      <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property>
      <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property>
      <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property>
      <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property>
      <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property>

The Admin Portal access URL is

https://10.220.9.232:16048/common/index.jsf

Where to find the ear or war files deployed from Glassfish admin portal?

You can find them here: ./glassfish/domains/mydomain/applications/__internal.

 

Set system properties at glassfish

server (Admin Server) -> System Properties -> Add Property

Changing Glassfish JDK

Vi /opt/glassfish3/glassfihs/config/asenv.conf

AS_JAVA="/opt/jdk1.6.0_21"

list running glassfish domains

$ asadmin list-domains

JMS Queue Management

QBrowser - installation and start

Download “QBrowser for GlassFish JMS / WebLogic MQ “ QBrowser_light_V2.5.2.8.1_forJDK1.6.zip (https://sourceforge.net/projects/qbrowserv2/

Start: C:\QBrowser_light_V2.5.2.8.1\run_open_mq.bat

File -> New Connection

Host: Localhost

Port: 5076

User: admin

imqcmd Command

http://docs.oracle.com/cd/E19148-01/819-4467/aeodq/index.html

http://docs.oracle.com/cd/E19253-01/816-5166/6mbb1kq38/index.html

$ export PATH=/opt/glassfish3/mq/bin:$PATH

$ imqcmd list dst -b localhost:15076 -u admin -passfile <(echo imq.imqcmd.password=admin)

$ imqcmd query dst -t q -n myqueue -b localhost:15076 -u admin -passfile <(echo imq.imqcmd.password=admin)

$ imqcmd purge dst -b localhost:15076 -u admin -passfile <(echo imq.imqcmd.password=admin) -t q -n myqueue