[JBoss Seam] - Re: Getting
by ejbengine
"pete.muir(a)jboss.org" wrote : Post the code for registrationFinder (this is working for me in a simple situation)
@Name("registrationFinder")
| @Stateful
| public class RegistrationFinderBean implements RegistrationFinder {
|
| @Logger
| private Log log;
|
| @SuppressWarnings("unused")
| @DataModel
| private List< Claim > unregisteredClaims;
|
| @SuppressWarnings("unused")
| @DataModelSelection
| private Claim claim;
|
| @In
| private Session hibernateSession;
|
| @In(required=false)
| private Date accidentDate;
|
| @SuppressWarnings("unchecked")
| @Begin(join=true)
| public String find() {
| String queryString = "from Claim where dateRegistered is null";
|
| Query q = hibernateSession.createQuery(queryString);
| List<Object> results = q.list();
| unregisteredClaims = new ArrayList< Claim >(results.size());
| for(Object result : results) {
| unregisteredClaims.add((Claim) result);
| }
| return "/forms/registration/finder/finder";
|
| }
|
| @Remove @Destroy
| public void destroy() { }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076870#4076870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076870
18Â years, 8Â months
[JBoss jBPM] - Re: Node configuration with Maps - How to?
by JeanGuyer
I have an actionHandler with a List ,not a map.
Hope this will help you :
<action name="initProcessHeader"
| class="fr.xxx.xxx.workflow.impl.jbpm.actionhandler.InitProcessHeaderHandler">
| <lstVariables>
| <el>label.process|Demande de produits et prestations</el>
| <el>url.process|eco.dempdtpst</el>
| <el>label.info|N°Demande</el>
| <el>txt.info| </el>
| <el>label.sortie_stock|Sortie produit</el>
| <el>url.sortie_stock|eco.stock</el>
| <el>label.validation_preco|validation précommande</el>
| <el>url.sortie_stock|eco.commande</el>
| </lstVariables>
| </action>
public class InitProcessHeaderHandler implements ActionHandler {
| List<String> lstVariables;
|
| public void execute(ExecutionContext contextInstance) throws Exception {
| // TODO Auto-generated method stub
| for (String element : lstVariables) {
| createProcessVarFromElement(contextInstance, element);
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076869#4076869
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076869
18Â years, 8Â months
[EJB 3.0] - Custom Login Module Problem
by JPagera
Hi im want to use Custom Login Module with JBoss 4.0.5
that what i did
My login module is :
______________________________
public boolean login() throws LoginException {
if(_callbackHandler_ == null){
throw new LoginException("JPageraLoginModule Exception _callbackHandler_ is null ");
}
Callback callbackx[] = new Callback[2];
callbackx[0] = new NameCallback("Username");
callbackx[1] = new PasswordCallback("Password:",false);
try {
_callbackHandler_.handle(callbackx);
driverDB_ = (String)options_.get("driverDB_");
userDB_ = (String)options_.get("userDB_");
passwordDB_ = (String)options_.get("passwordDB_");
urlDB_ = (String)options_.get("urlDB_");
userName = ((NameCallback) callbackx[0]).getName();
loginResult = checkUserNameAndPassword(((NameCallback) callbackx[0]).getName(),((PasswordCallback) callbackx[1]).getPassword());
System.out.println("IN LOGIN METHOD FINISH....."+loginResult);
return loginResult;
} catch (UnsupportedCallbackException e) {
throw new LoginException("JPageraLoginModule Exception UnsupportedCallbackException ");
} catch (IOException e) {
throw new LoginException("JPageraLoginModule Exception IOException ");
}
}
................................................
and this is what i wrot in login-config.xml in %JBOSS_HOME%/server/default/conf
_________________________________________
<!-- My Login Module -->
<application-policy name="JPassivateSecurityDomain">
<login-module code="com.jpagera.login.JPageraLoginModul" flag="required">
<module-option name="debug">true</module-option>
<module-option name="driverDB_">com.mysql.jdbc.Driver</module-option>
<module-option name="userDB_">myusrName</module-option>
<module-option name="passwordDB_">mypassword</module-option>
<module-option name="urlDB_">jdbc:mysql://localhost:3306/jos_db</module-option>
</login-module>
</application-policy>
..............................
and this is my jboss.xml in my ejb jar file
____________________________
<security-domain>java:/jaas/JPassivateSecurityDomain</security-domain>
<enterprise-beans>
<ejb-name>JBossSessionEJB</ejb-name>
<jndi-name>JBossSessionEJB</jndi-name>
</enterprise-beans>
.................................
and im lookup session :
Properties pro = new Properties();
pro.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
pro.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
pro.put(Context.PROVIDER_URL,"jnp://jpagera:1099");
pro.put(Context.SECURITY_PRINCIPAL,"myusrName");
pro.put(Context.SECURITY_CREDENTIALS,"mypassword");
.........................
when lookup it throw these exceptions ...
javax.ejb.EJBAccessException: Authentication failure; nested exception is: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:213)
at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
at org.jboss.aspects.security.AuthenticationInterceptor.authenticate(AuthenticationInterceptor.java:123)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:66)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:263)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
at org.jboss.remoting.Client.invoke(Client.java:525)
at org.jboss.remoting.Client.invoke(Client.java:488)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
at $Proxy0.queryTabsFindAll(Unknown Source)
.................................................
it never call login method at my JPageraLoginModule
did i miss somthing or.. i dont know where is my problem
can anyone help .....
my login module is work perfectly in OC4J.......
thankx for help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076867#4076867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076867
18Â years, 8Â months
[Management, JMX/JBoss] - error in installation jboss-4.2.1.GA on win 2000
by hakim55
hi all
the error when I run run.bat is as follows
warUrl=.../deploy/jboss-web.deployer/ROOT.war/
16:46:51,250 ERROR [[/]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
at com.sun.faces.config.WebConfiguration.getServletContextName(WebConfiguration.java:208)
at com.sun.faces.config.WebConfiguration.(WebConfiguration.java:82)
at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:139)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:228)
at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
thankss a lot
Amir
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076855#4076855
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076855
18Â years, 8Â months