Support Wikipedia

Thursday, October 30, 2008

JSF + Spring + JMS (websphere MQ) on WAS 6.1 HOWTO

Alright, I have been struggling for the past one week to get Spring to work with JSF and JMS.

Here are the steps to get the job done.


  1. Create a directory with the following jars

  • commons-beanutils-1.7.0.jar

  • commons-digester-1.8.jar

  • commons-lang-2.4.jar

  • commons-codec-1.3.jar

  • commons-discovery-0.2.jar

  • commons-logging.jar

  • commons-collections-3.2.jar

  • commons-el-1.0.jar

  • el-impl-1.0.jar

  • el-api-1.0.jar

  • jsf-facelets-1.1.14.jar

  • jstl-1.1.2.jar

  • myfaces-impl-1.2.4.jar

  • myfaces-api-1.2.4.jar

  1. Create a utility jar commons-logging.jar (OPTIONAL)

      1. Unzip the common-logging.jar in a directory

      2. Create a file in that directory “commons-logging.properties” with the following content

          priority=1 org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl

      3. Now, create a jar file with from this directory using the command

            jar cvf commons-logging.jar .

      4. Add this commons-logging.jar to the directory created in step 1.

  1. Create a shared library in WAS admin console.







4. Create a new class loader in WAS




5. Add shared library references






  1. Make sure the WEB-INF/lib of your application doesnt have anything that is already added to the shared library.

  2. Eventualy you might need to create the following files in the META-INF/services directory of your web-app:(if the dir services does not exist just create it.

  1. javax.faces.application.ApplicationFactory with content: com.sun.faces.application.ApplicationFactoryImpl

  2. javax.faces.context.FacesContextFactory with content: com.sun.faces.context.FacesContextFactoryImpl

  3. javax.faces.lifecycle.LifecycleFactory with conent: com.sun.faces.lifecycle.LifecycleFactoryImpl

  4. javax.faces.render.RenderKitFactory with content: com.sun.faces.renderkit.RenderKitFactoryImpl


Package and deploy the application with the default class loaders.



NOTE :
  • DONOT refer from the WAR to the shared library that is being referenced by the application server's class loader.
  • The application class loader order should be “parent class loader first”.
  • The WAR class loader policy should be “class loader for each WAR file in application”.


  • The WAR's classloader order SHOULD be “parent class loader first”.

Monday, October 06, 2008

Installing Telugu fonts on Centos

I went to the thotaramudu's blog on my brand new laptop that my company gave me and the font was all funny. I am running Centos 5.2 and wanted to install the telugu font.

So, I did a quick search on yum repositories for telugu


[root@localhost ~]# yum search telugu
Loading "fastestmirror" plugin
Loading "priorities" plugin
Loading mirror speeds from cached hostfile
* dries: ftp.belnet.be
* kbs-CentOS-Extras: centos.karan.org
* kbs-CentOS-Misc: centos.karan.org
* extras: mirror.cs.vt.edu
* rpmforge: fr2.rpmfind.net
* dag: apt.sw.be
* updates: mirror.cs.vt.edu
* addons: ftp.lug.udel.edu
* emperor: yum.emperorlinux.com
* base: mirror.myriadnetwork.com
* adobe-linux-i386: linuxdownload.adobe.com
218 packages excluded due to repository priority protections
libuninum.x86_64 : Library for converting unicode strings to numbers
openoffice.org-langpack-te_IN.x86_64 : Telugu language pack for openoffice.org
m17n-db-telugu.noarch : Telugu m17n-db input maps
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.i386 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers
openoffice.org-langpack-te_IN.x86_64 : Telugu language pack for openoffice.org
fonts-telugu.noarch : Free Telugu truetype fonts
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers
openoffice.org-langpack-te_IN.x86_64 : Telugu language pack for openoffice.org
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers
libuninum.x86_64 : Library for converting unicode strings to numbers


There are a couple I can use. So, I installed them.


[root@localhost ~]# yum install fonts-telugu.noarch m17n-db-telugu.noarch openoffice.org-langpack-te_IN.x86_64



Thats it. I restarted the firefox and its all Telugu now. :)

BTW, the openoffice language pack and the m17n-db fonts are optional. I just took them coz it didnt hurt and they are really light.
Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia