2 Replies Latest reply on Mar 30, 2012 7:47 AM by fcorneli

    Need help with EAR/security setup

    parszab1

      Hi,

      I would like to ask if anyone implemented a solution and found a best pattern to use Seam 3 security module in an Ear/JBoss 7.1 setup.

       

      • I have an Ear with an ejb-jar (with business logic in Stateless session beans) and a war (JSF2 using Solder and Seam faces).
      • I need an Ear because that is a clean design in my case: I need the business logic in a separate layer as that provides service to other clients too.
      • As a first step I wanted to add the security to my ejb-jar to inroduce IDM logic, but got exceptions and found that it pulled in other seam libraries that probably have nothing to do in an ejb layer. My exception was:

       

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"checobo.ear\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"checobo.ear\".WeldService: org.jboss.weld.exceptions.DefinitionException: Exception List with 2 exceptions:

      Exception 0 :

      java.lang.RuntimeException: Service class org.jboss.solder.resourceLoader.ClasspathResourceLoader didn't implement the Extension interface

          at org.jboss.solder.util.service.ServiceLoader.loadClass(ServiceLoader.java:217)

          at org.jboss.solder.util.service.ServiceLoader.loadService(ServiceLoader.java:197)

          at org.jboss.solder.util.service.ServiceLoader.loadServiceFile(ServiceLoader.java:169)

       

      • I thought the war/lib and ear/lib seam jars collide, so tried to set up a skinny war. That didn't work either, because Seam/Solder tried to take care of my Session beans as well in the ejb-jar. So I had other issues:

       

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"checobo.ear\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"checobo.ear\".INSTALL: Failed to process phase INSTALL of deployment \"checobo.ear\""},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager.Validatorjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManagerMissing[jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager.Validatorjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager]","jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager.ValidatorFactoryjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManagerMissing[jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager.ValidatorFactoryjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager]","jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager.Validatorjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManagerMissing[jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager.Validatorjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".MemberManager]","jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager.ValidatorFactoryjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManagerMissing[jboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager.ValidatorFactoryjboss.naming.context.java.comp.checobo.\"checobo-ejb-0.0.1-SNAPSHOT\".RecipeManager]"]}

       

      • Currently I have the impression that the cleanest is to use Seam Security only in the War client, and use standard EJB security on the ejb-jar backen. Is this a correct statement? Did anyone find any other working solution?

       

      Any feedback is much appreciated!

       

      Cheers,

      Szabolcs