-
1. Re: Remote EJB invocation from JBoss module
alanshields May 13, 2013 6:41 AM (in response to v.blahoz)Sorry what do you mean by "EJB context selector cannot be set programatically, because it's locked for modules"?
Cheers
Alan
-
2. Re: Remote EJB invocation from JBoss module
wdfink May 13, 2013 7:01 AM (in response to v.blahoz)Maybe the scoped context introduced in AS7.2 will be an option for you.
But I don't understand your environment. Do you use a CustomLoginModul which uses remote EJB's to verify the credentials instead of LDAP/DB/...?
-
3. Re: Remote EJB invocation from JBoss module
v.blahoz May 13, 2013 7:21 AM (in response to alanshields)alan shields wrote:
Sorry what do you mean by "EJB context selector cannot be set programatically, because it's locked for modules"?
Cheers
Alan
Well, since JBoss module doesn't read jboss-ejb-client.properties automatically, my first attempt was to set the properties programatically (see https://community.jboss.org/thread/200914), but this results in an error saying "EJB client context selector may not be changed"
Wolf-Dieter Fink wrote:
Maybe the scoped context introduced in AS7.2 will be an option for you.
But I don't understand your environment. Do you use a CustomLoginModul which uses remote EJB's to verify the credentials instead of LDAP/DB/...?
That is correct, I use custom class extending UsernamePasswordLoginModule, which uses combination of LDAP/DB to verify credentials and do other stuff, and that is where I need remote EJB invocation.
I'll have a look at the link you've posted, unfortunatelly upgrading to JBoss 7.2 is not an option at the moment.
Thank you for your answers.
-
4. Re: Remote EJB invocation from JBoss module
jaikiran May 13, 2013 7:35 AM (in response to v.blahoz)Assuming the jboss-ejb-client.xml (note that if the client is a server in itself, then you need the xml not the properties file) is in the META-INF folder of your JBoss Module, then when you are adding a dependency on that module in your top level deployment, what happens if you expose the META-INF folder of the dependency in jboss-deployment-structure.xml:
<dependencies> <module name="my.foo.bar.module" meta-inf="export"/> ....
-
5. Re: Remote EJB invocation from JBoss module
v.blahoz May 13, 2013 8:51 AM (in response to jaikiran)jaikiran pai wrote:
... note that if the client is a server in itself, then you need the xml not the properties file...
I did think about which jboss-ejb-client file to use, so I tried both possibilities. Thanks for explaining why in this case the xml is needed.
Unfortunately meta-inf exporting didn't cause any obvious alteration.
-
6. Re: Remote EJB invocation from JBoss module
v.blahoz May 20, 2013 5:27 AM (in response to v.blahoz)1 of 1 people found this helpfulSince noone has come with any more suggestions, I assume that using JBoss 7.1.1 I can't change EJB receiver for EJB invocations in JBoss modules, thus we decided to remove our login module from modules folder and pack it with application war (in the futura with all applications) as library.
Thanks for all answers.
Cheers
-
7. Re: Remote EJB invocation from JBoss module
ybarcelo May 23, 2013 11:44 AM (in response to v.blahoz)Hi Vladimir,
i'm having the same situation like you.
I have a custom login module and i need to invoke ejb for execute some methods.
Could you show me the steps to pack the module into application war and how call it in the security domain config?
Regards.
-
8. Re: Remote EJB invocation from JBoss module
v.blahoz May 24, 2013 1:48 AM (in response to ybarcelo)Yassir,
will do my best.
First of all, if you need the login module only for this specificit application, you can include it directly among other classes in your war. If you want it reuseable (actually in case it was in the war which is deployed among another applications, the other applications should be able to use the same security domain, but they would be dependant on the war containing login module being deployed) you just need to make the login module classes visible to JBoss. So you put them in some jar and either deploy it within an ear or make it accessible to your applications as a library (deploy into maven repository, local maven install...) and include this library in any of your applications, that needs it (in fact the application doen't really need that module, Jboss does, but through that application Jboss can access it).
Then you can simply specify your security domain like this
<security-domain name="myCustomAuth" cache-type="default">
<authentication>
<login-module code="fully.qualified.name.of.MyLoginModule" flag="required" />
</authentication>
</security-domain>
That's about it. I certainly hope I didn't write any nonsense here and if so, someone would correct me.
Cheers
-
9. Re: Remote EJB invocation from JBoss module
ybarcelo May 24, 2013 9:02 AM (in response to v.blahoz)Dear Vladimir,
Thank you SO MUCH!!!.
it make sense, i understand.
i will try.
My best regards.
-
10. Re: Remote EJB invocation from JBoss module
ybarcelo May 24, 2013 9:24 AM (in response to v.blahoz)Hi Vladimir,
i had read this: http://docs.jboss.org/jbosssecurity/docs/6.0/security_guide/html/Dynamic_Security_Domains.html
for to do your suggestion. but i don't have find any documentación for JBoss 7.1,
do you have it?
Regards.
-
11. Re: Remote EJB invocation from JBoss module
ybarcelo May 24, 2013 10:47 AM (in response to v.blahoz) -
12. Re: Remote EJB invocation from JBoss module
v.blahoz May 29, 2013 3:16 AM (in response to ybarcelo)Yassir,
as for the documentation, the only I was able to find is this
https://community.jboss.org/wiki/JBossAS7SecurityDomainModel
https://community.jboss.org/wiki/JBossAS7SecurityCustomLoginModules
And as for your Exception, it seems to me, that you are missing definition of your security-domain in your standalone.xml. I personally don't know about login-config.xml and it's function as I don't use it at all, but standalone.xml domain definition looks very similar to it. In your case you should have something like this
<security-domain name="svcDomainSecurity" cache-type="default"> <authentication> <login-module code="svc.loginmodule.SvcLoginModule" flag="required"> <module-option ... ... ... ... /> </login-module> </authentication> </security-domain>
Apart from this, I don't see any significant difference between your and my configuration.
Regards
-
13. Re: Remote EJB invocation from JBoss module
ybarcelo May 30, 2013 11:00 AM (in response to v.blahoz)Vladimir, thanks so much.
Finally i could package the custom module on EAR
MySvcEar.ear
---- Mylognmodule.jar (jar module with custom module)
----Myejbsecurity.jar (ejb-jar module with ejb for business methods for security)
---- mywebApp.war (war module with web applicatión that contains form login to use custom login module)
Regards.