LeftMenu/mywms64.gif

Main page

FAQ
HOWTO
Components

Page Index

myWMS News
Mailinglist
lexicon

Recent Changes
WikiEtiquette

Find pages
Unused pages
Undefined pages

Impressum

Set your name in
UserPreferences

Edit this page


Referenced by
...nobody




JSPWiki v2.2.33
i18n support


[RSS]

Switching Versions


Switching between versions of the application server, the database or the JDK will affect your configuration. Here are some hints for those issues.

Switching the Database

Native SQL for Login

The JBoss configuration contains some native SQL to check users and roles during the authorization and authentication process. Please check the syntax used in <JBOSS_HOME>/server/default/conf/login-config.xml

Hypersonic/HSQLDB

    <application-policy name = "myWMS">
       <authentication>
          <login-module 
             code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
             flag = "required">
             <module-option 
               name = "unauthenticatedIdentity">guest</module-option>
             <module-option 
               name = "dsJndiName">java:/myWMSDS</module-option>
             <module-option name = "principalsQuery">SELECT u.password AS PASSWD FROM mywms_user AS u WHERE u.name=?</module-option>
             <module-option name = "rolesQuery">SELECT r.name AS ROLEID, 'Roles' AS Roles FROM mywms_user AS u, mywms_role AS r, mywms_user_mywms_role AS ur WHERE u.id=ur.mywms_user_id AND r.id=ur.roles_id AND u.name=?</module-option>
          </login-module>
       </authentication>
    </application-policy>

PostgreSQL

    <application-policy name = "myWMS">
       <authentication>
          <login-module 
             code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
             flag = "required">
             <module-option 
               name = "unauthenticatedIdentity">guest</module-option>
             <module-option 
               name = "dsJndiName">java:/myWMSDS</module-option>
             <module-option name = "principalsQuery">SELECT u."password" AS "PASSWD" FROM mywms_user AS u WHERE u.name=?</module-option>
             <module-option name = "rolesQuery">SELECT r.name AS "ROLEID", 'Roles' AS "Roles" FROM mywms_user AS u, mywms_role AS r, mywms_user_mywms_role AS ur WHERE u.id=ur.mywms_user_id AND r.id=ur.roles_id AND u.name=?</module-option>
          </login-module>
       </authentication>
    </application-policy>

Native SQL for System Client

There is one native insert-statement used in class org.mywms.service.ClientServiceBean. The statement is executed in case of a missing System Client only. If this statement fails with your database, there are the following chances to prevent errors:
  1. Create the system client by hand. It must have the id=0 to be identified as the system client.
  2. Change the statement used in org.mywms.service.ClientServiceBean - myWMS is open source
  3. Create some universal EJB3 code to create a system client and donate it to the myWMS project.

Configuration

The choice of the database affects the following files:
  • The datasource file in the deploy directory.
  • In case of JBoss, the file persistence.xml in the META-INF folder of the myWMS project contains the dialect used by Hibernate to access the database.
  • JBoss will have to access the database using the apropriate JDBC driver. Please make sure, the jar-library containing the driver is copied to the <JBOSS_HOME>/server/default/lib/ folder.

PostgreSQL

    <property name="hibernate.dialect"
             value="org.hibernate.dialect.PostgreSQLDialect" />

Hypersonic/HSQLDB

    <property name="hibernate.dialect"
             value="org.hibernate.dialect.HSQLDialect" />

Switching the JDK

Switch from 1.5 to 1.6

Webservices will probably not work due to some removed code in the new JDK. Please also refer to The Small Potato and the JBoss Forum.

Switch from 1.6 to 1.5

Please make sure to recompile every single byte of code back to the 1.5 syntax. Otherwise the JDK 1.5 will deny running the compiled classes. This applies to libraries deployed to the application server as well as to libraries distributed to subprojects and client installations.

Switching JBoss

Whenever the JBoss is switched, please make shure, that myWMS and all depending projects use the apropriate jar-libraries from <JBOSS_HOME>/client/ and <JBOSS_HOME>/server/default/lib/.

Switching to JBoss 4.2.2.GA

Usually a session bean is local per definition. In 4.2.2 the annotation @Local must be specified explicitly for every bean interface.




Go to top   Edit this page   More info...   Attach file...
This page last changed on 23-Apr-2008 17:55:04 CEST by OlafKrause .