Chitika

Thursday, March 17, 2005

migrating from WebLogic in Linux to OC4J in XP

A couple of weeks ago I was trying to resurrect a 3 yr-old project, implemented using WebLogic 6 in Linux, into a working web application using OC4J 10gAS in Windows XP. Here are some notes I made during the process, which might help anyone doing or planning to do the same:

1. Do not rely on vendor specific deployment descriptor. If you have to, use the same name everywhere. Back in 2001 when EJB was still a new thing, WebLogic offers weblogic-ejb-jar.xml as a vendor specific deployment descriptor, in combination with the default ejb-jar.xml. The mapping between the names in the default ejb-jar.xml and the weblogic-ejb-jar.xml differed in our implementation. This has caused a great deal of problem for me migrating it, because OC4J does not read the weblogic-ejb-jar.xml.

2. OC4J requires adding "java:comp/env" prefix when performing a JNDI lookup to find the instance of local ejb. This certainly is different from the WebLogic implementation.

3. There was a bug in OC4J 9.0.3, following are the extract information from their official site:

Using <jsp:include page="xxx.html"> with html files greater than 20K causes an exception. If the included HTML file size is > 20k you will encounter java.lang.StackOverflowError. Currently, there is no workaround, other than to keep the file size < 20KB. The bug is being fixed and will be part of next update.
This certainly caused me trouble, since the application used a lot of <jsp:include> where one or more of them may be of 20 KB size or more. The only solution was to upgrade to OC4J 10.x.

If you guys have any other experience in migrating J2EE application from one application server in one platform to another application server in another platform, please collaborate..
I'd really like to know.. :D

Further Reading:
J2EE Performance Testing with BEA WebLogic Server
Oracle Application Server 10g Web Development

1 comment:

  1. Wonderful blog!

    I'm doing what you've done these days. Do you have some ideas on these problems:

    How to migrate wls T3StartupDef implementation to OC4JStartup class. I tried but it seems that you have to use the context passed by container. But I would like to create my own initialcontext in it:<.

    I cannot create multiple TopicSession using one TopicConnection, which is supported in wls :<.

    Still one more question. EJB refenced classes should be put into share-lib directory or configured in server.xml as init-library? I always get NoClassDefFoundError.

    Thanks a lot.
    My email addr: hi_chad@msn.com

    ReplyDelete