Category Archives: J2EE

JBoss AS Server Configurations (all, minimal, etc.)

JBoss 5 is supplied with 5 different server configurations:

  • minimal
  • default
  • all
  • standard
  • web

When JBoss AS is started, the server configuration can be specified using the -cswitch, so for example, to start the minimal configuration, you would start JBoss as:

run.bat -c minimal

But what do the different configurations include? Each configuration contains a different set of services, for example clustering, which is only supported by the all configuration.

The JBoss Installation and Getting Started Guide contains details of what is in each different server configuration.

Security for JSF Applications

I see a lot of posts around the internet by people asking what the standard mechanism for security is in JSF web applications.

From a security standpoint, JSF applications are no different from any other servlet based framework applications. If you’re deploying applications on J2EE / EE servers (e.g. GlassFish or JBoss) or even on Tomcat, then my first choice would be to use JAAS for security.

JAAS is straightforward to configure, is flexible and is a standard.

Next time you need to implement a security mechanism, I’d recommend you take a look at JAAS before embarking on writing custom security mechanisms. You never know – it may save you a lot of time.

Using Spring for J2EE apps

There’s an interesting thread going on over at The Server Side based upon a comment made by Ugo Cei – “I seriously wonder why anyone would want to develop anything substantial in Java nowadays without using Spring.”

Having done J2EE applications using both “traditional” approaches (i.e. EJB 2.x) and more lightweight approaches (e.g. Spring), I’d choose the more lightweight approach every time. Probably the majority of J2EE applications don’t need the full J2EE stack and Spring provides all the tools necessary to get the job done. As I mentioned in a previous post, when I’ve done projects without using Spring, I’ve missed not having dependency injection (why should I really care about getting a database connection?).

EJB 3 looks interesting however, yet there is a large momentum with Spring at the moment, so I don’t see either technology toppling the other. I think both technologies will co-exists side by side.

I Miss Dependancy Injection

I’ve just started working on a fairly small web application project that uses Struts as its web framework. I like Struts, its fairly simple to use and covers just about everything I need for my application.

Since I’m now using NetBeans 5 Beta 2 (eventually!), I though I would have a read of Geertjan’s series of articles on how to use Struts with NetBeans. These are good articles if you are new to Struts or want to see how NetBeans handles Struts development.

However, since I’ve used Spring in the past, Geertjan’s method of grabbing database connections seems odd. I’m not detracting in any way from the series of articles (which are great) which are intended to discuss struts development with NetBeans – this is more of a problem I have with Struts.

Once you get into the rhythm of using DI, it seems strange going back to explicitly setting things up. For example datasources – injecting datasources directly into DAOs is one of the best things that I like about Spring and something that seems completely unnecessary now when using Struts.