views:

2693

answers:

5

At my work, we use Weblogic Server to host an enterprise portal. Which is fine.

However, I've recently had the opportunity to use Tomcat for some side projects, and I am struck by the incredible difference in speed. Tomcat takes 3-5 seconds to start up, and 10-15 seconds to deploy a medium-sized projects. Wewblogic takes 3-5 minutes to start, and up to 10 minutes to deploy. This kills any iterative development.

Am I going to have to resign myself to its being slow and bloated, or is there anything I can do to speed it up? Anyone have experience with this?

+9  A: 

You will not be able to turn the frog into a princess. I would wonder slightly about those startup times for weblogic - they seem a bit excessive, you're not running on linux by any chance ?

Tomcat contains a very small subset of the features weblogic has. We develop on jetty but deploy on weblogic for acceptance/production environments and this works fairly well. You can do the same with tomcat.

Tomcat is a fairly strict container whilst weblogic is lenient, so you'll normally have only minor troubles deploying to weblogic, especially as long as you continuously do both.

You can also use a tool like javarebel to do really nifty hot-deployment and avoid all those restarts.

krosenvold
Interesting. I'll definitely look in to javarebel.Unfortunately I can't deploy to Tomcat or Jetty for development... We're running Weblogic Portal which unfortunately relies very much on the rest of the BEA ecosystem and seems to choke without it.
levand
Are you running weblogic on linux ? There is a very obscure issue with the random number generation on linux that causes very slow startup times of weblogic. I can dig up the solution if that's the case.
krosenvold
+1 for mentioning javarebel (now called jrebel)
MatthieuF
+2  A: 

You haven’t mentioned what level and what platform but the WebLogic Server Performance and Tuning guide contains a number of hints and tips that may help you.

nzpcmad
+3  A: 

As krosenvold said, the random number generation can cause slow startup.

The recommendation from Oracle is to use one of the -D flags below - only on non-production systems since it lessen security.

Use -Djava.security.egd=file:///dev/urandom switch or file:/dev/./urandom to the command that starts weblogic.

The information above is taken from http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14772/weblogic_server_issues.htm#CIHIIBGJ

If the -D flag doesn't work, look at the following solution: http://www.itonguard.com/20090313/weblogic-starts-slow/

Tomas Forsman
+1  A: 

If you use Weblogic workshop, then you just need to publish, not restart the application server while doing iterative development.

John Liptak
A: 

Thanks a lot for this article. I was fighting with WLS during 2 days. file:/dev/./urandom realy works!!

andrzej