GlassFish的安装与使用

news2025/1/24 3:05:29

一、产品下载与安装

glassfish下载地址:https://download.oracle.com/glassfish/5.0.1/release/index.html

下载后解压即完成安装,主要目录说明:

bin目录:为asadmin命令所在目录。

glassfish为主目录:

glassfish\bin目录为命令目录。

glassfish\docs 目录为快速使用手册。

glassfish\domains为默认域目录。

二、产品启动与停止

1. 通过asadmin create-domain命令建域,输入默认用户名与密码。

D:\glassfish5\bin> asadmin create-domain aaa
Enter admin user name [Enter to accept default "admin" / no password]>admin
Enter the admin password [Enter to accept default of no password]>
Enter the admin password again>
Default port 4848 for Admin is in use. Using 51364
Default port 8080 for HTTP Instance is in use. Using 51365
Default port 7676 for JMS is in use. Using 51366
Default port 3700 for IIOP is in use. Using 51367
Default port 8181 for HTTP_SSL is in use. Using 51368
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Default port 8686 for JMX_ADMIN is in use. Using 51369
Using default port 6666 for OSGI_SHELL.
Using default port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=realw,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=realw-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Domain aaa created.
Domain aaa admin port is 51364.
Domain aaa admin user is "admin".
Command create-domain executed successfully.

2. 通过asadmin start-domain命令启动域

D:\glassfish5\bin> asadmin start-domain aaa
Waiting for aaa to start ...
Successfully started the domain : aaa
domain Location: D:\glassfish5\glassfish\domains\aaa
Log File: D:\glassfish5\glassfish\domains\aaa\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

3. 通过asadmin stop-domain命令停止域

D:\glassfish5\bin> asadmin stop-domain aaa
Waiting for the domain to stop .
Command stop-domain executed successfully.

三、控制台的使用

前提:domain已经启动。

  1. 访问控制台:http://IP地址:4848(默认控制台端口为4848),输入建域时的用户名密码登录。

  1. 登录控制台后左边树菜单如下,常用配置部署应用如下图:

  1. 配置数据源如下, _TimerPool是为EJB timer使用,是glassfish的典型特征。

  1. JVM等主要配置项如下:

四、glassfish的domain主配置文件domain.xml概要说明,基本与控制台一一对应。

<!-- 应用和日志目录 -->
<domain application-root="${com.sun.aas.instanceRoot}/applications" version="5" log-root="${com.sun.aas.instanceRoot}/logs">
<!-- 安全配置 -->
  <security-configurations>
    <authentication-service default="true" name="adminAuth" use-password-credential="true">
      <security-provider provider-name="adminSpc" name="spcrealm" type="LoginModule">
        <login-module-config control-flag="sufficient" module-class="com.sun.enterprise.admin.util.AdminLoginModule" name="adminSpecialLM">
          <property name="config" value="server-config"></property>
          <property name="auth-realm" value="admin-realm"></property>
        </login-module-config>
      </security-provider>
      <security-provider provider-name="adminFile" name="filerealm" type="LoginModule">
        <login-module-config control-flag="sufficient" module-class="com.sun.enterprise.security.auth.login.FileLoginModule" name="adminFileLM">
          <property name="config" value="server-config"></property>
          <property name="auth-realm" value="admin-realm"></property>
        </login-module-config>
      </security-provider>
    </authentication-service>
    <authorization-service default="true" name="authorizationService">
      <security-provider provider-name="simpleAuthorizationProvider" name="simpleAuthorization" type="Simple">
        <authorization-provider-config name="simpleAuthorizationProviderConfig" support-policy-deploy="false"></authorization-provider-config>
      </security-provider>
    </authorization-service>
  </security-configurations>
  <managed-job-config></managed-job-config>
  <system-applications>
    <application context-root="" object-type="system-admin" directory-deployed="true" name="__admingui" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui">
      <module name="__admingui">
        <engine sniffer="web"></engine>
        <engine sniffer="security"></engine>
      </module>
    </application>
  </system-applications>
  <!-- 数据源配置 -->
  <resources>
    <jdbc-resource pool-name="__TimerPool" object-type="system-all" jndi-name="jdbc/__TimerPool"></jdbc-resource>
    <jdbc-resource pool-name="DerbyPool" object-type="system-all-req" jndi-name="jdbc/__default"></jdbc-resource>
    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" name="__TimerPool" res-type="javax.sql.XADataSource">
      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
      <property name="connectionAttributes" value=";create=true"></property>
    </jdbc-connection-pool>
    <jdbc-connection-pool is-isolation-level-guaranteed="false" datasource-classname="org.apache.derby.jdbc.ClientDataSource" name="DerbyPool" res-type="javax.sql.DataSource">
      <property name="PortNumber" value="1527"></property>
      <property name="Password" value="APP"></property>
      <property name="User" value="APP"></property>
      <property name="serverName" value="localhost"></property>
      <property name="DatabaseName" value="sun-appserv-samples"></property>
      <property name="connectionAttributes" value=";create=true"></property>
    </jdbc-connection-pool>
    <connector-connection-pool max-pool-size="250" resource-adapter-name="jmsra" steady-pool-size="1" name="jms/__defaultConnectionFactory-Connection-Pool" connection-definition-name="javax.jms.ConnectionFactory"></connector-connection-pool>
    <connector-resource pool-name="jms/__defaultConnectionFactory-Connection-Pool" object-type="system-all-req" jndi-name="jms/__defaultConnectionFactory"></connector-resource>
    <managed-executor-service object-type="system-all" jndi-name="concurrent/__defaultManagedExecutorService"></managed-executor-service>
    <managed-scheduled-executor-service object-type="system-all" jndi-name="concurrent/__defaultManagedScheduledExecutorService"></managed-scheduled-executor-service>
    <context-service object-type="system-all" jndi-name="concurrent/__defaultContextService"></context-service>
    <managed-thread-factory object-type="system-all" jndi-name="concurrent/__defaultManagedThreadFactory"></managed-thread-factory>
  </resources>
  <servers>
    <server config-ref="server-config" name="server">
      <application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref>
      <resource-ref ref="jdbc/__TimerPool"></resource-ref>
      <resource-ref ref="jdbc/__default"></resource-ref>
      <resource-ref ref="jms/__defaultConnectionFactory"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedExecutorService"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedScheduledExecutorService"></resource-ref>
      <resource-ref ref="concurrent/__defaultContextService"></resource-ref>
      <resource-ref ref="concurrent/__defaultManagedThreadFactory"></resource-ref>
    </server>
  </servers>
  <nodes>
    <node name="localhost-aaa" install-dir="${com.sun.aas.productRoot}" type="CONFIG" node-host="localhost"></node>
  </nodes>
  <configs>
     <!-- 端口、虚拟主机、JMX配置 -->
    <config name="server-config">
      <system-property name="JMS_PROVIDER_PORT" description="Port Number that JMS Service will listen for remote clients connection." value="7676"></system-property>
      <http-service>
        <access-log></access-log>
        <virtual-server network-listeners="http-listener-1,http-listener-2" id="server"></virtual-server>
        <virtual-server network-listeners="admin-listener" id="__asadmin"></virtual-server>
      </http-service>
      <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener address="0.0.0.0" port="3700" lazy-init="true" id="orb-listener-1"></iiop-listener>
        <iiop-listener address="0.0.0.0" port="3820" id="SSL" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener address="0.0.0.0" port="3920" id="SSL_MUTUALAUTH" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
      </iiop-service>
      <admin-service system-jmx-connector-name="system" type="das-and-server">
        <jmx-connector address="0.0.0.0" port="8686" name="system" auth-realm-name="admin-realm" security-enabled="false"></jmx-connector>
        <property name="adminConsoleContextRoot" value="/admin"></property>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property>
        <das-config></das-config>
      </admin-service>
      <connector-service></connector-service>
      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
      <batch-runtime-configuration></batch-runtime-configuration>
      <jms-service default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
      </jms-service>
      <web-container>
        <session-config>
          <session-manager>
            <store-properties></store-properties>
            <manager-properties></manager-properties>
          </session-manager>
          <session-properties></session-properties>
        </session-config>
      </web-container>
      <ejb-container>
        <ejb-timer-service></ejb-timer-service>
      </ejb-container>
      <rest-config></rest-config>
      <diagnostic-service></diagnostic-service>
      <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
          <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
        </message-security-config>
        <message-security-config auth-layer="HttpServlet">
          <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule">
            <request-policy auth-source="sender"></request-policy>
            <response-policy></response-policy>
            <property name="loginPage" value="/login.jsf"></property>
            <property name="loginErrorPage" value="/loginError.jsf"></property>
          </provider-config>
        </message-security-config>
        <property name="default-digest-algorithm" value="SHA-256"></property>
      </security-service>
      <!-- JVM参数、-D参数配置 -->
      <java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="">
        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
        <jvm-options>-client</jvm-options>
        <jvm-options>-Djava.awt.headless=true</jvm-options>
        <jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
        <jvm-options>-Djdk.tls.rejectClientInitiatedRenegotiation=true</jvm-options>
        <jvm-options>-Djavax.xml.accessExternalSchema=all</jvm-options>
        <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Xmx512m</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>-Dgosh.args=--nointeractive</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        <jvm-options>-Dcom.ctc.wstx.returnNullForDefaultNamespace=true</jvm-options>
      </java-config>
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http max-connections="250" default-virtual-server="server">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol name="http-listener-2" security-enabled="true">
            <http max-connections="250" default-virtual-server="server">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
          </protocol>
          <protocol name="admin-listener">
            <http encoded-slash-enabled="true" max-connections="250" default-virtual-server="__asadmin">
              <file-cache></file-cache>
            </http>
          </protocol>
        </protocols>
        <network-listeners>
          <network-listener protocol="http-listener-1" port="8080" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
          <network-listener protocol="http-listener-2" port="8181" name="http-listener-2" thread-pool="http-thread-pool" transport="tcp"></network-listener>
          <network-listener protocol="admin-listener" port="4848" name="admin-listener" thread-pool="admin-thread-pool" transport="tcp"></network-listener>
        </network-listeners>
        <transports>
          <transport name="tcp"></transport>
        </transports>
      </network-config>
      <thread-pools>
        <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool>
      </thread-pools>
      <group-management-service>
        <failure-detection></failure-detection>
      </group-management-service>
      <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
      </monitoring-service>
      <availability-service></availability-service>
    </config>
    <config name="default-config">
      <http-service>
        <access-log></access-log>
        <virtual-server network-listeners="http-listener-1, http-listener-2" id="server">
          <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property>
        </virtual-server>
        <virtual-server network-listeners="admin-listener" id="__asadmin"></virtual-server>
      </http-service>
      <iiop-service>
        <orb use-thread-pool-ids="thread-pool-1"></orb>
        <iiop-listener address="0.0.0.0" port="${IIOP_LISTENER_PORT}" id="orb-listener-1"></iiop-listener>
        <iiop-listener address="0.0.0.0" port="${IIOP_SSL_LISTENER_PORT}" id="SSL" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
        </iiop-listener>
        <iiop-listener address="0.0.0.0" port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" security-enabled="true">
          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
        </iiop-listener>
      </iiop-service>
      <admin-service system-jmx-connector-name="system">
        <jmx-connector address="0.0.0.0" port="${JMX_SYSTEM_CONNECTOR_PORT}" name="system" auth-realm-name="admin-realm" security-enabled="false"></jmx-connector>
        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
        <das-config></das-config>
      </admin-service>
      <connector-service></connector-service>
      <web-container>
        <session-config>
          <session-manager>
            <manager-properties></manager-properties>
            <store-properties></store-properties>
          </session-manager>
          <session-properties></session-properties>
        </session-config>
      </web-container>
      <ejb-container>
        <ejb-timer-service></ejb-timer-service>
      </ejb-container>
      <mdb-container></mdb-container>
      <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host" type="EMBEDDED">
        <jms-host port="${JMS_PROVIDER_PORT}" name="default_JMS_host" host="localhost"></jms-host>
      </jms-service>
      <log-service file="${com.sun.aas.instanceRoot}/logs/server.log" log-rotation-limit-in-bytes="2000000">
        <module-log-levels></module-log-levels>
      </log-service>
      <security-service>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
          <property name="jaas-context" value="fileRealm"></property>
        </auth-realm>
        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
        </jacc-provider>
        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
        <audit-module classname="com.sun.enterprise.security.ee.Audit" name="default">
          <property name="auditOn" value="false"></property>
        </audit-module>
        <message-security-config auth-layer="SOAP">
          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="dynamic.username.password" value="false"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
          </provider-config>
          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
            <request-policy auth-source="content"></request-policy>
            <response-policy auth-source="content"></response-policy>
            <property name="encryption.key.alias" value="s1as"></property>
            <property name="signature.key.alias" value="s1as"></property>
            <property name="debug" value="false"></property>
            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
          </provider-config>
        </message-security-config>
      </security-service>
      <transaction-service automatic-recovery="true" tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
      <diagnostic-service></diagnostic-service>
      <java-config classpath-suffix="" debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" java-home="C:\JDK11" system-classpath="">
        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
        <jvm-options>-server</jvm-options>
        <jvm-options>-Djava.awt.headless=true</jvm-options>
        <jvm-options>-Djdk.corba.allowOutputStreamSubclass=true</jvm-options>
        <jvm-options>-Djdk.tls.rejectClientInitiatedRenegotiation=true</jvm-options>
        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
        <jvm-options>-XX:NewRatio=2</jvm-options>
        <jvm-options>-Xmx512m</jvm-options>
        <jvm-options>-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.fileinstall</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
        <jvm-options>-Dgosh.args=--noshutdown -c noop=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
        <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
      </java-config>
      <availability-service>
        <web-container-availability></web-container-availability>
        <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
        <jms-availability></jms-availability>
      </availability-service>
      <network-config>
        <protocols>
          <protocol name="http-listener-1">
            <http default-virtual-server="server">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol name="http-listener-2" security-enabled="true">
            <http default-virtual-server="server">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
          </protocol>
          <protocol name="admin-listener">
            <http max-connections="250" default-virtual-server="__asadmin">
              <file-cache></file-cache>
            </http>
          </protocol>
          <protocol name="sec-admin-listener" security-enabled="true">
            <http encoded-slash-enabled="true" default-virtual-server="__asadmin">
              <file-cache></file-cache>
            </http>
            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" client-auth="want" cert-nickname="glassfish-instance" renegotiate-on-client-auth-want="false"></ssl>
          </protocol>
          <protocol name="admin-http-redirect">
            <http-redirect secure="true"></http-redirect>
          </protocol>
          <protocol name="pu-protocol">
            <port-unification>
              <protocol-finder protocol="sec-admin-listener" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="http-finder"></protocol-finder>
              <protocol-finder protocol="admin-http-redirect" classname="org.glassfish.grizzly.config.portunif.HttpProtocolFinder" name="admin-http-redirect"></protocol-finder>
            </port-unification>
          </protocol>
        </protocols>
        <network-listeners>
          <network-listener protocol="http-listener-1" port="${HTTP_LISTENER_PORT}" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
          <network-listener protocol="http-listener-2" port="${HTTP_SSL_LISTENER_PORT}" name="http-listener-2" thread-pool="http-thread-pool" transport="tcp"></network-listener>
          <network-listener protocol="pu-protocol" port="${ASADMIN_LISTENER_PORT}" name="admin-listener" thread-pool="http-thread-pool" transport="tcp"></network-listener>
        </network-listeners>
        <transports>
          <transport name="tcp"></transport>
        </transports>
      </network-config>
      <thread-pools>
        <thread-pool name="http-thread-pool"></thread-pool>
        <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool>
        <thread-pool name="admin-thread-pool" max-queue-size="256" max-thread-pool-size="50"></thread-pool>
      </thread-pools>
      <group-management-service>
        <failure-detection></failure-detection>
      </group-management-service>
      <system-property name="JMS_PROVIDER_PORT" description="Port Number that JMS Service will listen for remote clients connection." value="27676"></system-property>
      <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="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>
      <monitoring-service>
        <module-monitoring-levels></module-monitoring-levels>
      </monitoring-service>
    </config>
  </configs>
  <property name="administrative.domain.name" value="aaa"></property>
  <secure-admin special-admin-indicator="2f849ce2-8642-4a1c-a882-3ec248199ab4">
    <secure-admin-principal dn="CN=realwangpu,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
    <secure-admin-principal dn="CN=realwangpu-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
  </secure-admin>
  <clusters></clusters>
  <applications></applications>
</domain>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/396976.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C++基础了解-13-C++ 数组

C 数组 一、C 数组 C 支持数组数据结构&#xff0c;它可以存储一个固定大小的相同类型元素的顺序集合。数组是用来存储一系列数据&#xff0c;但它往往被认为是一系列相同类型的变量。 数组的声明并不是声明一个个单独的变量&#xff0c;比如 number0、number1、…、number9…

Android特别的数据结构(一) SparseArray源码解析

1.数据结构 class SparseArray<E> implements Cloneable 由两个数组构成&#xff0c;一个数组mKeys类型为int[]&#xff0c;存放Key&#xff0c;一个数组mValues类型为 E[]&#xff0c;存放Value。Key数组升序排列。默认初始容量&#xff1a;10扩容&#xff1a; 如果当…

Hbuilder 下载与安装教程

文章目录Hbuilder下载与安装教程Hbuilder简介一&#xff0c;下载Hbuilder二&#xff0c;安装Hbuilder三&#xff0c;简单使用四&#xff0c;Hbuilderx 调试Hbuilder下载与安装教程 Hbuilder简介 Builder是DCloud&#xff08;数字天堂&#xff09;推出的一款支持HTML5的Web开发…

你还在手撸SQL?ChatGPT笑晕在厕所

文章目录你还在手撸SQL&#xff1f;ChatGPT笑晕在厕所一、背景二、面向Chat编程1. 数据库设计2. 建表语句3. 加中文注释4. 数据模拟5. 查询成绩6. 修改课程任课老师7. 删除课程8. 删除一个有关联数据的课程总结你还在手撸SQL&#xff1f;ChatGPT笑晕在厕所 一、背景 经典3表设…

【项目精选】基于SSH的医院在线挂号系统(视频+论文+源码)

点击下载源码 医院挂号系统主要用于实现医院的挂号&#xff0c;前台基本功能包括&#xff1a;用户注册、用户登录、医院查询、挂号、取消挂号、修改个人信息、退出等。 后台基本功能包括&#xff1a;系统管理员登录、医院管理、科室管理、公告管理、退出系统等。 本系统结构如…

图文讲解MongoDB该怎么安装

一、安装前必读 我这里是Centos7 Linux 内核 注意&#xff1a;本文的命令使用的是 root 用户登录执行&#xff0c;不是 root 的话所有命令前面要加 sudo 二、环境配置 2.1 停止防火墙 systemctl status firewalld #查看firewall systemctl stop firewalld …

Vector - CAPL - 测试报告函数介绍

测试报告是我们开发脚本中必备的一个模块,今天我们介绍一下测试报告中的常用函数,让我们开发出更加清晰、美观的报告,让我们的测试工作更加轻松。 TestCaseComment

备战蓝桥python——完全平方数

完全平方数 链接: 完全平方数 暴力解法&#xff1a; n int(input()) for i in range(1, n1):if(((i*n)**0.5)%10.0):print(i)break运用数论相关知识求解 任意一个正整数都可以被分解成若干个质数乘积的形式&#xff0c;例如 :2022∗5120 \ 2^{2}*5^{1}\,20 22∗51 由此…

JVM的了解与学习

一:jvm是什么 jvm是java虚拟机java Virtual Machine的缩写 jdk包含jre和java DevelopmentTools 二:什么是java虚拟机 虚拟机是一种抽象化的计算机,通过在实际的计算机上仿真模拟各种计算机功能来实现的。java虚拟机有自己完善的硬体结构,如处理器、堆栈、寄存器等,还有…

Hive映射Hbase

依赖条件 已有Hadoop、Hive、Zookeeper、HBase 环境。 为什么Hive要映射Hbase HBase 只提供了简单的基于 Key 值的快速查询能力&#xff0c;没法进行大量的条件查询&#xff0c;对于数据分析来说&#xff0c;不太友好。 hive 映射 hbase 为用户提供一种 sqlOnHbase 的方法。…

zookeeper 集群配置

文章目录zookeeper 集群配置1、集群安装zookeeper 集群配置 1、集群安装 1) 集群安装 在 hadoop102、hadoop103 和 hadoop104 三个节点上都部署 Zookeeper。 2) 解压安装 在 hadoop102 解压 Zookeeper 安装包到/opt目录下 输入命令&#xff1a;tar -zxvf apache-zookeeper-3.…

C++——IO流

目录 C语言的输入与输出 流是什么 CIO流 C标准IO流 C文件IO流 二进制读写 文本读写 stringstream的简单介绍 C语言的输入与输出 C语言中我们用到的最频繁的输入输出方式就是scanf ()与printf()。 scanf(): 从标准输入设备(键 盘)读取数据&#xff0c;并将值存放在变量中。…

自学大数据第5天~hadoop集群搭建(二)

配置集群/分布式环境 1,修改文件workers 需要把所有节点数据节点的主机名写入该文件,每行一个,默认localhost(即把本机(namenode也作为数据节点),所以我们在伪分布式是没有配置该文件; 在进行分布式时需要删掉localhost(又可能文件中没有该配置,没有那就不用删了,配置一下数据…

147597-66-8,p-SCN-Bn-NOTA,NOTA-P-苯-NCS新型双功能螯合剂

p-SCN-Bn-NOTA | NOTA-P-苯-NCS | CAS&#xff1a;147597-66-8 | 纯度&#xff1a;95%1.p-SCN-Bn-NOTA试剂信息&#xff1a;CAS号&#xff1a;147597-66-8外观&#xff1a;白色固体分子量&#xff1a;C20H26N4O6S分子式&#xff1a;448.4928溶解性&#xff1a;溶于有机溶剂&…

Java语法中的方法引用::是个什么鬼?

1.函数式接口 函数式接口&#xff08;Functional Interface&#xff09;就是一个有且仅有一个抽象方法&#xff08;通俗来说就是只有一个方法要去被实现&#xff0c;因此我们也能通过这个去动态推断参数类型&#xff09;&#xff0c;但是可以拥有多个非抽象方法的接口。函数式接…

大数据架构设计与数据计算流程

大数据架构设计Hadoop有3个核心组件&#xff1a;分布式文件系统HDFS&#xff1b;分布式运算编程框架MapReduce&#xff1b;分布式资源调度平台YARN。HBase&#xff0c;Hadoop dataBase&#xff0c;基于HDFS的NoSQL数据库&#xff0c;面向列式的内存存储&#xff0c;定期将内存数…

基于MyBatis依次、批量、分页增删改查

我们知道处理数据有三种思路&#xff1a;依次、批量、分页&#xff0c;对应方法如下 依次处理&#xff1a;在 Java 里面写 for 循环&#xff0c;依次使用 SQL 语句&#xff0c;频繁连接断开数据库批量处理&#xff1a;在 MyBatis 里面用 <foreach> 拼接成一条长 SQL 语句…

详细讲解零拷贝机制的进化过程

一、传统拷贝方式&#xff08;一&#xff09;操作系统经过4次拷贝CPU 负责将数据从磁盘搬运到内核空间的 Page Cache 中&#xff1b;CPU 负责将数据从内核空间的 Page Cache 搬运到用户空间的缓冲区&#xff1b;CPU 负责将数据从用户空间的缓冲区搬运到内核空间的 Socket 缓冲区…

Caddy2学习笔记——Caddy2反向代理docker版本的headscale

一、个人环境概述 本人拥有一个国内云服务商的云主机和一个备案好的域名&#xff0c;通过caddy2来作为web服务器。我的云主机系统是Ubuntu。 我的云主机是公网ip&#xff0c;地址为&#xff1a;43.126.100.78&#xff1b;我备案好的域名是&#xff1a;hotgirl.com。后面的文章…

CNStack 助推龙源电力扛起“双碳”大旗

作者&#xff1a;CNStack 容器平台、龙源电力&#xff1a;张悦超 、党旗 龙源电力容器云项目背景 龙源电力集团是世界第一大风电运营商&#xff0c; 随着国家西部大开发战略推进&#xff0c;龙源电力已经把风力发电场铺设到全国各地&#xff0c;甚至是交通极不便利的偏远地区&…