MySQL Setup
Create the databases:
- emi_renderer (Database for the renderer framework. This to store and provide java script based renderers to web applications via REST interfaces)
- emi_window (database for the window framework. This stores ad-hoc and reusable frames for monitors as well as information-need descriptions)
- screen (Database for SCREEN)
To do so execute the following SQL statements via mysql console:
CREATE DATABASE emi_renderer CHARACTER SET 'utf8'; CREATE DATABASE emi_window CHARACTER SET 'utf8'; CREATE DATABASE screen CHARACTER SET 'utf8';
Now run all the database setup scripts located in the different services.
Glassfish Setup
Add the following lines to your domain.xml to setup all the mysql data sources.
This assumes your are accessing your database via the user "root" with password "test234". If you like to use different credentials you need to change the "User" and "Password" properties within the jdbc-connection-pool definition.
<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.
ScreenRealm { org.wamblee.glassfish.auth.FlexibleJdbcLoginModule required; };
This configuration should work on Glassfish 3.1 and Glassfish 4.0.