Migration to V2

From DOC

Jump to: navigation, search

This article contains changes that may be needed to upgrade to Tolven V2.

In general, Tolven V2 supports Java EE 6. Many of the changes involve conformance to the updated standard. Previous Tolven versions and in particular the version of JBoss that was being used was more relaxed in conformance to the standard. When migrating tolven plugins from V0 branch to V2 consider verifying the below mentioned changes.

Changes in web application

  • Use correct namespace for JSTL.

In V0 we have been using incorrect namespace definition for including JSTL tag libraries in JSF pages. These JSF pages won't work in V2 until the namespace is corrected.

Wrong namespace: xmlns:c="http://java.sun.com/jstl/core" Correct namespace: xmlns:c="http://java.sun.com/jsp/jstl/core"

  • <c:set> will not accept empty string or null values any more. For example the below code snippets are not valid
   
       <c:set var="databodyclass" value=""/> OR
       <c:set var="databodyclass"/>
     

The value attribute should be set to non-null and non-empty value

  • For html form fields which are mapped to non-string values of JSF back bean a converter must be specified.
for example
        class JSFBean{
            int empId;
            public void setEmpId(int empId){
                this.empId = empId;
            }
            public int getEmpId(){
                return empId;
            }
        }

    mypage.xhtml
        <h:inputText  value="#{bean.empId}" converter="javax.faces.Integer"/>    
  • JNDI lookup entries like:
tolven/SomeBean/local

need to be changed to global lookups

java:global/tolven/tolvenEJB/SomeBean!org.tolven.SomeBeanLocal

Changes specific to tolven core API

  • Add openssoclientsdk.jar to web project

If the web application is using class TolvenSSO.java the project should include openssoclientsdk.jar under path <project>/lib folder. This jar contains the classes needed by TolvenSSO at compilation time. Also the plugin's build script need to be modified to add this jar to compile classpath. Check <tolvenWEB>/build.xml for reference.

  • Use userPrivateKey to load trim documents

In V2 to load trim documents using DocProtectionBean in the web application we would need user private key. To get an instance of userprivate key you can use something like this

         @EJB
        private TolvenPropertiesLocal propertyBean;
        ..........
    	String keyAlgorithm = propertyBean.getProperty(UserPrivateKey.USER_PRIVATE_KEY_ALGORITHM_PROP);
        PrivateKey userPrivateKey = TolvenSSO.getInstance().getUserPrivateKey(req, keyAlgorithm);

MQKeyStore And mdbuser

The mdbuser's keystore (tolvendev-mdbuser.p12) used in V0 must be the same one used during the installation of V2. By default it is located in tolven-config/credentials/mdbuser in V0, or can be exported from the attribute userPKCS12 in openldap. Its default password is tolven

In addition, during the V2 installation process, a defaultAlias is required for the mdbuser, which must the alias of the key in the tolvendev-mdbuser.p12 keystore. In V2, the default is to create it with mdbuser, however in V0, this was by default (note add quotes when using this name in V2):

emailaddress=tolven-mdbuser@tolvendev.com, cn=tolven-mdbuser-commonname, ou=tolven demo, o=tolven healthcare innovations, st=ca, c=us
Personal tools