Tuesday, October 6, 2009

Glassfish Server Setting


Step : 1

/domains/domain1/lib/ext/<MySql connector>

Step : 2(Project specific)

/domains/domain1/config/domain.xml

-----------------------------------------------------------------------------------------------------------
 

" object-type="user" pool-name="pool name>"/>

   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="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" 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="" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

      "/>

     

     

     

     

     

     

     

     

     

     

      :/"/>

   



-------------------------------------------------------------------------------------------------------------------


Step : 3(Project specific)

/domains/domain1/config/login.conf

------------------------------------------------------------------

{

      com.sirahu.security.UserLoginModule required

      URL = "jdbc:mysql://:/"

        DRIVER_CLASS = "com.mysql.jdbc.Driver"

        USERID = ""

      PASSWORD=""

      QUERY = "";

    };

-----------------------------------------------------------------

Step : 4(Project specific)

/domains/domain1/config/server.policy





Step : 5

Restart the Glassfish server.


NOTE:

Items marked in Red are variables. Please refer the appendix for those items.


Appendix:

      : Glassfish Directory

                        : specify the project name

   : specify a name to the connection pool

                      : Data base user name

                         : Data base password

                              : Data base instance port no.

                        : Data base instance machine IP

                          : Data base schema name

                   : This is the name specified in the application level for JAAS login

                     : Always use mysql-connector-java-5.0.4-bin.jar

No comments:

Post a Comment