Showing posts with label LiveCycle. Show all posts
Showing posts with label LiveCycle. Show all posts

Tuesday, January 12, 2010

Pooling is your friend

Been trouble shooting performance issue on a client's server for some time now. The problem was that under heavy load, the jvm would eventually run out of heap, or the database connections ran out. I tried various JVM settings to see if i can force garbage collection to occur more frequently, but all to the same result. Our LiveCycle server wasn't able to sustain the load and dies.

Turns out that this was easily fixable by setting the pooling settings for the services inside of adminui. By setting to use pooled instances only, and a minimum and maximum pool size, we got a much more stable environment. Consequently, the garbage collection also occurred much more frequently. Under load, the LiveCycle Server didn't run out of heap space either!

To modify pooling for a service:

1. Login to admin ui
2. Click on services
3. Select application and services
4. Select service management
5. Find the process / service that you created
6. Click on pooling. update as follows

- Use pooled instance for all requests
- Initial service instance pool size set to average number of concurrent transactions expected.
- max service instance pool size set to maximum number of concurrent transactions expected
- maximum async service instance is set to 0
- invocation wait time out is set to 0.

This setting worked so far for us. I will update the blog if that's not the case.

David

Tuesday, July 28, 2009

LiveCycle WebSphere Database Connectivity

Just want to document this in case anyone else runs into issue:

Problem:
- You are trying to initialize the database on WebSphere 6.1.0.19 or higher but the initialization step failed. When you look at the log, you see bunch of these: Caused by: com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException: Illegal attempt to enlist multiple 1PC XAResources

Note: this may cause problems for folks who had an earlier installation of WebSphere 6.1.0.7, installed LiveCycle, then tried to patch WebSphere up to 6.1.0.19. You will see the Illegal attempt to enlist multiple 1PX XAResources. This may cause instability in your system. I would recommend updating to use the solution below.

Reason:
- In a version between 6.1.0.7 and 6.1.0.19, WebSphere depends to be smart, and try to identify the GenericDataStoreHelper class by looking into the JDBC libraries. So the default DataStore helper class is set to the specific one for the driver, for e.g. MicrosoftSQLServerDataStoreHelper, instead of the GenericDataStoreHelper.

Resolution:
1. login to websphere admin console (http://localhost:9080/admin)
2. Click on resources > data sources
3. click on IDP_DS,
4. For datastore helper class, select to use a custom one, and type the following in: com.ibm.websphere.rsadapter.GenericDataStoreHelper
5. repeat for EDC_DS
6. test data connections
7. run through initialize database from livecycle configuration manager (/opt/adobe/LiveCycle8.2/ConfigurationManager/bin/configurationManager.sh

Thursday, July 16, 2009

Setting JBOSS to leverage database fail over

We have a client who runs a clustered SQL Server instance leveraging a clustered JBOSS environment. We ran into problems in LiveCycle when the client fails over the database server from one node to the other. What we ended up doing is to set up jboss to round-robin a set of database connection URL, such that when one fails, it will try the other connection string. Here's how to set up the adobe-ds.xml and mssql-ds.xml to support database fail over:

<datasources>
<ha-local-tx-datasource>
<jndi-name>IDP_DS</jndi-name>
<connection-url>jdbc:sqlserver://DBSERVER1:PORT;DatabaseName=DBNAME|sqlserver://DBSERVER2:PORT;DatabaseName=DBNAME</connection-url>
<url-delimeter>|</url-delimeter>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<!-- newly added to test out connection retry -->
<connection-property name="autoReconnect">true</connection-property>
<connection-property name="maxReconnects">10</connection-property>
<connection-property name="initialTimeout">10</connection-property>
<user-name>DBUSER</user-name>
<password>DBPASSWORD</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>30</max-pool-size>
<blocking-timeout-millis>60000</blocking-timeout-millis>
<idle-timeout-minutes>10</idle-timeout-minutes>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool-->
<check-valid-connection-sql>select count(*) from edcprincipalentity</check-valid-connection-sql>

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</ha-local-tx-datasource>
</datasources>

Tuesday, May 27, 2008

Just posted a session for MAX2008

Being the procrastinator that I am, I finally got around to posting a session for MAX 2008. The sesion will be about how to built a collaborative review solution using Adobe AIR and LiveCycle. The solution has 3 components: AIR client, LiveCycle backend services, and a repository for storing content and comments. During the session, I will talk about high level architecture, implementation details, and showcase bunch of demos. (starting from a multitude of assets, leveraging Adobe's shared review capabilities, and use LiveCycle as the orchestration engine.)

For others who wants to present, go to https://adobemax.dabbledb.com/page/callforsessions/NLXYueHm and suggest a session before the deadline tonight.

See you all in San Fran.

David

Thursday, March 13, 2008

Enable SSL for LiveCycle Rights Management for cheap

LiveCycle Rights Management ES which protects PDF documents with revokable policies, requires an SSL certificate to ensure communication between PDF and the server is secured. In the past, we typically use a self signed certificates for development purposes, until the project is ready for production. Unfortunately, most trusted CA signed SSL certificates tends to be quite expensive.

I didn't know about this until recently, but inexpensive SSL certificates ($30 USD / year) can be used. P.s. I am not affiliated with GoDaddy. If you find other cheap and trusted CA, feel free to post in the comments.

I was a bit skeptical about whether the root certificate is trusted in the browser and in various OS's. Of the machines i tried, it seems to work fine. So below is a brief end to end instructions on how to enable your Rights Management ES instance (jboss) using a trusted CA signed certificate.

Step 1: Generate java keystore


Step 2: Generate certificate request


Step 3: purchase a Standard SSL certificate
Follow instructions provided by the CA, and paste certificate signing request when requested.

Step 4: importing the various certificates into your java keystore
After successfully purchasing a certificate, you will be sent a set of certificates. A root, a chain, an intermediate, and your site certificate. Follow the instructions below to import the certificates into your keystore.


Step 5: update server.xml

First copy the .keystore into a known location. I used JBOSS_HOME\server\all\conf. Then update the server.xml located at JBOSS_HOME\server\all\deploy\jbossweb-tomcat55.sar as below.

Friday, May 25, 2007

LiveCycle Enterprise Suite (ES) preview release

LiveCycle Enterprise Suite (ES) preview release is available for download from http://www.adobe.com/devnet/livecycle/espreview/ . Yes folks, this is the next version of LiveCycle.

Some of the changes in LiveCycle are quite significant in this release. Notable features include:

Installation and Configuration
  • consistent installation and configuration experience from a single installer.
  • better support at detecting environment settings and automatic deployment of LiveCycle ES onto the app servers.
  • Support of the latest app servers and databases.
I had a lot of experience installing LiveCycle: from Windows, to Linux, to AIX; from JBOSS, to WebSphere to Weblogic; and using the default MySQL, to SQL Server to Oracle. A little too much, to my liking. ES has came a long way in terms of installation and configuration from the old LiveCycle 6 days. There's a single installer (yah!), with a place to enter all your serials or suite serials without having to worried about product compatibility or order of installation within the platform. This is a huge improvement. There are some still hiccups with regards to deploying ES apps onto the application server, but I am sure these will be addressed in the production version.

Designer ES
  • [New feature] Form Guide, a flash based wizard constructed with the same PDF template (xdp and pdf).
  • [New Feature] Form Fragments, xdp concept that allows fragments to be reuse across different templates.
Form Guide is an excellent first step towards marrying Flex and LiveCycle. It provides an intuitive GUI to build a wizard from your pdf and xdp files, while keeping the data model consistent. This means that data inputted in the flex form guide can be used to populate the pdf form with zero effort. That being said, i have a few comments and feature requests to LiveCycle product team:

- Let me overwrite and update the generated MXML code. This will allow finer grained control over the user experience and look and feel of the UI.

- Guide preview currently generates the swf in a default location. Let me specify where to put this. Or better, place in a sub-folder from where the xdp/pdf template is.

- The preview in the guide builder doesn't open the PDF? It's pointing to a default PDF.

- I am quite excited about Form Fragments. In many of our large form projects, we could have used something exactly like this. Form fragments allows you to create, say a company header, or a mortgage calculator object and reuse across all forms. How is this different from a custom XFO? Well, when you insert an XFO, a static copy is inserted into your form. Any updates to the XFO will need to be updated in all form instances. This is not true for form fragments. Since XDP with form fragments contains a reference to the fragment, any updates to the fragment will be dynamically picked up by ALL form instances. This is a big win in terms of form maintainability.

LiveCycle ES Document Services
  • LiveCycle Forms ES can generate a form guide from the XDP template
  • Better and consistent Java API support across the board. Remote java calls now supported for Reader Extensions. We used to have to write a webservices wrapper for Reader Extensions.
  • Better and consistent SOAP API support across the board.

Workbench ES
  • Eclipse based development environment for building your form, and processes.
  • Re-skinned, and much improved workflow designer in terms of user experience.
  • Drag and drop support to add files into the repository for consumption by the processes.
Usability for Workflow designer is much better in ES. I also liked the fact that there's a consistent developer interface, for form developer, process developer, or application developer. Flex builder plug-in for eclipse should be available optionally, and plug-able into Workbench.

Process Management and Workflow
  • additional invocation methods to all services supported by default, including watch folder, email, java, soap, and remoting (flash remoting).
  • [New Feature] Workspace to replace LiveCycle Form Manager. Workspace is a Flex application that allows user to initiate and participate in processes.
This is actually really cool. Instead of being limited to using a PDF Form to trigger a process, ES supports additional invocation methods out of the box: watch folder, and email. What this means, is that processes can be triggered by copying a file into a watched folder, or an email to a specific address. This is true for all services that you create, or available out of the box.

There are alot of new and exciting features in LiveCycle ES that makes a lot of sense for developers who are currently on the 7.x platform, as well as new organizations that want to adopt LiveCycle into their business processes.

Monday, May 14, 2007

New LiveCycle Samples (with source code)

There are 3 additional LiveCycle samples that we have made available at our website.

The first sample utilizes Reader Extensions and Assembler to cover the scenario of enabling a pdf document for review, then compare and merge the comments using Assembler.

The second sample goes through various mechanisms for validating a PDF form before additional processing can occur. Three specific approaches were illustrated: LiveCycle Forms API (processFormSubmission()), LiveCycle Reader Extensions API (exportFormData()), and XPAAJ (exportFormData()).

Finally, the last sample shows how to apply a policy on a PDF document.

The samples can be found at http://www.ensemble.com/samples/adobe/livecycle

David

Sunday, April 8, 2007

Considerations when building an eform solution using LiveCycle - part 2

Continue'd from last part

5. Volume
What is the anticipated volume of electronic submissions expected? Simultaneous submissions? If large and simultaneous submissions are expected, then you want to leverage a JMS queue to handle the submission part. The downside to this is that results can not be returned to the user synchronously.

The other approach is to leverage clustering of your web / application server. This will result in better performance as well as a more reliable solution. Unfortunately there is a cost associated with clustering (software licenses and hardware).

6. Paper based submissions?
Are there times in which the signed paper forms are required for legality reasons? This is found in particular in heavily regulated industries (financial institutions and government organizations). If you require to keep a copy of the signed paper forms, then at design time, you want to consider leveraging 2D Barcode. The way the 2D Barcode works is that as you enter data using Reader / Acrobat, the data is being encoded into the Barcode. The data by default is encrypted. To decrypt the 2d barcode, you would need 1) reader extensions rights 2) barcode decoder from Adobe 3) Acrobat to print the barcoded forms.

Let me know if you have other questions in the comments area, I will do my best to include them in my post.

David

Saturday, March 31, 2007

Considerations when building an electronic form (eForm) solution using LiveCycle - Part1

This article is intended for those who are interested in migrating your existing paper based processes over to an electronic one. I will go through some high level considerations in finding the right solution.

1. PDF or HTML?
Are you interested in implementing a pure PDF solution or one that includes both HTML and PDF? LiveCycle Forms allows multiple output formats (PDF, PDF Form, HTML, DHTML, AHTML, etc) to be generated from a single template (.xdp) created from LiveCycle Designer. The caveat is that the scripting behavior is different between the HTML and PDF, resulting in scripts that has to be coded into the templates. Unless there's a significant requirement to continue to support HTML based forms, I would stick with PDF Forms.

2. When is HTML Form an appropriate output from LiveCycle Forms?
Scenario 1: If the PDF form is very long (5-10 pages), I sometimes use HTML Forms to capture data, in a multiple step wizard. This breaks the long time into a sequence of smaller and more focused forms for the user to fill out.

Scenario 2: Use HTML Forms when screen real-estate becomes a high premium (within a portal, within LiveCycle Form Manager)

3. Requirements to archive the PDF?
Do you have existing requirement to archive the PDF that the user submits? If yes, then the submit type needs to be either XDP or PDF. This is done at the form design stage. Note, to support this capabilities using Adobe Reader, the PDF needs to be reader-extended first. (Product: LiveCycle Reader Extensions)

4. Requirements to use digital signature?
Are you planning to support digital signatures in your PDF Form? If that's the case, you should be aware that an existing PKI infrastructure and/or support for roaming certificates / id needs to be there to associate and identify the signing party. Also, if digital signatures are required, the submission type (of submit buttons on the PDF) has to be an XDP aor a PDF.

to be continued..

Wednesday, February 21, 2007

LiveCycle Workflow Tutorials

For those interested, there is a series of LiveCycle Workflow tutorial posted on my company's site here.

This tutorial shows you how to implement a process using Adobe LiveCycle Workflow. The thirteen parts step you through changing an existing paper process for expense reports into a completely electronic process.

The following topics are covered:

1. Adding LiveCycle Workflow fields to the form
2. Uploading the form to LiveCycle Form Manager
3. Linking the form to a category
4. Identifying the form as initiator of a workflow
5. Initiating a workflow by submitting the form
6. Assign the form to a group of users
7. Render the submitted form as a PDF
8. Use route names as choice-list items
9. Split workflows into parallel branches of tasks
10. Save the form as PDF in the file system
11. Insert the form data into a database
12. Look up the originator's e-mail address
13. Importing the sample workflow

Cheers,

David

Tuesday, December 12, 2006

Acrobat 8 or LiveCycle?

I was browsing through messages of the Adobe Community Expert program forum and saw that a question was raised about what is appropriate for their scenario. To assess this, answer the following questions:

On the existing paper based documents:
- How many of these form processing occur on a daily basis, weekly, and/or monthly? This will dictate whether a server based solution is appropriate, or an Acrobat solution.
- What portion of the process does your client wish to automate? (in our scenarios, they tend want to automate as much as possible to save time, reduce error rate, reduce cost, better manageability, etc).

The decision to go with LiveCycle or Acrobat, really depends on the needs of your client. If they don't anticipate a lot of these forms / data capture, Acrobat 8 can do the trick. As you know, Acrobat 8 incorporate some of the essential server based products' capabilities out of the box. Limitation with Acrobat 8 is that each of the form instance you sent out for data capture from different parities can only support up to a maximum of 500 users. And there is still a decent amount of manual work (importing data specifically) that still has to occur. In the case of a custom solution using livecycle, any repetitive work can be automated, but comes at a higher cost. Another factor to consider, is cost. Each of the LiveCycle servers is tens of thousands per cpu (for specific pricing, please contact your Adobe sales representative.), whereas Acrobat is approximately 500 USD per seat.

Tuesday, December 5, 2006

Welcome to my blog!

What is LiveCycle?

Since most of my work involves crafting solutions based on LiveCycle, I figure my first post will be a short summary of what it is.

LiveCycle is a set of J2EE based document services from Adobe. It's all about a PDF. Services around a PDF that is. There are 8 products each provide a very specific functionality. For e.g., LiveCycle Forms allows templates created in LiveCycle Designer (WYSIWYG form design tool), to be rendered as HTML, PDF, PDF Form, for Print, etc, as well as merging / prepopulating the forms with XML data. LiveCycle Forms (known as Form Server in its previous live), also has the capabilities of extracting XML data out from a PDF based form. Policy Server allows PDF document (in the latest release, also word and excel documents) to be protected with a digital certificate, such that only authorized personnels are allowed to have access to its content. There's too much to go through in one post, but one of the way to think about LiveCycle is providing various capabilities for a PDF document on the server side while leveraging the performance, scalability and security of the J2EE platform.

For those who are interested, the LiveCycle Server lineup are as follows:

LiveCycle Forms
LiveCycle Reader Extensions
LiveCycle Policy Server
LiveCycle Security Server
LiveCycle Workflow Server
LiveCycle PDF Generator
LiveCycle Assembler
LiveCycle Forms Manager

My coming posts will include some detail dive in of the LiveCycle server stacks, and how it's used in the market place. As well as some of my thoughts around flex, apollo, and pretty much anything else I can think of.

Oh yeah, for the lawyers, whatever is expressed in my blog are my thoughts only, and do not represent views of any company I am associated with.

Thanks for reading!

David in Vancouver