Developing exteNd Director Applications
CHAPTER 20
This chapter provides information about deploying exteNd Director applications. It contains these sections:
After you build and archive your project, you can deploy it to a J2EE application server. You can deploy a newly created projectyou do not have to add any application-specific functionality to a project before deploying it.
The following table lists the deployment configurations supported for each exteNd Director project type:
For more information on shared library configurations, see Changing a project's shared library configuration.
Depending on the server you are deploying to, you'll need to do some predeployment setup and possibly some post-deployment configuration.
The deployment process includes these tasks:
The tasks in the following table apply to Portlet Application Projects and Director projects. Before you deploy your application, make sure of the following:
Make sure that |
For information see |
---|---|
You have a relational database available to the application server you are deploying to. |
|
For production deployments, you have: |
|
Your project and the target server use the same shared library configuration |
|
The necessary JARs and files are copied to the correct location for your server |
|
For portlet applications, you've determined if you can use asynchronous rendering |
The section on asynchronous portlet rendering in the Portal Guide. |
Your server's predeployment tasks are complete |
Many of the exteNd Director subsystems require a relational database to store persistent data. Follow the steps outlined below to set up a database for use by exteNd Director:
Step |
Task |
For more information |
---|---|---|
1 |
Use your DBMS tools to create a database for the exteNd Director tables. |
For more information on creating a database, see your DBMS documentation. For more information about the supported databases, see the Release Notes. |
2 |
Use your server's tools to create a connection pool for the database you created in Step 1. |
See your application server's documentation for creating a connection pool. For more information about the supported application servers, see the Release Notes. For help on configuring Tomcat, see Tomcat predeployment tasks. IMPORTANT: To use an Oracle database with the Novell exteNd Application Server, you must use the application server's Add Database functionality (not the connection pool). |
3 |
Make sure the database driver you are using to connect to the exteNd Director database is in the application server's classpath |
For information on adding to the server's classpath, see your application server's documentation. |
For a list of the exteNd Director database tables, see About exteNd Director database tables.
exteNd Director requires you to use exteNd Director's version of these JARs:
You'll need to copy the file from the exteNd Director install to a specific directory on your application server.
Copy each of these files from this install location:
Copy this JAR |
From this exteNd Director install directory |
---|---|
xalan.jar |
extend5\Director\templates\Director\library |
xercesImpl.jar |
|
Phaos_Crypto_FIPS |
Common/jre/lib/ext |
Phaos_SSLava |
|
Phaos_Security_Engine |
Place the copy of exteNd Director's version of these JARs in the proper location for your application server as described in the next table.
NOTE: If you are using the exteNd Application Server, these files are installed into the proper location by default, so you are not required to make any changes.
IMPORTANT: Restart the server after copying these files.
IMPORTANT: If you are developing on a Windows platform and deploying to a non-exteNd application server running on UNIX, copy the Phaos_Crypto_FIPS_UNIX.jar from the Common\lib\other directory to the directory for your server specified above. Rename it Phaos_Crypto_FIPS.jar.
Locate the FrameworkService-conf and DirectoryService-conf files for your project type:
Archive type |
Project location |
---|---|
EAR |
\Library\ConfigService\ConfigService.spf\ |
WAR |
WEB-INF\lib\ConfigService\ConfigService.spf\ |
Make sure the following Framework services settings are correct:
In the FrameworkService-conf config.xml file:
In the DirectoryService-conf config.xml file. The values for PersistManager are:
Key |
Value |
---|---|
DirectoryService/realms/readable |
com.sssw.fw.directory.api.EbiPersistMgrRealm |
DirectoryService/realms/writeable |
com.sssw.fw.directory.api.EbiPersistMgrRealm |
Key |
Value |
---|---|
DirectoryService/realms/readable |
com.sssw.fw.directory.api.EbiJndiLdapRealm |
DirectoryService/realms/writeable |
com.sssw.fw.directory.api.EbiJndiLdapRealm |
TIP: Using the PersistManager realm causes the application database to function as the user authentication repository. The LDAP realm specifies that user authentication repository is an eDirectory server.
If you are using an eDirectory LDAP realm configuration, you need to:
Importing the UUID auxiliary class Before you deploy a project that implements one of the LDAP application server realms, you need to import the provided auxiliary class specified in the UUID auxiliary class property in the Directory LDAP Configuration panel. exteNd Director uses this class to access portal users in the LDAP tree.
You import this class using the NDS Import Wizard in the Novell ConsoleOne® eDirectory tool.
To import the UUID auxiliary class in ConsoleOne:
With the NDS container selected in ConsoleOne, select Wizards>NDS> Import/Export:
Navigate to the ldif file in your exteNd Director installation path and select it (it is located at bin/extElemImport.ldif). Click Next:
Verify the LDAP host name and port, choose Authenticated Login, and specify your administrator DN (distinguished name) and password:
Configuring and using SSL for LDAP connections Complete the procedures described here if you want to connect to your LDAP realm using Secure Socket Layer (SSL).
NOTE: SSL connections are slower than plain or clear-text connections. The initial portal connection can take up to 30 seconds to be established.
To configure the LDAP server to support SSL:
In ConsoleOne, open the properties on the LDAP Server object that represents the LDAP server you are using with exteNd Director.
In the SSL Certificate field, select an SSL Certificate object.
To export the Trusted Root Certificate:
Open the properties on the SSL certificate object that you configured in the preceding procedure.
Click Export and save the file in binary DER format, typically named TrustedRootCert.der.
To download and install the Java Secure Socket Extension (JSSE):
This step is required only if your server is running with a JRE older than 1.4 and is not already configured to use JSSE.
Follow the installation instructions for JSSEsummarized as follows:
Copy JSSE.JAR, JNET.JAR, and JCERT.JAR to the server's JRE extensions directory (for example: jre/lib/ext).
Find and edit the java.security file, located in the lib/security directory of the server's JRE (for example: jre/lib/security/java.security).
Follow the directions at the beginning of the document to add the JSSE SSL provider:
Add a line to the security providers section using the format below, replacing name with the next provider number in succession:
security.provider.name =com.sun.net.ssl.internal.ssl.Provider
To import the Trusted Root Certificate into your cacerts or jssecacerts trust store file:
Find the cacerts or jssecacerts file. It is located in the lib/security directory of the server's JRE (for example: jre/lib/security/cacerts).
Find keytool, located in the /bin folder relative to your Java home folder.
IMPORTANT: You must use a keytool that comes with JVM 1.3 or later.
Run the following command, making replacements listed below:
keytool -import -alias aliasName -file TrustedRootCert.der -keystore cacerts -storepass changeit
To configure exteNd Director to use SSL in the Directory service:
Click the Directory tab and then click the Directory Ldap Options lower tab.
Change the LDAP host to include the SSL port for eDirectory (for example: localhost:636).
Once you've completed all the predeployment steps, you can start deployment.
To deploy to IBM WebSphere Advanced Edition, you must use the WebSphere deployment tools; see Using IBM WebSphere deployment tools.
To deploy to any other supported server, see Using exteNd Director deployment tools next.
To use the exteNd Director deployment tools, complete these deployment tasks:
Step |
Task |
For more information |
---|---|---|
1 |
Define a server profile |
See the chapter on creating a server profile in Utility Tools |
2 |
Define deployment settings |
See the chapter on creating deployment settings in Utility Tools. |
3 |
Create a deployment document (if required by the target server) |
See the chapter on Deployment Plan Editor in Utility Tools. |
4 |
Build and archive the project |
See the chapter on Projects and Archives in Utility Tools. |
5 |
Deploy the project |
See the chapter on deploying an exteNd Director project in Utility Tools. IMPORTANT: When you deploy multiple WARs to the Apache Tomcat server, you must deploy the WAR containing the exteNd Director Portal first, verify that the exteNd Director tables are created, then deploy any remaining portlet application WARs. |
6 |
Move portal data (such as container, shared, personal pages, and portlets) from your test environment to the production environment. |
See the chapter on moving portal data in the Portal Guide. |
To deploy to WebSphere Advanced Edition, you must use the WebSphere Advanced Administrative Consoleyou cannot use the exteNd Director deployment tools. Here are the general steps to follow when using the console. For more details, see the IBM documentation.
Step |
Task |
Details |
---|---|---|
1 |
Build the EAR in exteNd Director. |
Use exteNd Director's Build and Archive or Rebuild All and Archive commands; both commands are described in the section on compiling, building, and archiving in Utility Tools. |
2 |
Use the Administrative Console to deploy and start the application. |
Use your DBMS tools to verify that exteNd Director tables are in the database. The list of tables that should be added are included in About exteNd Director database tables. |
3 |
Set ClassLoader Mode and ClassLoader Visibility |
After successfully deploying your application, make sure: |
After deployment you need to:
Step |
Task |
For more information |
---|---|---|
1 |
Do the post-deployment tasks that apply to the application server you deployed to |
See the section specific to your server: NOTE: For the Tomcat and BEA WebLogic servers, no action is required. |
2 |
Make sure the Locksmith user is a valid user in the realm |
|
3 |
Test the deployment* |
|
4 |
(Optional) To enable contextual searching, configure Autonomy |
See the section on configuring your environment for conceptual searching in the Content Search Guide. |
* If you redeployed on a shared library server, and also copied new or updated existing JARs in the shared library directory, you'll need to restart the server after the redeployment.
If you are using connection pools to access the exteNd Director database, you do not need to perform any post-deployment tasksso you can skip this section.
If you used the deprecated AddDatabase feature to access the exteNd Director database, you'll need to perform the procedure that follows. (Because the deployment procedure adds tables to the exteNd Director database, the schema changes render the server's snapshot of the database schema out of sync. To fix this, you need to synchronize the database schema.)
To synchronize the database schema:
While the server is running, start the Server Management Console (SMC).
In Settings for database, select your exteNd Director database.
You'll need to do these postdeployment tasks only if your project does either of the following:
Uses the WebSphere custom realm (at project creation, you chose WebSphere as your realm). Because this acts as a custom registry, you'll need to make the custom registry entries described in the following procedures.
Uses an LDAP realm (at project creation, you chose LDAP as the realm). You'll just need to follow the procedure To define global security:.
In the Custom User Registry, define the following properties with the values shown:
Property |
Value |
---|---|
Server User ID |
admin |
Server Password |
admin |
Custom Registry Classname |
com.sssw.fw.server.websphere.realm.EboWebSphereRealm |
Ignore case |
Not selected |
To define Custom User Registry Custom properties:
Restart the server for all property settings to take effect.
To test the deployed application:
In your browser, try the URLs that match your deployment configuration:
Variables in the URLs In this procedure, the variables have these meanings:
port is the port number for your application server. The defaults are:
Server |
Default port |
---|---|
Novell exteNd |
80 (Windows) 8080 (UNIX) 83 (NetWare) |
Tomcat |
8080 |
WebLogic |
7001 |
WebSphere |
9080 |
database is the database to which you deployed the archive (Novell exteNd only)
context is the namespace for the exteNd Director application, which you specified in the Project Wizard
At deployment, exteNd Director applications are compiled, archived, and deployed to the specified server (described in the deployment chapter of Utility Tools). For applications that rely on one or more exteNd Director subsystems, there are additional activities that occur (without user intervention) at deployment. They are described in the following sections:
To make its services available, a subsystem must register itself with the Framework. The process of self-registration involves loading configuration and service information into the Framework. Once this information has been loaded, the appropriate factories can produce the correct implementations for each requested service. The registration process is initiated by the boot servlet, which starts up automatically when you deploy an exteNd Director EAR or restart your application server. An autostart servlet must be the first servlet to load within an exteNd Director EAR.
Boot process During the framework boot process, the boot servlet starts up the base factory for the framework, which performs these operations:
Reads the config.xml file for each subsystem into the framework's memory space.
The config.xml file sets the configuration properties for a subsystem. It is typically located in the subsystem-name-conf subdirectory of the ConfigService.spf.
Performs any database processing required for each subsystem. For each subsystem that needs to load data into a database, the base factory creates the schema and loads the data, if necessary.
Each subsystem that requires database processing delivers scripts for creating the schema and loading the data. These scripts are located in the database subdirectory of the subsystem-name-conf subdirectory of the ConfigService.spf.
For more information about how the subsystems perform database processing, see How the subsystems access persistent data.
Reads the services.xml file for each subsystem into the framework's memory space.
The services.xml file sets properties for each of the services associated with a subsystem. It is located in the subsystem-name-conf subdirectory of the ConfigService.spf.
Notifies subsystem-specific service loaders that the main processing is done.
Starts all autostart services listed in services.xml files.
Autostart services have a startup property value of A (for automatic). Those services that have a startup element of M (for manual) are not started.
The following subsystems depend on a database to store persistent information:
After the Framework boot servlet reads the config.xml file for each subsystem, it performs any database processing required for the subsystems. The boot servlet checks the config.xml file to determine if it needs to create the schema and load data. It does this by examining the following configuration properties:
For example, the config.xml file for the Directory subsystem has these settings for the db-load-on-startup and test-db-on-startup properties:
<property> <key>DirectoryService/db-load-on-startup</key> <value>true</value> </property> <property> <key>DirectoryService/test-db-on-startup</key> <value>AUTHGROUPS</value> </property>
When database processing is required for a subsystem, the boot servlet executes the scripts in the database subdirectory of the subsystem-name-conf subdirectory of the ConfigService.spf.
NOTE: Do not edit the database scripts provided with the exteNd Director subsystems. These scripts should be used as they are.
exteNd Director subsystems often require access to application resources that are not stored in a database or defined in the configuration and service elements for the subsystems. Resource sets provide a known location for these resources. A resource set holds definitions for rules, pageflows, portlets, styles, and various descriptors that implement features provided by exteNd Director subsystems. It can also hold Java classes and images for your application.
Resource sets are also a tool for streamlining development, because they can be configured to load resources from disk as well as from a deployed JAR. This dynamic loading of resources allows you to modify and test changes without having to redeploy the whole exteNd Director EAR.
For information on how to use resource sets, see Using the Resource Set in an exteNd Director Application.
This section contains troubleshooting for the following categories:
Problem |
Cause |
Solution |
---|---|---|
You encounter the following error: Server Console Trace: ------------------------- WARNING: This portal app context, Director51, does not match the portal.context property set in the PortalService-conf/config.xml file. Only one portal per data base is allowed. Data has been loaded using the previous portal context. To correct this you must revert back to the previous portal name of, null, please consult the documentation. java.lang.reflect.InvocationTargetException |
Your application server is configured to use shared libraries and an exteNd Director portal is already deployedyou are attempting to deploy another application that includes a portal. |
In a shared library environment, you are restricted to a single deployed portal. You have two options. You can:
OR
NOTE: If you do not perform this step, the application server will still contain references to the previously deployed portal's configuration, and you'll get the same error. |
TIP: Be sure to check the Release Notes for additional information about configuring WebLogic for exteNd Director.
When you configure an exteNd Director application, you make choices based on the application server you plan to use. If you want to deploy the application to a different server later, there are several things to change. All changes can be made using exteNd Director editors.
For details on making changes, see the procedures in Reconfiguring exteNd Director Projects.
The items you need to change are as follows:
What to change |
For information on how to change it (paths shown for archive layout in exteNd Director) |
---|---|
Realm for user authentication |
|
Locksmith ID |
|
JNDI name for the application database |
|
URIs that proxy resource sets use to redirect resource requests to remote resource sets |
See Working with entries for resourcePath and libPath. NOTE: If you are also changing the server where the remote resource set is deployed, you will need to edit the proxy resource set's URI to point to the new location. |
The exteNd Director database tables hold information that the subsystems need to persist.
NOTE: The items listed are reserved for exteNd Director's use. This listing is provided for informational purposes only.
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...