[JBoss Remoting Users] - Re: is JBoss remoting good choice for me ?
by ron.sigal@jboss.com
I think you're on the right track.
maestr() wrote :
| Assuming that I have a JB Remoting endpoint configured on a specific port, can many clients get connection to the endpoint in a same time?
|
That's a matter of configuration, and how you do the configuration depends on the transport you're using. In the socket transport, which is the most commonly used transport, the parameter "maxPoolSize" determines the maximum number of worker threads, where each worker thread services one invocation at a time. The default value is "300", so that you could have up to 300 clients connected simultaneously.
"maestr() wrote :
| Is it thread safe ?
|
The Remoting code is thread safe. It's up to you to make your ServerInvocationHandler thread safe.
"maestr()" wrote :
| How should I implement ServerInvocationHandler to invoke specified in a request method on the server side ?
| So far I do it like this:
|
That looks reasonable. Note that, in addition to the parameter, you can pass an entire map of objects by calling
| public Object invoke(Object param, Map metadata) throws Throwable;
|
in org.jboss.remoting.Client. In the ServerInvocationHandler the map can be retrieved with org.jboss.remoting.InvocationRequest.getRequestPayload().
Good luck.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254284#4254284
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254284
15 years, 4 months
[EJB 3.0 Users] - Session EJB and MDB Configuration
by kyle.bober
JBoss 5.1.0.GA
I am attempting to configure my Stateless MDB via the instrcutions provided at the following link : http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/...
Here is my mydoamin-aop.xml :
| <?xml version="1.0" encoding="UTF-8"?>
| <aop xmlns="urn:jboss:aop-beans:1.0">
| <domain name="Strictly Pooled Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
| <annotation expr="!class((a)org.jboss.ejb3.annotation.Pool)">
| @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=2, timeout=10000)
| </annotation>
| </domain>
| </aop>
|
Here is my jboss.xml :
| <?xml version="1.0" encoding="utf-8"?>
| <jboss xmlns:xs="http://www.jboss.org/j2ee/schema"
| xs:schemaLocation="http://www.jboss.org/j2ee/schema jboss_5_1.xsd"
| version="5.1">
|
| <enterprise-beans>
| <message-driven>
| <ejb-name>KATReportTopicListener</ejb-name>
| <destination-jndi-name>topic/KATReportTopic</destination-jndi-name>
| <aop-domain-name>Strictly Pooled Message Driven Bean</aop-domain-name>
| </message-driven>
| </enterprise-beans>
| </jboss>
|
|
Both of these are included in my ejbname-ejb.jar file in the META-INF folder. My EJB Jar file is included in my EAR file which I can deploy to JBoss. When I start up the application server I receive the following exception:
16:43:20,765 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/ApplicationServers/jboss-5.1.0.GA/server/default/deploy/svc-kat0.0.1--SNAPSHOT.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying service-kat-ejb-0.0.1-SNAPSHOT.jar: No container configured with name 'Strictly Pooled Message Driven Bean''
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: No container configured with name 'Strictly Pooled Message Driven Bean''
at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:333)
at org.jboss.ejb3.Ejb3DescriptorHandler.getMDB(Ejb3DescriptorHandler.java:602)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:215)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:718)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:669)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:651)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:614)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:491)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
... 34 more
16:43:20,812 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/ApplicationServers/jboss-5.1.0.GA/server/default/deploy/svc-kat0.0.1--SNAPSHOT.ear/" is in error due to the following reason(s): java.lang.RuntimeException: No container configured with name 'Strictly Pooled Message Driven Bean''
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254279#4254279
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254279
15 years, 4 months
[Installation, Configuration & Deployment] - Starting javax.ejb.timer causes java.lang.IllegalStateExcept
by lvonk2000
Hi,
We are migrating from jboss 4.2.3 ot jboss 5.1.0 jdk6. In 4.2.3 we had a @Service bean that started a timer in the start() method. In jboss 5.1.0 we get this exception when the start() method is called:
| 22:06:07,850 ERROR [ServiceContainer] Encountered an error in start of ResourceMonitorServiceBean
| java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
| at org.jboss.ejb3.service.ServiceContainer.invokeOptionalMethod(ServiceContainer.java:381)
| at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:264)
| at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
| at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
| at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
| at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
| at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
| at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
| at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
| at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
| at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
| at org.jboss.Main.boot(Main.java:221)
| at org.jboss.Main$1.run(Main.java:556)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.ejb3.service.ServiceContainer.invokeOptionalMethod(ServiceContainer.java:369)
| ... 62 more
| Caused by: java.lang.IllegalStateException: Cannot obtain inMethodFlag for: TimerService.getTimers
| at org.jboss.ejb.AllowedOperationsAssociation.assertAllowedIn(AllowedOperationsAssociation.java:145)
| at org.jboss.as.ejb3.timerservice.TimerServiceFacade.assertAllowedIn(TimerServiceFacade.java:59)
| at org.jboss.as.ejb3.timerservice.TimerServiceFacade.getTimers(TimerServiceFacade.java:98)
| at net.ripe.rs.services.impl.jboss.ResourceMonitorServiceBean.cancelScheduledTimers(ResourceMonitorServiceBean.java:245)
| at net.ripe.rs.services.impl.jboss.ResourceMonitorServiceBean.doIt(ResourceMonitorServiceBean.java:146)
| at net.ripe.rs.services.impl.jboss.ResourceMonitorServiceBean.start(ResourceMonitorServiceBean.java:139)
| ... 67 more
|
|
Is this intentional in jboss 5.1.0? I know it is against the spec for EJB's constuction methods, but I thought for the @Service is allowed (or at least not against the spec)?
Are there any other ways to use the ResourceMonitorServiceBean to start the timers? Or do I need to create a WAR file that calls a method on the ResourceMonitorServiceBean to start the timers?
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254275#4254275
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254275
15 years, 4 months