I agree with Rafael on the fact that you would change the login module stack only if you want to change how the portal itself authenticates, it does not relate to portlet themselves.

Now there are valid reasons for which you would want to do that, for instance changing the security and it forces to open the ear and change it.

Previously we used to have a patch file and not and this file but Patrice Lamarque suggested to use this instead because it makes deployment simpler, because the main login config file of JBoss AS does not have to be "modified" (which means less step for using out of the box). Probably that the current behavior is the best for 98% of the use case (specially in community) and is really not good for the rest.

There are several solutions to this:

1/ avoid to have configuration in this file and have an alternative GateIn-ish config file, the file would become just a declaration that would point to a specific "configuration" login module that would read the real config. Think about a kind of "aggregating login module". This login module could have flexibility to read the config in the "gatein" configuration directory. The same would also apply for other servers like Tomcat or Jetty. That would also make gatein configuration more centralized (which is good). I don't know if this solution is technically feasible.

2/ go back to the previous system that is more "admin" oriented

there are probably other suggestions to think of.

On Feb 8, 2011, at 2:28 PM, Rafael Liu wrote:

Not an expert, but an advice nonetheless ;)

Login module is an AS thing, and your extension is registering an already existing login module, so JBoss throws an Exception. That's expected.

To deploy portlets you don't need to create an extension. But if you want to register it in GateIn's portlet repository then, yes, creating an extension is the way to go. Even if you do that, and you create an extension, you shouldn't need a new login module.

But if you really need this new login module for some reason, you need to give it another name and modify the realmName in your org.exoplatform.container.definition.PortalContainerConfig of your extension accordantly. AFAIK that's all you need.

On Mon, Feb 7, 2011 at 6:32 PM, Prabhat Jha <pjha@redhat.com> wrote:
Hello,

Can we get some expert advice on this pls?

Thanks,
Prabhat

----- Original Message -----
> Hi everyone,
>
> I have an important question about login modules in GateIn/EPP5.
>
> Now there is a gatein-jboss-beans.xml file which contains definition
> of 3 login modules for gatein-domain (default realmName).
>
> Think of this situation:
> - we have a set of new portlets and we need to add new login module
> - we are using an extension mechanism to deply everything and
> initialize new portal (we don't want to touch gatein.ear at all)
> - we add a new gatein-jboss-beans.xml in extension .ear (with old +
> new login modules defined), now it means that both
> gatein-jboss-beans.xml (from gatein.ear and from extension .ear) are
> used
>
> But it's a problem because you will get an error during startup:
> IllegalStateException: gatein-domain is already installed.
>
> Now I know about these options:
> 1) replace gatein-jboss-beans.xml in gatein.ear with new file
> 2) have new gatein-jboss-beans.xml in extension .ear and rename file
> in gatein.ear to something like: gatein-jboss-beans.xml-backup (it
> means that only the one from extension is used)
> 3) create new portal container with new realmName and define all login
> modules in new domain (but in our case we want to extend default
> portal container)
>
> So the question is if there is some other way how to define new login
> modules (without touching gatein.ear)?
>
> Thanks for any help or ideas!
>
> Best regards,
> Michal VanĨo, JBoss QA
>
> (I have it temporarily done with second option, but I'd like to
> improve it - I want only to deploy new .ear and that's all)
>
> _______________________________________________
> gatein-dev mailing list
> gatein-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/gatein-dev

_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev



--
Rafael Liu
+55 61 9608-7722
http://rafaelliu.net
_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev