Child pages
  • Setup Screen (and its dependencies) on Glassfish and mySQL

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titledomain.xml excerpt
<domain ... >
  ...
  <resources>
	...
    <jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" res-type="javax.sql.ConnectionPoolDataSource" name="emi.renderer.Pool">
      <property name="User" value="root"></property>
      <property name="ServerName" value="localhost"></property>
      <property name="DatabaseName" value="emi_renderer"></property>
      <property name="Password" value="test234"></property>
      <property name="Url" value="jdbc:mysql://localhost:3306/emi_renderer"></property>
      <property name="URL" value="jdbc:mysql://localhost:3306/emi_renderer"></property>
    </jdbc-connection-pool>
    <jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" res-type="javax.sql.ConnectionPoolDataSource" name="emi.window.Pool">
      <property name="User" value="root"></property>
      <property name="ServerName" value="localhost"></property>
      <property name="DatabaseName" value="emi_window"></property>
      <property name="Password" value="test234"></property>
      <property name="Url" value="jdbc:mysql://localhost:3306/emi_window"></property>
      <property name="URL" value="jdbc:mysql://localhost:3306/emi_window"></property>
    </jdbc-connection-pool>
    <jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" res-type="javax.sql.ConnectionPoolDataSource" name="screen.Pool">
      <property name="User" value="root"></property>
      <property name="ServerName" value="localhost"></property>
      <property name="DatabaseName" value="screen"></property>
      <property name="Password" value="test234"></property>
      <property name="Url" value="jdbc:mysql://localhost:3306/screen"></property>
      <property name="URL" value="jdbc:mysql://localhost:3306/screen"></property>
    </jdbc-connection-pool>

    <jdbc-resource pool-name="emi.renderer.Pool" jndi-name="jdbc/emi.renderer"></jdbc-resource>
    <jdbc-resource pool-name="emi.window.cache.Pool" jndi-name="jdbc/emi.window"></jdbc-resource>
    <jdbc-resource pool-name="screen.Pool" jndi-name="jdbc/screen"></jdbc-resource>
	...
  </resources>

  <servers>
      <server name="server" config-ref="server-config">
  	    ...
  	    <resource-ref ref="jdbc/emi.renderer"></resource-ref>
        <resource-ref ref="jdbc/emi.window"></resource-ref>
        <resource-ref ref="jdbc/screen"></resource-ref>
        ...
      </server>
  </servers>
   
</domain>

Additionally you need to add the following mapping to the login.conf file in order to make the UMC-Realm work.

Code Block
languagejs
titlelogin.conf additions
ScreenRealm {
	org.wamblee.glassfish.auth.FlexibleJdbcLoginModule required; 
};

This configuration should work on Glassfish 3.1 and Glassfish 4.0.