Skip to content

Seam Security demo running on Glassfish

February 21, 2007

After a little hacking, I have the new JBoss Seam booking demo running under GlassFish. This is based on Seam 1.1.6GA and uses the new Seam security model (which looks very cool).

The sample source code that ships with the Seam 1.1.6 glassfish demo is missing some crucial settings:

  • Your web.xml needs a ejb-ref definition to the new Authenticator bean
  • Seam security requires a drools securtyRules.drl config file
  • You need to include the associated drools libraries (even if you don’t use drools)
  • components.xml needs to declare the location of the drools securtyRules.drl file

I also reworked the demo to make it open as a Netbeans Enterprise project.  If you want to run this, you will need:

  • GlassFish. I used the latest 9.0 UR1 build
  • Netbeans. I used Netbeans 5.5.1 (it has some fixes to integrate with later GlassFish builds)
  • The Seam 1.1.6GA distribution

You can download the NetBeans project file at

You will need to define a few Libraries using the NetBeans library manager.  I wish there was a nice way of exporting library definitions in NetBeans – but until then I have resorted to the hack of packing up my library definitions from ~/.netbeans/….  as a zip file. If you are brave, you can try dropping these into your own private NetBeans library folder (after editing the library paths), or failing that, have a look at the xml defs and it should be fairly obvious which jar files you need to include. 

Here are the Netbeans library xml definitions:


powered by performancing firefox

  1. February 21, 2007 6:09 pm

    yeh! really good job, really. thx.

  2. February 28, 2007 7:42 am

    Hi Warren,
    I am not sure why you need the drools JARs and config to get this working. I am thinking that the security stuff probably auto-loaded the SeamELResolver, which is really what you need to resolve EL expressions for Seam built-in components like #{identity} … Here is an explanation:

Comments are closed.

%d bloggers like this: