Personal tools

Views

LiveCycle Data Services 3

From Adobe Labs

What's New

LiveCycle Data Services 3 beta has the following objectives:

Adobe has developed a new technology, code named Fiber, which brings model-driven development to Flex developers. With Fiber, developers start by creating an application model from which they go on to develop the Flex user interface and the server business logic.

The beta version of LiveCycle Data Services ES 3 provides a Fiber model run-time, and thus enables data persistence out of the box. With Fiber, data management is implicitly supported and does not require developers to create custom assemblers or employ complicated LiveCycle Data Services specific configurations.

We have also developed a new text and graphical data modeling editor, bundled with Adobe Flash Builder 4 beta, which further simplifies creation of enterprise-ready Flex applications.

These capabilities help enterprise Flex and Java developers to be more productive, and they are designed to be highly extensible to meet complex enterprise application needs.

Installing Modeler Eclipse plugins

The LiveCycle Data Services 3 Modeler is a tool for creating and editing Fiber data models. For more information, see Data Modeling with Adobe LiveCycle Data Services.

You must have an installation of Flash Builder 4 Beta 1 before installing the Modeler. There are three installation options for Flash Builder 4:

The Modeler is a set of Eclipse plugins in the Modeler_Plugin.zip file that you copy into the plugins directory of a stand-alone Flash Builder installation or an Eclipse installation that contains the Flash Builder plugin installation. The location of the plugins directory depends on which type of Flash Builder installation you have.

Stand-alone Flash Builder

To install the Modeler into a stand-alone Flash Builder installation:

  1. Unzip the Modeler_Plugin.zip file into the flash_builder_root/plugins directory. If your unzip program is set up to use folder names, unzip directly to the flash_builder_root directory.
  2. Start or restart Flash Builder.

Flash Builder plugin for separate existing Eclipse

  1. Unzip the Modeler_Plugin.zip file to the flash_builder_root/eclipse/plugins. If your unzip program is set up to use folder names, unzip to the flash_builder_root/eclipse directory.
  2. Start or restart Flash Builder.

Flash Builder plugin with bundled Eclipse

  1. Unzip the Modeler_Plugin.zip file to the flash_builder_root/eclipse-host-distro/plugins directory. If your unzip program is set up to use folder names, unzip to the flash_builder_root/eclipse-host-distro directory.
  2. Start or restart Flash Builder.

Installing Adobe LiveCycle Data Services ES2 Version 3 Beta

Adobe® LiveCycle® Data Services runs as a J2EE web application. The installer lets you choose from the following configurations:

LiveCycle Data Services offers installers for the following platforms:

LiveCycle Data Services supports the following application servers:

LiveCycle Data Services supports the following JDKs:

The installers include the following Web Application Archive (WAR) files:

Each WAR file is a separate, stand-alone web application. If you are using the J2EE web applications configuration, you must have an existing J2EE application server or servlet container available and understand web application deployment. If you do not have an existing J2EE server or are not familiar with WAR file deployment, use the integrated Tomcat configuration to get started.

These installation instructions refer to the root directory where you installed LiveCycle Data Services as install_root.

LiveCycle Data Services with integrated Apache Tomcat application server

The LiveCycle Data Services with integrated Tomcat installation option contains the following files and directories under the installation root:

readme.htm Contains overview information.
lcds.war LiveCycle Data Services web application template, used as a starting point for new applications.
lcds-samples.war LiveCycle Data Services sample applications.
ds-console.war Simple monitoring application for LiveCycle Data Services deployments.
license.txt License information.
/tomcat Contains an installation of Apache Tomcat that includes lcds, lcds-samples, and console web applications expanded and deployed in the default server.
/resources Fully commented configuration files, and directories and files used for security, clustering, Flex Ajax Bridge, and WSRP.
/sampledb Contains an HSQLDB database used by the sample applications.

Install LiveCycle Data Services in the integrated Tomcat configuration

  1. Start the installation program. Do one of the following, depending on your operating system:
    • Windows - Double-click the installer file (lcds3-win.exe).
    • UNIX® or Linux - Set the working directory to the directory that contains the installer file, and then enter the following command that specifies the installer file for your operating system:



      for Linux:
            ./lcds3-lin.bin
      for Solaris:
            ./lcds3-sol.bin
  2. Accept the license agreement.
  3. (Optional) Enter the serial number and follow the prompts. If you don't enter a serial number, LiveCycle Data Services runs in single CPU mode.

    Note: You can upgrade to a fully functioning version by entering a serial number in the fds line of the lcds-webapp-root/WEB-INF/flex/license.properties file for each LiveCycle Data Services web application. Then restart the server.

  4. Specify the directory in which to install LiveCycle Data Services or accept the default location.
  5. Select the LiveCycle Data Services With Tomcat option.
  6. Complete the remaining installer steps.
  7. To start LiveCycle Data Services, open a command window, navigate to install_root/tomcat/bin, and enter the command: catalina run.

    On Microsoft Windows, you can start it by using the following command: Start > Programs > Adobe > LiveCycle Data Services 3 > Start LiveCycle Data Services Server. Or you can navigate to the install_root/tomcat/bin in Windows Explorer and double-click the startup.bat icon.

    On UNIX and Linux, enter the command: ./catalina.sh run.

Running the sample applications with the integrated Tomcat installation

When you install LiveCycle Data Services, the installer creates the lcds-samples web application that contains sample applications, including the 30 Minute Test Drive application. The sample applications demonstrate basic capabilities and best practices for developing LiveCycle Data Services applications.

  1. The LiveCycle Data Services sample applications use an HSQLDB database that is installed in the install_root/sampledb directory. To start the sample database:
    • Open a command prompt and go to the install_root/sampledb directory.
    • Run startdb.bat (Windows) or startdb.sh (Unix-based systems).
    • On Microsoft Windows, you can start it by using the following command: Start > Programs > Adobe > LiveCycle Data Services 3 > Start Samples Database.
  2. Start Tomcat (startup.bat or startup.sh in /lcds/tomcat/bin)
  3. Open a browser window.
  4. Access the samples home page by opening the following URL in a browser:
    http://localhost:8400/lcds-samples/
  5. Access the 30 Minute Test Drive application by opening the following URL in a browser:
    http://localhost:8400/lcds-samples/testdrive.htm

LiveCycle Data Services J2EE web applications

The LiveCycle Data Services J2EE web application configuration option installs the following files and directories under the installation root:

readme.htm Contains overview information.
lcds.war LiveCycle Data Services web application, used as a starting point for new applications.
lcds-samples.war LiveCycle Data Services sample applications.
ds-console.war Simple monitoring application for LiveCycle Data Services deployments.
license.txt license information.
/resources Fully commented configuration files, as well as directories and files used for security, clustering, Flex Ajax Bridge, and WSRP.

Install LiveCycle Data Services web applications

  1. Start the installation program. Do one of the following, depending on your operating system:
    • Windows - Double-click the installer file (lcds3-win.exe).
    • UNIX or Linux - Set the working directory to the directory that contains the installer file, and then enter the following command that specifies the installer file for your operating system:

      for Linux:

            ./lcds3-lin.bin

      for Solaris:

            ./lcds3-sol.bin
  2. Accept the license agreement.
  3. (Optional) Enter the serial number and follow the prompts. If you don't enter a serial number, LiveCycle Data Services runs in single CPU mode.

    Note: You can upgrade to a fully functioning version by entering a serial number in the fds line of the lcds-webapp-root/WEB-INF/flex/license.properties file for each LiveCycle Data Services web application. Then restart the server.

  4. Specify the directory in which to install LiveCycle Data Services or accept the default location.
  5. Select the LiveCycle Data Services J2EE web application option.
  6. Complete the remaining installer steps.
  7. Deploy the lcds.war, lcds-samples.war, and ds-console.war web applications by using your application-server-specific deployment method. For example, for Tomcat, copy the WAR files to the webapps directory and restart the server.
  8. Note: When you deploy the lcds-samples web application, make sure that you specify "lcds-samples" as the context-root.

  9. Perform additional application-server specific configuration, as described in Additional server-specific configuration.

Install LiveCycle Data Services as a J2EE web application by using the Java installer (any platform)

  1. Run the installer by opening a command prompt, navigating to the directory that contains the downloaded JAR file (lcds3-install.jar), and executing the following command:
    [java_home]/bin/java -jar lcds3-install.jar -i console
  2. Continue with steps 3 through 9 of Install LiveCycle Data Services as a J2EE web application.

Running the sample applications

When you install LiveCycle Data Services, the installer creates the lcds-samples web application that contains sample applications, including the 30 Minute Test Drive application. The sample applications demonstrate basic capabilities and best practices for developing LiveCycle Data Services applications.

  1. The LiveCycle Data Services sample applications use an HSQLDB database that is installed in the install_root/sampledb directory. To start the sample database:
    • Open a command prompt and go to the install_root/sampledb directory.
    • Run startdb.bat (Windows) or startdb.sh (Unix-based systems).
    • On Microsoft Windows, you can start it by using the following command: Start > Programs > Adobe > LiveCycle Data Services 3 > Start Samples Database.
  2. Start the web application server on which you deployed lcds-samples.war. The host name and port number of the deployed lcds-samples.war file depend on the configuration of your web application.
  3. Open a browser window.
  4. Access the samples home page by opening the following URL in a browser:
    http://hostName:portNumber/lcds-samples/
  5. Access the 30 Minute Test Drive application by opening the following URL in a browser:
    http://hostName:portNumber/lcds-samples/testdrive.htm

Additional server-specific configuration

You might have to perform additional configuration steps for your application server:

Tomcat

To use LiveCycle Data Services with Tomcat when not using the integrated Tomcat configuration, install support for the Java Transaction API (JTA). You might also have to install several other libraries depending on the features that you plan to use. Follow these steps after deploying the LiveCycle Data Services WAR files. These steps are not necessary for the integrated Tomcat installation.

  1. Stop Tomcat.
  2. To install support for JTA, a recommended implementation is the Java Open Transaction Manager (JOTM), which is a fully functional open source stand-alone transaction manager.
    1. Download JOTM from http://jotm.objectweb.org.
    2. Copy the JAR files from jotm-root/lib to [tomcat-root]/common/lib.
    3. Create a context file for your web application and register JOTM using the Transaction element. For example, for the samples WAR create a tomcat-root/conf/Catalina/localhost/lcds-samples.xml file and add the following lines:
      <CONTEXT antijarlocking="false" antiresourcelocking="false" 
      docbase="${catalina.home}/webapps/lcds-samples" path="/lcds-samples" 
      privileged="true">
      <TRANSACTION factory="org.objectweb.jotm.UserTransactionFactory" 
      jotm.timeout="60"></TRANSACTION></CONTEXT>
      
      Note: If a context file exists for your web application, add the <TRANSACTION>element under the <CONTEXT>element.
  3. Increase the maximum memory to at least 512 MB by specifying the maximum heap size for the JVM in the JAVA_OPTS variable: -Xmx512m
  4. (Optional) To enable custom authentication, locate the Tomcat security resource libraries under install_root/resources/security/tomcat.
    1. Place flex-tomcat-common.jar and flex-tomcat-server.jar in tomcat/lib folder.
    2. Add the <VALVE classname="flex.messaging.security.TomcatValve"></VALVE>tag to the Context descriptors. For example, for the LiveCycle Data Services samples WAR:

      You can now perform authentication against the current Tomcat realm. Usually, the default configuration for authentication stores user information in conf/tomcat-users.xml. See the Tomcat documentation for more information on realms. See the LiveCycle Data Services documentation for more information on custom authentication.

    3. You might also have to update the active <LOGIN-COMMAND> in /WEB-INF/flex/services-config.xml in each deployment of a LiveCycle Data Services WAR file. For Tomcat, ensure that the TomcatLoginCommand is active in the <SECURITY>section:
      <SECURITY><LOGIN-COMMAND server="Tomcat"></LOGIN-COMMAND>...</SECURITY>
  5. (Optional) To use the JMSAdapter with the Message Service, install and configure a JMS provider (such as ActiveMQ or openJMS) for use with Tomcat.
  6. Restart Tomcat.

Configuring ActiveMQ 4.1.1 with Tomcat 6.0.x

These instructions create a configuration that matches what is distributed with LiveCycle Data Services. You can integrate Apache ActiveMQ 4.1.1 with earlier versions of Tomcat. You can integrate newer versions of ActiveMQ with Tomcat 6.0.x, but none of these configurations have been tested. These instructions require that you have a valid Apache Ant installation.

  1. Download ActiveMQ 4.1.1 from http://activemq.apache.org.
  2. Download and install the ActiveMQ distribution following the instructions provided on the ActiveMQ website.
  3. ActiveMQ ships with an example that contains the JAR files and configuration settings that work with a web application deployment. Build the example by opening a command prompt, changing to the activemq_root/example directory and running the following command to build the example:
  4. ant war
  5. In the tomcat_root/lib directory, create a directory called activemq4.1.1. Copy the contents of the activemq_root/example/target/activemq-web/WEB-INF/lib directory to this new directory.
  6. Open the catalina.properties file from the tomcat_install/conf directory in a text editor. Modify the common.loader property by adding the following to the list of comma-separated paths:
    ${catalina.home}/lib/activemq4.1.1/*.jar
  7. Modify your LiveCycle Data Services web application to start an ActiveMQ message broker when the web application starts. To do so, open the WEB-INF/web.xml file for your web application in a text editor. Add the following context-param and listener elements. Make sure that you place them in the correct location within the web.xml. The order of these parameters and elements must match the web-app dtd.
  8. <CONTEXT-PARAM>
        <PARAM-NAME>brokerURI</PARAM-NAME>
        <PARAM-VALUE>/WEB-INF/activemq.xml</PARAM-VALUE>
    </CONTEXT-PARAM>
    <LISTENER>
        <LISTENER-CLASS>org.apache.activemq.web.SpringBrokerContextListener</LISTENER-CLASS>
    </LISTENER>
  9. In the WEB-INF directory of your web application, create a file called activemq.xml. Open the file in a text editor and add the following text:
  10. <BEANS>
    <BROKER brokername="myBroker" persistent="false" usejmx="true"
        xmlns="http://activemq.org/config/1.0">
       <TRANSPORTCONNECTORS>
    	<TRANSPORTCONNECTOR name="default" uri="tcp://localhost:61716">
           </TRANSPORTCONNECTOR>
       </TRANSPORTCONNECTORS>
    </BROKER>
    </BEANS>
    

    This configuration starts an ActiveMQ message broker with a broker name of myBroker listening for requests on the localhost network interface at port 61716.

  11. Add the ActiveMQ connection factories and any JMS Topics and Queues to JNDI. In Tomcat 6.0.x, create a context file for your web application in the tomcat_install/conf/Catalina/localhost directory. If the Catalina/localhost directory does not exist, create it now. The file that you create should have the same name as the web application with a .xml extension. For example, if your LiveCycle Data Services web application is named samples, name the Tomcat context file samples.xml. For more information on context files, see your Tomcat documentation. After you create the file, open it in a text editor. Add the following contents to the file, replacing the example topic and queue shown here with your own topics and queues:
  12. <CONTEXT antijarlocking="false" antiresourcelocking="false" 
    privileged="true" reloadable="true">
    <RESOURCE brokername="myBroker" brokerurl="tcp://localhost:61716"
    description="JMS Connection Factory" 
    factory="org.apache.activemq.jndi.JNDIReferenceFactory" 
    name="jms/flex/TopicConnectionFactory" 
    type="org.apache.activemq.ActiveMQConnectionFactory">
    </RESOURCE>
    <RESOURCE description="my Topic" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
    name="jms/topic /flex/simpletopic"
    physicalname="FlexTopic" 
    type="org.apache.activemq.command.ActiveMQTopic">
    </RESOURCE>
    <RESOURCE brokername="myBroker"
    brokerurl="tcp://localhost:61716"
    description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
    name="jms/flex/QueueConnectionFactory" 
    type="org.apache.activemq.ActiveMQConnectionFactory">
    </RESOURCE>
    <RESOURCE description="my Queue" 
    factory="org.apache.activemq.jndi.JNDIReferenceFactory"
    name="jms/queue/flex/simplequeue" physicalname="FlexQueue" 
    type="org.apache.activemq.command.ActiveMQQueue">
    </RESOURCE>
    <VALVE classname="flex.messaging.security.TomcatValve"></VALVE>
    </CONTEXT>
    
  13. Start your Tomcat server. The ActiveMQ message broker starts listening for messages on port 61716. You can send messages to and receive messages from the JMS topics and queues that you configured. For more information about configuring and using ActiveMQ, see the ActiveMQ documentation available on http://activemq.apache.org.

WebSphere

LiveCycle Data Services includes a WebSphere-specific implementation of RTMP server. This version uses threads created by WebSphere.

Configure LiveCycle Data Services for use with WebSphere

  1. Expand a LiveCycle Data Services WAR file to a temporary folder:
    jar -xvf  [lcds].war
  2. Uncomment the resource-ref element for WorkManager in the web.xml file. This setting makes the resource available in java:comp/env/ at res-ref-name (java:comp/env/wm/MessagingWorkManager):
    <RESOURCE-REF>
    <DESCRIPTION>Flex Messaging WorkManager</DESCRIPTION>
    <RES-REF-NAME>wm/MessagingWorkManager</RES-REF-NAME>
    <RES-TYPE>com.ibm.websphere.asynchbeans.WorkManager</RES-TYPE>
    <RES-AUTH>Container</RES-AUTH>
    <RES-SHARING-SCOPE>Shareable</RES-SHARING-SCOPE>
     </RESOURCE-REF>
  3. Map the WorkManager resource-ref in the web.xml file to the RTMPEndpoint in [lcds-webapp-root]/WEB-INF/flex/services-config.xml. The websphere-workmanager-jndi-name maps to the res-ref-name available in java:comp/env in step 2. For example:
    <CHANNEL-DEFINITION id="my-rtmp">
    <ENDPOINT url="http://{server.name}:2038/"></ENDPOINT>
    <PROPERTIES>
    ...
    <WEBSPHERE-WORKMANAGER-JNDI-NAME>
    java:comp/env/wm/MessagingWorkManager
    </WEBSPHERE-WORKMANAGER-JNDI-NAME>
    ...
    </PROPERTIES>
    </CHANNEL-DEFINITION>
  4. To configure data service destinations that do not use transactions with RTMP based channels, set <USE-TRANSACTIONS>false</USE-TRANSACTIONS> for the data service destination in the /WEB-INF/flex/data-management-config.xml file.
  5. To integrate the new NIO HTTP server, update the services-config.xml to include the websphere-workmanager-jndi-name declaration in the <SERVERS>section:
    <SERVERS>
    <SERVER id="data-nio-server">
    <PROPERTIES>
    <BIND-PORT>12080</BIND-PORT>
    <WEBSPHERE-WORKMANAGER-JNDI-NAME>
    java:comp/env/wm/MessagingWorkManager
    </WEBSPHERE-WORKMANAGER-JNDI-NAME>
    </PROPERTIES>
    </SERVER>
    <SERVER id="data-nio-secure-server">
    <PROPERTIES>
    <BIND-PORT>2051</BIND-PORT>
    <WEBSPHERE-WORKMANAGER-JNDI-NAME>
     java:comp/env/wm/MessagingWorkManager
    </WEBSPHERE-WORKMANAGER-JNDI-NAME>
    <KEYSTORE-PASSWORD>changeit</KEYSTORE-PASSWORD>
    </PROPERTIES>
    </SERVER>
    </SERVERS>
  6. Create a WAR file from the expanded directory structure. For example:
  7. jar -cvf [lcds].war *
  8. From the WebSphere Administrator, define a WorkManager for use by your application. From the admin, choose Resources > Asynchronous Beans > Work managers. By default, the DefaultWorkManager is available at the wm/default jndi-name. Also, you can add a separate WorkManager for your application.
  9. Deploy the WAR file. During deployment, map the WorkManager resource-ref to an actual JNDI name for your WorkManager. For the DefaultWorkManager, wm/MessagingWorkManager (name used by your web.xml) maps to wm/default (the JNDI name of the actual server resource).
  10. (Optional) To enable custom authentication, open the WebSphere Administrator and configure a custom user registry using the files under [install_root]resources/security/websphere/ as usersFile and groupsFile custom properties.

Running the monitoring application, ds-console.war, on WebSphere with administrative security enabled

  1. Uncomment the <SECURITY>section under the RuntimeManagement destination in the services-config.xml file for the ds-console web application. The file contains comments instructing users to do this when running on WebSphere with administrative security enabled.</SECURITY>
  2. Uncomment the <SECURITY-CONSTRAINT>section under <SECURITY>in the services-config.xml file for the ds-console web application. The file has comments instructing users to do this when running on WebSphere with administrative security enabled.</SECURITY></SECURITY-CONSTRAINT>
  3. Make sure that you use the WebSphereLoginCommand.
  4. Create a WAS User Group called console_administrator and add any users who are allowed to use this application to this group. These users must also have at least one role that allows them to access MBeans under WebSphere security.

JBoss

(Optional) This configuration provides custom authentication against the current JBoss realm. Usually, the default location for this authentication stores user information in jboss_root/server/default/conf/users.properties and roles information in jboss_root/server/default/conf/roles.properties. For more information on realms, see the JBoss documentation. For more information on LiveCycle Data Services custom authentication, see the LiveCycle Data Services documentation and information in the install_root/resources/security directory.

  1. Place install_root/resources/security/tomcat/flex-tomcat-common.jar and install_root/resources/security/tomcat/flex-tomcat-server.jar in the jboss_root/server/default/lib folder.
  2. Add <VALVE classname="flex.messaging.security.TomcatValve"></VALVE>tag to the Context descriptors.
  3. Restart JBoss.

Known issues

Retrieved from "http://labs.macromedia.com/wiki/index.php/LiveCycle_Data_Services_3"