Skip to main content

Posts

Showing posts from June, 2005

NetBeans Server Plugins

NetBeans 4.1 has built in support for Sun App Server and Tomcat 5.5. There is also a Server Plugins project for NB that adds support for JBoss 4, WebLogic 9 and WebSphere 6. The server plugins project is currently classified as experimental. Currently the only way to try these plugins is to build NB and the required plugins – you can only download the source for them at the moment. Downloading and building is a easy process, albeit rather lengthy. Full details are given on the server plugins home page, but basically to download from CVS and build on Windows you need to do the following. rem Create a directory to store and build NB in. mkdir netbeans cd netbeans rem Setup CVS set CVSROOT=:pserver:anoncvs@cvs.netbeans.org:/cvs rem login to CVS - no password required. cvs login rem download NB relase 4.1 source cvs -z 6 co -r release41 -P stable rem download server plugins source cvs -z 6 co -P serverplugins rem build NB cd nbbuild ant rem build JBoss plug...

Spring Connection Pooling with DBCP

Recently I wanted to add a connection pool to my Spring Web Application. I decided to use Commons DBCP to provide the connection pool as I’m using the Spring JDBC wrapper classes. Googling around didn’t find any examples of how to set up DBCP, so I’ve written my findings here. Adding a connection pool to a Spring app is simply a matter of specifying the relevant entries in the Spring servlet configuration file. The XML snippet below shows an example of how a database connection pool can easily be configured. net.sourceforge.jtds.jdbc.Driver jdbc:jtds:sqlserver://localhost:1433/db;prepareSQL=0; SendStringParametersAsUnicode=False; username password 2 5 2

Java Web Start

I’ve just noticed a poll that is currently running on the java.net home page asking if anyone has ever ran a Java Web Start Application. I must say that the results were quite encouraging. At the time of writing, 80% of the respondents have answered “yes” to the question. (You can see the current poll results here ). Being able to run applications without having to install any software (apart from the loader) has got to be one of the most beneficial aspects available to modern computing. I still remeber the old days when IT departments had to manually install software on every workstation. One of my favourite examples of using Web Start is on Santhosh Kumar’s WebLog (which, incidently, I recommend to anyone doing Swing development) where he provides sample Java code and then a Web Start example of the code. If you are one of the 20% that hasn’t run a Web Start application yet, have a look at Sun’s docs .

Adding Subversion Support to NetBeans 4.1

I’ve just installed the NetBeans module that allows me to access my Subversion repositories from within NB 4.1. Installing is a painless process. Browse to the NetBeans Generic VCS Module page and download the relevant module (currently Subversion 1.1.5 and 1.1.6 available). Select “Update Center” from the “Tools” menu in NB. Choose to install a manually downloaded module rather than contact the update center. Select the file you have just downloaded and complete the Wizard. Once you have done this, NetBeans will install the module and you can start using Subversion. (NetBeans 4.0 seems to need a restart at this stage, but 4.1 doesn’t). Once you’ve got support added, click on “Versioning -> Versioning Manager” and add a Subversion working directory to the list noting to specify the correct parameters for the Subversion repository. You should now have support for the SVN commands from within the Projects tab in NB.

Moving to NetBeans 4.1

I’m thinking of starting to use Netbeans 4.1 full time for my Java devlopment. In no particular order, these are the reasons why. It supports JDK 1.5 out of the box. Now that I use JDK 1.5 features, I wouldn’t like to give them up. Typesafe collections, enumerations, annotations. Without these Java would be a much weaker language. Its fast. Even on old machines I’ve tried it on, it works well. I’ve used it regularly on a Linux desktop with 256M of memory and its still responsive. Developing Web Applications is very productive. With the embedded Tomcat, its very quick to start Tomcat up and debug web aps by right clicking on a jsp and selecting “Debug”. Its got a good GUI designer You can design your GUIs within NB easily and then see what they look like. Maybe this isn’t as powerful as the GUI builder in IntelliJ IDEA 4, but its close. However, the upcoming GUI builder, Matisse , looks very promising.