Seam Security demo running on Glassfish



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  http://mediacast.sun.com/share/warren/seamBooking.zip


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: http://mediacast.sun.com/share/warren/SEAM-Libraries.zip


Enjoy





powered by performancing firefox

Comments:

yeh! really good job, really. thx.

Posted by かず on February 21, 2007 at 11:09 AM MST #

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: http://www.michaelyuan.com/blog/2007/02/28/glassfish-and-seam-tips/ cheers Michael

Posted by Michael Yuan on February 28, 2007 at 12:42 AM MST #

Post a Comment:
Comments are closed for this entry.
About

Things that amuse me

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll