Skip to main content

Porting Day Communique 4.2 Into Weblogic 9.1

This document will explain the steps that should be followed to configure the Day Communique 4.2 dev. Environment with Weblogic as the app server Instead of the default Servlet engine provided by Communique.

For this paper, I have used the sample application and its domain for porting the Day Communique.


Weblogic domain is a logically related group of WebLogic Server resources. Domains include a special WebLogic Server instance called the Administration Server, which is the central point from which you configure and manage all resources in the domain. Usually, you configure a domain to include additional WebLogic Server instances called Managed Servers. You deploy Web applications, EJBs, and other resources onto the Managed Servers and use the Administration Server for configuration and management purposes only.

Day Communique comes with five war files, they are crxauthor.war,crxpublisher.war,author.war,publish.war and ROOT.war.
  • crxauthor.war: The repository of the authoring environment.
  • crxpublish.war: The repository of the publishing environment.
  • author.war: The Communiqué authoring environment.
  • publish.war: The Communiqué publishing environment.
  • ROOT.war: The Communiqué welcome screen; you do not need this file for Communiqué to run, and it may not be available in custom installations of Communiqué.

Day comes with its own Servlet container which by defaults executes these web applications. When these application runs they lock kind of the \\Day\CQ-4.2\data folder.

So we have to make sure, the default Servlet container is not running, or we can stop these web application from the admin panel of the Day Servlet container.

To stop them log in to the admin panel of the Day Servlet Container.

http://{DAY SERVER}:4402/admin/webapps , with username and password admin/admin, unless u have specified something else while installing Day.

COPY THE COMMUNIQUE LIBRARIES TO WEBLOGIC

Before you can install the Communiqué Web applications, you need to install the Communiqué libraries on the application server. You can find the libraries in the folder /server/lib/container of your Communiqué program folder. Add the following .jar files (Java archive files) to the libraries of your application server:

  • crx-api-1.3.1.jar
  • jcr-1.0.jar
  • day-commons-naming-1.1.jar

You may copy other libraries also if applicable.

For example for BEA WebLogic 9.1 lib location is :


/user_projects/domains//lib

In our case for the same application domain, the location is \\ bea\weblogic91\samples\domains\wl_server\lib

DEPLOY THE COMMUNIQUE WEB APPLICATION

Now start the weblogic server and also start the admin console.

And perform the following steps

  • Select Deployments.
  • Select Lock & Edit to be able to install new web apps.
  • Click Install.
  • Select the WAR file to deploy, from the \\\Day\CQ-4.2\server\webapps.
  • Select Install this deployment as an application.
  • On the next screen keep the defaults and click Finish.
  • Click on Activate Changes to make your configuration changes persistent.
  • Select the crx application from the deployments list and select Start->Servicing all Requests.
  • Repeat the process for all WAR files.

Look at the weblogic console if any exception is thrown or not.

If every thing is fine, you should be able to access all the web application deployed in weblogic.

TROUBLESHOOTING

If you have deployed the web application but, while accessing them the page shows something like System not ready yet then it means

i) weblogic could not load crxauthor and crxpublish web application due to configuration problems.

ii) Check if you have copied all the required libraries in the correct location inside weblogic.

iii) Check if the data folder of communiqué is locked or not.

iv) Make sure that, these web application instances are not running from the default Servlet container.

Comments

  1. Do you have any idea how to stuff CQ with any decent MVC framework? It can be SpringMVC, Struts... Anything that would let me quit writing scriptlets?

    ReplyDelete

Post a Comment

Popular posts from this blog

Masking Credit Card number in Java

Sometimes we need to mask crucial information like Credit Card Numbers, CVV numbers etc before storing  or logging the information. This example mask Credit Card Number (Except last 4 Digit) from a Text which contains information along with Credit Card Number.

The following example demonstrates how we can easily mask the credit card with Matcher and Pattern Classes. This Sample Code uses Matcher and Pattern.
Pattern Used in this sample is not optimized for Credit Card Numbers, this pattern will get any numerical numbers in the String Content.  Based on the Credit Card Type a more efficient and Strict RegEx can be used to mask the Credit Card.
/**Mask the Credit card number but last four digit value **/   Pattern PATTERN = Pattern.compile("[0-9]+"); String message = content; Matcher matcher = PATTERN.matcher(message); String maskingChar = "*"; StringBuilder finalMask = new StringBuilder(maskingChar); while …

Converting Java Map to String

Java Collections framework, String manipulation etc is something that we often encounter in Development process.
For processing collections (like checking null/empty, Intersection, Disjunction) We do have some of the very use full libraries.

Some of the Collection related libraries are Apche Commons Collections and Google  Collections(Guava).

Problem Use Case

This article explains how to convert a Java Map to String(and vice versa) using different libraries and technique.

One way is to use StringBuilder(Or String) and loop though the Map and build the String by applying some sort of separator ( for key:value and entry). Here we have to take care of the null value etc.

Without Any Library
If we want to convert the map to a String with key value separator and also individual entry seperator in the resulting String, we have to write code for that. For a simple Map, we have to iterate though the map, take care of the null values etc. Following is a sample to get String built out from Map C…

Invoking EJB deployed on a remote machine

Invoking EJB deployed on a remote machineIn case we are calling remote ejb( ejb deployed on remote machines),The JNDI lookup might lookup like,Properties env = new Properties();env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");env.put(Context.PROVIDER_URL, "XX.XXX.XX.XX:1099");env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); Context ctx = new InitialContext(env);If we are calling local ejb then we can simply create InitialContext without any parameters.Like,Context ctx = new InitialContext();