[JBoss Portal Users] - EJB3 access issue between portal 2.7.2 and AS 5.1.0GA
by belcar
I've deployed an EJB3 service on JBoss AS 5.1.0.GA. I now want to interact with this service from portlets deployed on JBoss Portal 2.7.2 (on JBoss AS 4.2.3). For some reason the remoting fails with a NullPointerException.
Caused by: java.lang.NullPointerException
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:379)
| at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
| 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)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
| at $Proxy295.invoke(Unknown Source)
| at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
| at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
|
Is this a bug or is there an incompatibility between version 4.2.3 and 5.1.0.GA? Should I instead be running both servers on level 4.2.3? Maybe this is a classloading issue, since I can access the service from a CLI environment without a problem.
Thank you
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256812#4256812
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256812
16 years, 7 months
[JBoss Tools Users] - Re: Jboss Tools for Seam
by max.andersen@jboss.com
"allforjava" wrote : Thank you Max, for the reply.
|
| anonymous wrote : We support both generation from database and entities.
| |
| | If you by selective mean generate from a subset of the current entities then that is not available yet.
|
| I meant generation of only entities/components without their views. Did you meant the same?
|
You can use normal Hibernate Tools pojo generation for generating Entities if you want.
anonymous wrote :
| c. For SQL2000 when selecting the subset [new/modified tables] the system tables are also picked-up.
|
I don't understand what you mean here. What system tables are being picked up ? We only pick that up if you have not limited the generation to a specific schema (that aren't the system one ;)
anonymous wrote :
| d. Further page.xml are not generated for the components.
|
What you can do is go to Hibernate Tools code generation launch config, copy it and remove the generation steps you don't want.
Then run that launch config and it will only generate for the bits and pieces you wish for.
anonymous wrote :
| anonymous wrote : You mean only generate list and not home/edit and vice versa ?
| | No - what is your usecase if you have the feature from above ?
|
| No. It needs an elaboration. Jboss Tools the options are available to create new Seam Entity/Action/Form.
| However there is no option to use existing entity/component to create the view. If wrong please correct.
|
No, that is correct.
anonymous wrote :
| 3. I was expecting as seam-modules for seam-project, similary as NetBeans has modules for java projects. However, how I need to proceed.
|
I don't understand what you mean by "seam-modules for seam-project" ?
anonymous wrote :
| Need: The way I do/work is, create an Entity with required mappings/associations. Forward engg with hibernate to create tables.
| And now expecting to generate only views with exisitng Entities/Components.
| Problem: If I use the 'seam-gen' the mappings/associations are modified to defaults.
| Benefits: No need to bother about database related data-types, fiddle with relationships. All need to take is how my Entity should be
| and required views for it.
| If there is a alternate way to do this using exisitng option, please guide. Thank you for your patience.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256810#4256810
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256810
16 years, 7 months
[EJB 3.0 Users] - synchronized @Service
by sfs
I want to build a caching singleton service with the jboss @Service annotation. In this singleton service the methods have to be synchronized. In my tests I saw, that the singleton instance of my service allows multiple active simultaneous threads (see bellow: Not synchronized output). When I mark the service methods with "synchronized", the service acts in the way I need it (see bellow: synchronized output).
Her my questions:
1. Is it allowed to use the synchronized keyword (EJB spec) in my @Service singleton methods?
2. Are there any special jboss annotations for @Service singeltons, which I can use to mark service methods "SYNCHRONIZED"?
thanks a lot,
Florian
public interface JBossServiceTest
| {
| public void test();
| }
@Remote(JBossServiceTest.class)
| @Service
| public class JBossServiceTestBean implements JBossServiceTest
| {
| private static final Logger logger = Logger.getLogger(JBossServiceTestBean.class);
|
| private static int callCounter = 1;
|
| public JBossServiceTestBean()
| {
|
| }
|
| public void test()
| {
| int callId = callCounter++;
|
| logger.info("start test call " + callId);
|
| try
| {
| Thread.sleep(3000);
| }
| catch (Exception e)
| {
| logger.fatal("error :(", e);
| }
|
| logger.info("end test call " + callId);
|
| }
| }
Not synchronized output:
10:01:19,751 INFO [JBossServiceTestBean] start test call 1
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 8
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 9
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 6
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 7
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 3
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 2
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 5
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 1
| 10:01:19,751 INFO [JBossServiceTestBean] start test call 4
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 1
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 9
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 7
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 4
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 1
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 5
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 2
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 3
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 6
| 10:01:22,752 INFO [JBossServiceTestBean] end test call 8
@Remote(JBossServiceTest.class)
| @Service
| public class JBossServiceTestBean implements JBossServiceTest
| {
| private static final Logger logger = Logger.getLogger(JBossServiceTestBean.class);
|
| private static int callCounter = 1;
|
| public JBossServiceTestBean()
| {
|
| }
|
| public synchronized void test()
| {
| int callId = callCounter++;
|
| logger.info("start test call " + callId);
|
| try
| {
| Thread.sleep(3000);
| }
| catch (Exception e)
| {
| logger.fatal("error :(", e);
| }
|
| logger.info("end test call " + callId);
|
| }
| }
synchronized output:
10:03:29,539 INFO [JBossServiceTestBean] start test call 1
| 10:03:32,539 INFO [JBossServiceTestBean] end test call 1
| 10:03:32,539 INFO [JBossServiceTestBean] start test call 2
| 10:03:35,540 INFO [JBossServiceTestBean] end test call 2
| 10:03:35,540 INFO [JBossServiceTestBean] start test call 3
| 10:03:38,540 INFO [JBossServiceTestBean] end test call 3
| 10:03:38,540 INFO [JBossServiceTestBean] start test call 4
| 10:03:41,540 INFO [JBossServiceTestBean] end test call 4
| 10:03:41,540 INFO [JBossServiceTestBean] start test call 5
| 10:03:44,540 INFO [JBossServiceTestBean] end test call 5
| 10:03:44,540 INFO [JBossServiceTestBean] start test call 6
| 10:03:47,540 INFO [JBossServiceTestBean] end test call 6
| 10:03:47,540 INFO [JBossServiceTestBean] start test call 7
| 10:03:50,540 INFO [JBossServiceTestBean] end test call 7
| 10:03:50,540 INFO [JBossServiceTestBean] start test call 8
| 10:03:53,541 INFO [JBossServiceTestBean] end test call 8
| 10:03:53,541 INFO [JBossServiceTestBean] start test call 9
| 10:03:56,541 INFO [JBossServiceTestBean] end test call 9
| 10:03:56,541 INFO [JBossServiceTestBean] start test call 10
| 10:03:59,541 INFO [JBossServiceTestBean] end test call 10
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256804#4256804
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256804
16 years, 7 months