This content has been marked as final. Show 6 replies
Automating the build is not the same as speeding up the build and is not the same as speeding up the develop-build-deploy cycle .
To automate the build consider tools like Hudson.
To speed up the build identify what is slowing it down first. If it's server restarts then (assuming integration tests are involved) consider starting the server once and running the tests against an already running server.
To speed up develop-build-deploy cycle look at integrating your server with your IDE and start the server in debug mode. Maybe look at other tools like jrebel too.
To speed things up, keep in mind that changes to your JSP/JSF files usually means you don't have to restart your server. Only changes to your java classes and *.xml files may require it.
10 minutes to run sounds excessive especially for a small project (I'm assuming its small because you're asking the question in a 'new to java' section). What is your build/launch methodology/steps? Posting them may help us see where the problem is. What IDE are you using? How much memory does your computer have? Does your computer need to be defragmented? Are you running the server and database on the same your computer as your IDE? Are you using Ant or Maven? Are you launching the server from within your IDE or manually copying the war file to your server? You should never have to restart the server if you make changes to the database data. Something odd about that statement.
Weblogic is another beast though, it can't be compared to the likes of Glassfish and JBoss 7 which boot up in seconds.
I speed up as follows.
- run in debug mode (IDEs tend to need that to enabled hot-swapping of code)
- write as much up front as possible so the only changes I really need to do can be hot-swapped
- test driven development; by the time I boot up the server I have already seen 80%+ of my code running
The JVM is quite clever and can hot-swap byte code if the change isn't too invasive. As long as you don't change the structure of a class (so you only change code inside a method), it can generally be reloaded. Your IDE should automate this for you, all you have to do is alter the code and the change will be sent to the running JVM. If the code can't be hot-swapped, the IDE should tell you this. Eclipse at least does this very well.
To make hot-swapping of code even more complete you can look into JRebel which can hot-swap basically everything. But it is commercial.
936517 wrote:No, that doesn't make any sense to recommend without knowing what the OP is doing. Weblogic is the cornerstone of the Oracle development platforms, if it is used likely it is part of a bigger picture we don't know about.
Per the previous post, sounds like you will be better off switching to Glassfish or JBoss.
Your right, but my recommendation still stands. I provided it just as a possible alternative to speed up development. Since he posted under 'new to Java', I suspected he may (or may not) be just learning Java on a small project and not locked into a particular server (can't tell since his post didn't provide additional information). Where I work, we use Glassfish for a complex application (however it doesn't serve millions of customers) so I think its a viable alternative. It is of course up to him to decide if my suggestion is worthwhile given his development situation, and to research the alternative servers. I assumed I didn't need to state that explicitly. Guess I should have included a disclaimer: http://www.kith.org/jimmosk/disclaimer2.html