简体   繁体   English

如何将GlassFish连接池和GlassFish领域转换为WildFly容器?

[英]How convert GlassFish connection pool and GlassFish realm to WildFly container?

I have an application developed to GlassFish container. 我有一个针对GlassFish容器开发的应用程序。 In my searches I saw how create a connection pool in WildFly, but, how about data base configurations in the glassfish-resources.xml? 在搜索中,我看到了如何在WildFly中创建连接池,但是glassfish-resources.xml中的数据库配置又如何呢? How can I adapt this file to use with WildFly? 如何修改此文件以用于WildFly? And about glassFish-web.xml, with the realm configuration? 关于glassFish-web.xml,具有领域配置? How can I convert this to use in WildFly? 如何将其转换为在WildFly中使用? Below is the code of glassFish-resources.xhtml: 以下是glassFish-resources.xhtml的代码:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
    <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.PGSimpleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="post-gre-sql_netclin_postgresPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
        <property name="serverName" value="localhost"/>
        <property name="portNumber" value="xxxx"/>
        <property name="databaseName" value="netclin"/>
        <property name="User" value="postgres"/>
        <property name="Password" value="xxxx"/>
        <property name="URL" value="jdbc:postgresql://localhost:5432/xxx"/>
        <property name="driverClass" value="org.postgresql.Driver"/>
    </jdbc-connection-pool>

    <jdbc-resource enabled="true" jndi-name="netclin2" object-type="user" pool-name="post-gre-sql_netclin_postgresPool"/>
</resources>

And below is the glassfish-web.xml code: 下面是glassfish-web.xml代码:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
  <glassfish-web-app error-url="">
   <context-root>/umamaoNovo</context-root>
    <security-role-mapping>
       <role-name>papelAdministradores</role-name>
        <group-name>administradores</group-name>
     </security-role-mapping>
   <security-role-mapping>
    <role-name>papelUsuarios</role-name>
    <group-name>administradores</group-name>
    <group-name>usuarios</group-name>
    <group-name>trabalhadores</group-name>
</security-role-mapping>
<security-role-mapping>
    <role-name>papelTrabalhadores</role-name>
    <group-name>administradores</group-name>
    <group-name>usuarios</group-name>
    <group-name>trabalhadores</group-name>
</security-role-mapping>
<class-loader delegate="true"/>
<jsp-config>
    <property name="keepgenerated" value="true">
        <description>Keep a copy of the generated servlet class' java code.</description>
    </property>
</jsp-config>

Follow the guide from the Wildfly makers themselves. 遵循Wildfly制造商本身的指南。 Below is the link: Glassfish to Wildfly Migration 以下是链接: Glassfish到Wildfly迁移

Also a very similar guide over here. 这里的指南也非常相似。 Another Glassfish to Wildfly Migration 另一只玻璃鱼向野蝇迁移

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM