[Clustering/JBoss] - Re: Partition name for clustered EJB3 SLSB
by kkrivopustov
I run two servers, then start the client, but all requests are executed on one server (whereas with annotated beans requests go sequentially to both servers). When I stop server executing requests, I get the following exception on the client:
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
| at $Proxy1.doSomething(Unknown Source)
| at test.cluster.client.Client.process(Client.java:46)
| at test.cluster.client.Client.main(Client.java:59)
| Caused by: org.jboss.aop.NotFoundInDispatcherException: Object with oid: jboss.j2ee:jar=test-cluster.jar,name=FooBean,service=EJB3 was not found in the Dispatcher
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
| 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:412)
| 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:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| ... 3 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975940#3975940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975940
19 years, 7 months
[JBoss Seam] - Re: Stale Data until redeploy
by gavin.king@jboss.com
Well, OK, server-side state is *one* way to do pagination.
But an extended persistence context caches data in the server. It is never aware of any changes you make to data via some other persistence context. So you must either:
(1) do any updates in the scope of the same persistence context OR
(2) use em.refresh()
if you want to see changes made by other contexts.
But the reality is that a SESSION scoped persistence context is always a bad thing (it is a memory leak, to begin with), and you should never do that.
There are other ways to solve your problem. A great start is to not try to pass an entity instance directoly from the search screen to the detail screen. Instead, re-fetch it using find(), or merge it using merge().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975938#3975938
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975938
19 years, 7 months
[JBossWS] - Re: WS 181 and my own security module - call problems
by cboatwright
The only way I got this to work is to package my own WAR with a web.xml and jboss-web.xml with the correct security nodes in each. The auto-generated WAR that JBossWS created for EJB3 endpoints doesn't seem to create anything other than the servlet and servlet-mapping nodes in the web.xml file. You need to also have the security-constraint, login-config, and [I think] security-role nodes in the web.xml file too. When I created by own (basically empty) WAR with that information, my EJB3 endpoints had the Principal object and handled role checking (via the @RolesAllowed annotation). Perhaps something along these lines will solve your problem.
I haven't reported this as a bug because I'm new to JBossWS and hope that someone tells me the correct annotation to use in order for the generated WAR file that JBossWS creates to have all the security nodes as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975934#3975934
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975934
19 years, 7 months
[JBossWS] - Re: Access ejb 3.0 exposed web service using https
by cboatwright
On your first question, I'm not certain myself but am about to start looking into this myself. I imagine the client will need access to the certificate authority store much like a browser has its list of CAs.
On your second question: yes. A WAR file is created if you don't have one yourself. If you use the annotations of "@PortComponent" you can set some of the basis info there. Then a web.xml and jboss-web.xml are created for you. However, I found it best to create your own WAR with those files (in the standard WEB-INF location, of course) so you can handle security. It took me a little while to figure out that the generate WAR does not seem (and I'd love if someone knew how to do it) to generate the <security-constraint> and <login-config> nodes required for authentication. It will only generate the <servlet and <servlet-mapping> nodes. The "@PortComponent" annotation has parameters which would lead one to believe (e.g. authMethod) it would create the security nodes as well, but after many days of stuggle, I never could get it to.
Be sure you define your WAR in your EAR's META-INF/application.xml file. Otherwise, a generated WAR might still be created.
Since the "ServiceEndpointID" is nicely generated via the generated WAR, you may consider letting it generate it for you the first time and coping the web.xml and jboss-web.xml to your own project for packaging (just go to your JBOSS_HOME/server/SERVER_INSTANCE/tmp/deploy directory and look for your ear.
If you don't care about authentication then I suppose you could just go with the generated one.
I'm somewhat new to JBossWS myself, so take my advice with a gain of salt :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975931#3975931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975931
19 years, 7 months