[JBoss Seam] - ejb + seam from swing gui
by Kruno
We've made an application with jsf +seam +ejb and it works great, I am so pleased, but I think it would be nice if I could be able to use the same ejb beans (application logic) from client such as swing or anything else.
I did try an it partially works, injections work, entity manager controlled by seam also work.
Our application uses long running conversations and transactions are controlled by seam also flushmode is manual.
So I need to start conversation manually and set flushMode.Manual.
I tried it like this but it does not work
This is method from ejb which should start conversation
| @Begin(flushMode=FlushModeType.MANUAL)
| public String pocetak() {
|
| return "OK";
| }
|
This is part of client swing application
| ref = jndiContext.lookup("java:kadrovska/ObradaTestBean/remote");
| ObradaTest obrada = (ObradaTest) ref;
|
| obrada.pocetak();
| ......
|
I get this error:
| Exception in thread "main" javax.ejb.EJBException: java.lang.IllegalStateException: Do not start long-running conversations in direct calls to EJBs
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| 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.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:335)
| 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:769)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| .......
|
Please help.
Thanks in advance Kruno.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115913#4115913
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115913
18 years, 3 months
[JBoss Portal] - deployment issue
by marimuthub
Hi,
We are developing portal application in jboss-portal server 2.6.2.GA. We are having a filter class before login.jsp. Our application authentication done by other application. So we are performing only authorization activities inside filter class using identity management API and we have made login.jsp as a dummy and it redirects to j_security_check for redirecting to Welcome Page.
We are building our portal application as a war file. we deploying the war file under <jboss-server-home>/server/default/deploy directory.
1. Whether our deployment is ok?
2. We are setting logged in user data in HttpSession in our filter class. but we are unable to retrieve those session values in tabs.jsp and header.jsp. These files are packaged in our portal application and appropriate configurations made jboss-service.xml.
To solve the above issues We are trying to deploy our application war inside jboss-portal.sar. but deployment fails.
Please help us to resolve the issues relating to deployment.
Regards
Marimuthu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115908#4115908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115908
18 years, 3 months