[Installation, Configuration & DEPLOYMENT] - double-naming of ejb's in jboss-4.2 +
by airdrik
Until now, we've been using Java 1.5 on jboss 4.0.5 for running certain of our ejb services.
I've been assigned the task of figuring out what needs to be done in order to get everything building and running on Java 1.6.
>From my testing so far, it seams my best bet is to figure out to get things running using jboss 4.2.2.GA, and so far I have been successful to the extent that things build and deploy.
The problem comes up when running jboss 4.2.2, the context paths that the ejb's get deployed to seem to include the name twice; for instance, when deploying someService.ear, the context path shows up as someService-someService-ejb rather than someService-ejb like it does in jboss 4.0.5.
I've also tried installing jbossws-native-2.0.3 on top of jboss 4.0.5 (a work around I found to get java 1.6 services to run on jboss 4.0.5), and that produces the same result as running on jboss 4.2.2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158093#4158093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158093
17 years, 10 months
[Security & JAAS/JBoss] - not getting custom callbackHandler inside the loginmodule!!!
by balajiv
I have a problem initializing LoginContext with custom CallbackHandler!
Inside my LoginModule class in initialize(..), I am getting different CallbackHandler eventhough I instantiated the LoginContext with custom CallbackHandler.
This is the web app, using JSF components (ICEfaces 1.7) and JBoss 4.2.2GA.
login-config.xml under <jboss4.2.2GA home>/server/default/conf:
| ....
| <application-policy name = "myapp-login-module">
| <authentication>
| <login-module code="com.xyz.security.jaas.MyLoginModule" flag="required">
| </login-module>
| </authentication>
| </application-policy>
| ....
|
web.xml in the WEB-INF folder:
....
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>All resources</web-resource-name>
| <description>Protects all resources</description>
| <url-pattern>/*</url-pattern>
| </web-resource-collection>
| </security-constraint>
| ....
jboss-web.xml
| <jboss-web>
| <context-root>/myapp</context-root>
| <security-domain>java:/jaas/myapp-login-module</security-domain>
| </jboss-web>
faces-config.xml
| ...
| <managed-bean>
| <description>
| user info, implements Principal and has getName()
| </description>
| <managed-bean-name>userProfile</managed-bean-name>
| <managed-bean-class>com.xyz.security.business.UserProfile</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
| ...
| <managed-bean>
| <description>
| this class has login method and instantiates LoginContext with the custom CallbackHandler
| </description>
| <managed-bean-name>appSecurity</managed-bean-name>
| <managed-bean-class>com.xyz.security.jaas.AppSecurity</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| <managed-property>
| <property-name>userProfile</property-name>
| <value>#{userProfile}</value>
| </managed-property>
| </managed-bean>
| .....
|
AppSecurity.java
...
| public AppSecurity(){
| handler = new MyCallbackHandler();
| }
|
| public void login() throws LoginException{
| LoginContext loginContext = new LoginContext("myapp-login-module", handler);
| loginContext.login();
| }
| ...
|
Our LoginModule class 'MyLoginModule' is not getting custom callback handler inside initialize(...) method. I know, I am doing a big mistake here, please help me out.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158080#4158080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158080
17 years, 10 months