Orion Server and NetBeans IDE 4.1

Now that there are server plugins available for JBoss, WebLogic, and WebSphere, there's not really much point in using Ant to start a server. After all, virtually every popular server is somehow already integrated in the IDE and, in addition to the functionality offered by the abovementioned plugins, the IDE comes bundled with the Sun Java System Application Server 8.1 and Tomcat Web Server 5.5.7. So there's no point in Ant-based server deployment. Right? Wrong. First of all, if you're familiar with Ant you might still be inclined to want to start servers via Ant scripts, even though they're also available as plugins. And there's nothing to stop you. Secondly, however, only one version of a server is supported in the IDE, either via bundling or plugins. (Note that in Tomcat's case two versions ae supported in 4.1 -- 5.0 and 5.5). Thirdly, there are several cool server vendors that are currently not supported via plugins in the IDE. One of them is JRun (discussed in detail elsewhere in this blog). Another is the Orion Server, which is an application server made in Sweden.

Currently I know almost nothing about Orion. (One thing I do know is that they have great documentation -- their information on data sources and tag libraries, for example, is very very detailed and extensive.) However, according to their website, the following things are a few of the "many things" that "sets Orion apart from other application servers":

  • Superb performance. Orion is easily the fastest J2EE-based Aplication Server
  • Orion was the first commercially available application server with full J2EE support
  • Unique development features like auto-deploy and full hot-swap.
  • Very affordable pricing

(One can question the first point -- seems like a matter of opinion to me and quite hard to prove on top of that. The second point is a bit of a turn-off when you consider how many free application servers are currently available. On top of that, "auto-deploy" isn't really unique at all -- every server that I know of supports that. Not sure what "full hot-swap" means, but I wonder whether it's not just as unique as auto-deploy. In fact, while something can be said about each of the things that "sets Orion apart from other servers", something else that sets it apart is that it isn't J2EE 1.4 compliant -- they're on J2EE 1.3.)

Integrating the Orion Server in NetBeans IDE 4.1 doesn't require much knowledge of the Orion Server. I only need to know how to work with it from Ant -- and once I know that, integration is a piece of cake because NetBeans IDE 4.1 provides shortcuts (like menu items, toolbar buttons, and keyboard shortcuts) to Ant scripts. So, this is how I start the Orion Server:

<target name="Start-Serv-Orion">
  <java jar="c:\\orion\\orion\\orion.jar" fork="true" dir="c:\\orion\\orion" /> 
</target>

And this is how I invoke the Server Console:

<target name="Start-Serv-Orion">
 <java jar="c:\\orion\\orion\\orion.jar" fork="true" dir="c:\\orion\\orion" >
    <arg value="-console"/>   
 </java> 
</target>

When I create a new web application in the IDE, I get a build.xml file for free. This build.xml file contains Ant scripts. I just need to add the above targets to the Ant scripts (I'd probably change all the variables in the scripts above to properties) and then, when I right-click on a target's node in the Files window, I can assign menu items, toolbar buttons, and keyboard shortcuts. For example, I could add the menu items to a menu that is dedicated to Orion:

(Have a look at the Ant script in the illustration above. You see syntax highlighting. What you don't see is code completion. So even if you don't know Ant (on top of not knowing Orion), when you press Ctrl-Space in the IDE, you'll get some suggestions for what to add to the target.)

Once these things have been set up, I can deploy to the Orion Server, either by drag-and-dropping my application's output (WAR or EAR or whatever) into the Favorites window or by using an Ant script:

<target name="orion-deploy" description="Deploy to Orion">
      <copy file="${dist.dir}/${jar.name}" todir="${orion.deploy.dir}"/>
</target>

The above target could be hooked up to a free-form project so that it appears in its right-click contextual menu. For standard projects, it could be included in the -post-jar target so that it runs as soon as the JAR file has completed building. Furthermore, I can set up the debugger to step through code on the Orion Server, I can set up the HTTP Monitor to analyze HTTP requests on the Orion Server, and the Orion Server will behave exactly as if it had been "officially" supported by NetBeans IDE 4.1. That says as much for the power of NetBeans IDE 4.1 as it does for Ant -- which is why they really complement each other very well. In short, every conceivable server vendor is supported by the IDE, because the IDE is so well-integrated with Ant.

Comments:

Actually you might want to take a look at Cargo. It's a codehaus based project and it aims at easy deployment for multiple application servers. Orion is supported in 2 versions, tomcat in 3 versions, resin in 2 versions etc. One has Java APIs, ant tasks and maven plugin for manipulating the deployment. It can even download the app server for you I believe.

Posted by Milos Kleint on May 22, 2005 at 09:25 PM PDT #

Thanks Milos. I'll take a look -- but first I have to take a close look at the new version of Mevenide of course!

Posted by Geertjan on May 24, 2005 at 03:03 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
24
25
26
27
28
29
30
   
       
Today