karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: Issue in injecting a bean with <JAAS config
Date Thu, 18 May 2017 06:35:22 GMT
You can't inject them.
The reason is that the JAAS layer is in charge of creating the login module
instances.
However, you can retrieve them from the OSGi registry from within the
module.
>From the AbstractKarafLoginModule you have the BundleContext, so you can
then grab any OSGi service you want.

2017-05-17 12:46 GMT+02:00 ashgonline <ashgonline@gmail.com>:

> Hi,
> I have one peculiar thing to achieve.
> I need to inject a list of bean references while initiating a JAAS module.
>
> <jaas:config name="karaf" rank="2">
>         <jaas:module
> className="org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule"
>                      flags="required">
>           </jaas:module>
>  </jaas:config>
>
> Need to add a ref list of beans when this module is initialised.
> I am not sure how to achieve the same.
>
> Any help in this regard will be welcome.
>
> Thanks..
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Issue-in-injecting-a-bean-with-JAAS-config-tp4050372.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message