Dec 10
This post explains step by step actions to enable SSL in Tomcat
- Generate an RSA key for signing the certificate:
openssl genrsa -out key.pem 2048
- Generate a certificate using the new key:
openssl req -new -x509 -key key.pem -out cert.pem -days 365
Answer the quesstions with your name, organization name, e-mail, etc.
- Since the certificate is in PEM format, convert it to PKCS12 for Tomcat:
openssl pkcs12 -export -in cert.pem -inkey key.pem -out cert.p12 -name tomcat
Enter a password, don’t leave it blank.
- Edit $TOMCAT_HOME/conf/server.xml and modify the SSL connector:
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreType="PKCS12"
keystoreFile="conf/cert.p12" keystorePass="password"/>
Remember to change password with the one typed at 3.
Note: DON’T use a self-signed certificate in a PRODUCTION SITE! Contact with a CA to sign your certificate.
Related Posts
Tags: certificate, HowTo, keystore, OpenSSL, PEM, PKCS12, RSA, server.xml, SSL, Tomcat
Nov 23
This semester I’m studying a subject called Network Project where we study the principles behind the design, configuration and evaluation of computer network applications, protocols and specific formats for use on the Internet.
As a final project we have to build a system using several network technologies such XML, Ajax, SOAP or RMI. We decided to develop contract signing portal to give support to businessmen.
To build a big system like that in a record time we are going to use frameworks to make our workload lighter. JBoss jBPM is one of them.
jBPM includes an Eclipse plug-in to model business processes. You can specify the work-flow of you processes using a drag&drop interface, adding nodes and transition in a very simple way.

Eclipse automatically creates an XML file that defines the process. You can deploy this file to your application and jBPM work-flow engine controls its execution. This engine includes tools like Hibernate to manage persistence and state of the process and log4j for system logging.
jBPM also includes a tool for monitoring the execution of your business processes so you can control your company.
In my opinion this is an excellent middleware for integration of enterprise applications. It makes easy all the development to the programmer and offers great advantages to CEO’s and other members on the board.
Related Posts
Tags: BPM, Eclipse, Hibernate, Java, JBoss, jBPM, workflow
Nov 23
This post is a how-to with the necessary steps to install jBPM 3.2.2 on a Apache Tomcat 5.5 and MySQL 5.0.
- Create schema and table in database
In this example a schema ‘jbpm’ with a user ‘jboss’ is used.
Generate all jBPM tables using the script jbpm.jpdl.mysql.sql. If you want your users/roles information (the identity components) also from the MySQL db, use the second sql script attached here mysql.identity.script.jbpm321.sql to set up the necessary tables and fill them with the demo values.
- Prepare your jBPM archive
- Open a console in jbpm-jpdl-3.2.2/deploy and run:
ant customize.console.for.tomcat
- This builds a jbpm-console.war in jbpm-jpdl-3.2.2/deploy/customized
- Unzip this file and change jbpm-console/WEB-INF/classes/hibernate.cfg.xml to reflect the following changes:
<hibernate-configuration>
<session-factory>
<!-- hibernate dialect -->
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property>
<property name="hibernate.connection.username">jboss</property>
<property name="hibernate.connection.password">jboss</property>
<!-- JDBC connection properties (end) -->
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<!-- DataSource properties (begin) ==
<property name="hibernate.connection.datasource">java:/JbpmDS</property>
== DataSource properties (end) -->
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
...
- Note that the following line is commented:
<property name="hibernate.connection.datasource">java:/JbpmDS</property>
- Extract el-api.jar and el-ri.jar from the original war file (jbpm-console.war/WEB-INF/lib) to jbpm-console/WEB-INF/lib
- Copy jboss-j2ee.jar and commons-collections.jar to jbpm-console/WEB-INF/lib. You can find these files in jbpm-jpdl-3.2.2/server/server/jbpm/lib
- Download mysql jdbc driver from MySQL Home Page and move it to $TOMCAT_HOME/common/lib
- Zip jbpm-console to a war file and move it to $TOMCAT_HOME/webapps
- Setup a JDBC Realm in Tomcat
Create a file jbpm-console.xml in /$CATALINA_HOME/conf/Catalina/localhost similar to
<Context>
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/jbpm"
connectionName="jboss"
connectionPassword="jboss"
userTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g"
userNameCol="g.TYPE_ = 'security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_"
userCredCol="DISTINCT u.PASSWORD_"
userRoleTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g"
roleNameCol="g.NAME_" />
</Context>
Now you should be able to run jBPM default web app in Tomcat.

This how-to is a resume and an adaptation of JBoss.com Wiki. Sql scripts are also the same of the original page.
Related Posts
Tags: BPM, Hibernate, HowTo, Java, JBoss, jBPM, MySQL, Tomcat, workflow
Recent Comments