Tuesday, August 25, 2009

IPC issue in WebSphere 6.1

Inter Portlet Comunication (IPC) is the hot spot in Portal environment. I already had some experience with it and described it here: IPC with JSR 286.

Everyone would probably think as I thought, that this should work in WebSphere Portal 6.1.

And it does. BUT! There is one additional requirement for having this to work under WPS 6.1.

After deploying your Portlets in the WPS you will have to go to the Administration Tab of WPS.

Than on the left side click the Manage Pages.
In the newly opened page, you will see a Table with only one column. Click on ContentRoot.

After that you will have to find your own Page-Name, which corresponds to the the Tab-Name where you run your Portlets.

When done, on the far right you will see bunch of icons. Click pencil like icon (it also displays the name EDIT PAGE LAYOUT when going over with your mouse).

The Page Customizer will open. Four Tabs are available:

  • Content
  • Appearance
  • Locks
  • Wires

In the Content Tab, you add all the Portlets you want to run here on this page (your newly developed Portlets with IPC).

After doing, click the Wires Tab. WPS has already read your portlet.xml file. You will see a table with the following columns:

  • Source portlet - The Event Publishing Portlet
  • Sending - The Publishing Event name space and name
  • Target page - leave it as it is. Here you can define the Page if your target Portlet is on another page. If on the same page, leave it as it is.
  • Switch page - I don't really get it what this has to do with all of this here (but hey)
  • Target portlet - The Portlet that has to consume your Published Event
  • Receiving - The name space and name of your Published Event.
  • Wire Type - leave it to Public

Don't forget to press the tiny + button on the end. This has to be repeated for each IPC Event of your Portlets.

When done, press the Done Button.

Now you can go to your Page Tab and test your IPC Eventing.

Hope it works for you too.

Maven Dependency Management for running RichFaces project on WebSphere 6.1

It is somewhat troubling issue when trying to deploy the same project in different environments. Some Application Servers (AS) ship their own versions of different library's. This will cause the same application to fail or run on different AS. For example, JBoss ships the JSF Library's while WebSphere does not. Examples are numerous.

Here is how you can configure Maven to build your RichFaces Application with all the needed Jar's and up and running to WebSphere AS 6.1. - WebSphere Porta 6.1

NOTE: This might not work for another Server version!?





4.0.0
de.mycompany.group.id
myproject-artifact-id
war
Basic RichFaces on WebSphere
1.0
Basis RichFaces Project running on WebSphere 6.1



maven-compiler-plugin

1.5
1.5







apache-repo
apache-repo
http://myfaces.zones.apache.org/dist/maven-repository


ibiblio
ibiblio-repo
http://mirrors.ibiblio.org/pub/mirrors/maven


jboss-repository
jboss-maven
http://repository.jboss.org/maven2/



just-another-repository
maven-repo
http://mariner.volantis.com/maven



central
repository
http://repo1.maven.org/maven2


maven2-repository.dev.java.net
Java.net Repository for Maven
http://download.java.net/maven/2
default





codehaus-repository
Plugin Repository von Mojo Codehaus
http://repository.codehaus.org/







com.sun.facelets
jsf-facelets
1.1.14


javax.faces
jsf-impl
${jsf.version}


javax.faces
jsf-api
${jsf.version}


org.richfaces.ui
richfaces-ui
${richfaces.version}


org.ajax4jsf
ajax4jsf


javax.faces
jsf-api


javax.faces
jsf-impl




org.jboss.portletbridge
portletbridge-api
${portletbridge.version}


javax.faces
jsf-api


javax.faces
jsf-impl




org.jboss.portletbridge
portletbridge-impl
${portletbridge.version}


javax.faces
jsf-api


javax.faces
jsf-impl




spring
org.springframework
2.5.6



portlet-api
javax.portlet
2.0


commons-beanutils
commons-beanutils
1.8.0


commons-collections
commons-collections
3.2


commons-digester
commons-digester
1.8


commons-fileupload
commons-fileupload
1.2


commons-logging
commons-logging
1.1.1


logkit
logkit


avalon-framework
avalon-framework




commons-logging
commons-logging-api
1.1


commons-httpclient
commons-httpclient
3.0.1


javax.el
el-api
1.2


javax.el
el-ri
1.2


sun-jaxb
jaxb-api
2.1.9


sun-jaxb
jaxb-impl
2.1.9


apache-xerces
xercesImpl
2.9.1


cglib
cglib
2.1_3


asm
asm




asm
asm
1.5.3






commons-beanutils
commons-beanutils


commons-collections
commons-collections


commons-digester
commons-digester


commons-logging
commons-logging
provided


javax.faces
jsf-api


javax.faces
jsf-impl


javax.el
el-ri


javax.el
el-api


javax.portlet
portlet-api
provided


sun-jaxb
jaxb-api


sun-jaxb
jaxb-impl


cglib
cglib


asm
asm


apache-xerces
xercesImpl


commons-httpclient
commons-httpclient



org.jboss.portletbridge
portletbridge-api


org.jboss.portletbridge
portletbridge-impl



com.sun.facelets
jsf-facelets


org.richfaces.ui
richfaces-ui





1.2_12
3.3.1.GA
1.0.0.CR2




NOTE: Some of the dependencies might be included in the Dependency Management section, but not in the dependency. This is due to copy paste reasons. Just ignore, so will Maven do as well.