|
|
YOUR FEEDBACK
SOA World Conference
Virtualization Conference $200 Savings Expire May 16, 2008... – Register Today! Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON WebLogic Server
Migrating from WebLogic 6.1 to 8.1
Catching the fine points
By: GVB Subramanyam
Digg This!
BEA's name is synonymous with the application server. Most applications running on Unix in North America run on BEA's WebLogic server, particularly financial apps. The current stable WebLogic 8.1 version does a lot more than earlier versions. Migrating to new versions is always challenging and risky, but is done for efficiency and new capabilities, and to stay current with a vendor's products and support. Most applications developed on the WebLogic 6.1 used JDK 1.3 or earlier. A move from WebLogic 6.1 to 8.1 means making our applications compatible with JDK 1.4.1 or higher since WebLogic 8.1 shipped with JDK 1.4. Most of the common migration hazards are discussed at bea.com. I am going to share few personal observations. These will be our discussion points.
Our application will be migrated to WebLogic 8.1. The current environment is: Operating System: Solaris 5.8 P4 WebLogic Server 8.1P2 Java Release 1.4.2_06 Actuate 7.1SP6 Popular RDBMS and it has no impact on migration Struts1.1 Framework Model II Web Architecture Common Upgrade Issues For example, take XML parsing. Unlike WebLogic 6.1 and earlier, WebLogic 8.1 doesn't tolerate encoding errors. So modify encoding from Unicode to utf-16. Also there are no more JSP recompilations so the following lines have to be removed from the web.xml.
<servlet>
<servlet-name>JSPClassServlet</servlet-name>
<servlet-class>WebLogic.servlet.JSPClassServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JSPClassServlet</servlet-name>
<url-pattern>*.JSP</url-pattern>
</servlet-mapping>
Getter and Setter Methods For example, there was an error in using tag library uri='/WEB-INF/tlds/taglib.tld' prefix='j2ee': There is no setter method for property 'Items' for Tag class 'com.sun.j2ee.apps.application.taglib.list. SearchListTag' probably occurred because of an error in /template.JSP line 8: <%@ taglib uri="/WEB-INF/tlds/taglib.tld" prefix="j2ee" %> This failure occurs in JSPs and beans that are subject to the Introspector API. One good example is getter and setter methods. If the setter is an integer, the getter must be an integer too, and can't be a string. Serializable Objects "Failed to replicate non-serializable object" If this happens, find the page throwing the error and make sure that all the data put in the session is serializable. Every object stored in the session has to implement a serializable interface for replication to happen. WL Cache <wl:cache> <!--the content between these tags will only be refreshed on server restart--> </wl:cache> Using a cache tag forces the cached values to be erased every time fresh values are calculated. The cache must be named with the name attribute. The size attribute will flush all values; the key attribute will flush specific values. WebLogic 8.1 has two versions of cache and this gives us the option of using the soft references for caching to avoid excessive use of the system memory. However, we can't use soft references when WebLogic is running in the Hotspot VM. Tweak JVM Memory Usage One solution is to increase the JVM's heap size to a higher value if more memory is required to run the files. Increasing the heap size can reduce delay and add stability. So, on the JVM options line in the binTogether.bat file, change -Xms64m to -Xms256m (or higher). Another solution is to break a big page into many smaller pages and bring them together at runtime using include. Using <%@include> won't work because that's a compile-time include. Still another approach is to look for places to save the tags. For example, the tag <html:option>, which was extended to let the text display. You can replace this: <Html:option ... ><bean:message key="foo"/></html:option> with this: <html:option ... key="foo"/> The more cases of this type there are the better the situation. Besides the <html:option> tag, some other struts tags are shortcuts to including the text. You might also consider replacing <html:option> sequences with <html:options> if you can build an appropriate collection upfront. One resolution is to have our own tags. Changing some frequently used tags by extending BodyTagSupport to extending Tag Support and marking them with <body content>empty</body content> in the .tld file significantly reduces generated code size. This may not always be the way out, but it helps. Whenever the JSP is too big, one must set the variable com.sun.tools.javac.main.largebranch to true. In that case, you have to use JRocket, which is bundled with WebLogic 8.1. It can handle memory better than the JDK. Page Directive with Language Attribute Java.net.SocketException: Too Many Open Files <Critical> <WebLogicServer> <BEA-000204> <Failed to listen on port 7001, failure count: 1, failing for 0 seconds, java.net.Socke tException: Too many open files> An immediate step to take is to increase the rlim_fd_max to 8192 in /etc/system. But this can lead to the usage going up to 7000 and may not prove a solution. The best thing to do is fine-tune the TCP parameters on the operating system. Java.lang.OutOfMemoryError Miscellaneous <context-root>isoft/iSoft</context-root> Summary References BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||