[Clustering] - Tibco Ems Cluster - JBoss MQ
by tzman
JBoss - 4.2.3.GA
We are trying to deploy an application that was previously not clustered into a clustered environment. The application has heavy usage of tibco ems with both consumers and producers. When initially configuring the system, we used the wiki document on integrating JBoss with TibcoEms.
The problem now seems to be in enabling the singleton jms for the consumers. I am not entirely sure which portion of the configuration would need to go into deploy-hasingleton/jms versus deploy/jms. The setup for clustered jms suggests that all of the configuration go into deploy-hasingleton/jms which causes only the first node started to be able to find the queues. Adding the configuration to deploy/jms allows everything to start appropriately, however we then have multiple consumers trying to connect to tibco ems, which is not expected.
The clustering documentation states that we should configure a shared persistence provider for the queues. Is this used to enable JBoss to determine which of the consumers ( node ) is active? We did not configure the persistence for jms as tibco is handling this functionality.
I am not quite sure what additional information to provide. Is this supported? Should the configuration be split between the deploy-hasingleton/jms and deploy/jms? A pointer to which configurations I need to modify/provide would be greatly appreciated and my apologies if this does not make perfect sense.
Thanks in advance.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255396#4255396
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255396
15 years, 4 months
[Installation, Configuration & Deployment] - JavaMail recipient override?
by sweetlandj
What I'm trying to do is implement a "recipient override" in the server mail configuration to protect against sending E-mails to customers when testing E-mail behavior in non-production environments. I can do this easily with a custom session bean, but unfortunately Seam insists on using either java:/Mail or its own internal MailSession wrapper. I would like to guarantee (as much as possible) that any E-mail sent from the system, however it is sent, is subject to this override.
One solution is to handle it at the OS level, i.e. configure mail-service.xml to point to localhost and configure the local mail server to forward everything to a specific set of addresses. However, that does not prevent a developer from checking out code and executing it locally, and if they happen to have a local mail relay running then we are in trouble. So out of the box I'd like the app server to be configured to redirect E-mails by default, and to explicitly disable this feature in production environments.
I've looked at the MailService MBean source code and it looks like I can override this class to accept a class name for some Session implementation, load that class from the configuration, and then pass the custom class to the Reference constructor. If I created a Session decorator class that delegated all of the calls to the normal Session implementation except for getTransport; and then created a Transport decorator that delegates all of its calls to the normal Transport except for send() and sendMessages(), then I could intercept the message as it is sent and change the addresses before calling the same method on the delegate.
Does this sound like a viable approach? Are there any easier/better ways to go about this? Has anyone implement a similar override system another way?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255395#4255395
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255395
15 years, 4 months
[EJB 3.0 Users] - ERROR [GeneralPurposeDatabasePersistencePlugin] Cannot deser
by kyle.bober
JBoss 5.1.0.GA
I have an EJBTimer stateless session bean. I kick of the timer via a JMX bean and all works fine. It is when I restart the JBoss server that I am running into an issue.
I noticed that when I startup JBoss I receive the following error:
| 07:38:22,445 ERROR [GeneralPurposeDatabasePersistencePlugin] Cannot deserialize
| java.lang.ClassNotFoundException: com.thesearchagency.service.kat.model.KATReportDeleteTimer
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
| at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:247)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java
| :292)
| at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java
| :1119)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:7
| 98)
| at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:247)
| at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
| at org.jboss.invocation.MarshalledValueInputStream.resolveClass(MarshalledValueInputStream.j
| ava:109)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
| at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.deserialize(GeneralPurposeD
| atabasePersistencePlugin.java:434)
| at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.selectTimers(GeneralPurpose
| DatabasePersistencePlugin.java:275)
| at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolic
| y.java:165)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy316.listTimerHandles(Unknown Source)
| at org.jboss.ejb.txtimer.EJBTimerServiceImpl.restoreTimers(EJBTimerServiceImpl.java:458)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy329.restoreTimers(Unknown Source)
| at org.jboss.as.ejb3.timerservice.JBossTimerServiceFactory.restoreTimerService(JBossTimerSer
| viceFactory.java:118)
| at org.jboss.ejb3.stateless.StatelessContainer.lockedStart(StatelessContainer.java:196)
| 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(ReflectMethodInfoImp
| l.java:150)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrappe
| r.execute(KernelControllerContextAction.java:241)
| at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrappe
| r(KernelControllerContextAction.java:109)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(Kerne
| lControllerContextAction.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(Sim
| pleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControlle
| rContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerC
| ontextActions.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:93
| 4)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1
| 082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:9
| 84)
| 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(Abstra
| ctSimpleRealDeployer.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.ja
| va:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.ja
| va:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.ja
| va: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:93
| 4)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1
| 082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:9
| 84)
| 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(MainDeploye
| rAdapter.java:117)
| at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDepl
| oyAction.java:70)
| at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractP
| rofileAction.java:53)
| at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(Abstract
| ProfileService.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:93
| 4)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1
| 082)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:9
| 84)
| 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(ProfileServiceBootst
| rap.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)
|
When the EJBTimer @Timeout method is called I receive the following error:
| 11:53:41,390 DEBUG [KATReportDeleteTimerService] DeleteKATReportsTimerService Timeout ::
| null
| 11:53:41,468 ERROR [TimerImpl] Error invoking ejbTimeout
| java.lang.NullPointerException
| at com.thesearchagency.service.kat.impl.KATReportDeleteTimerService.deleteExpiredKATReports(KATRepo
| rtDeleteTimerService.java:92)
| 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:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
| at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
| at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
| 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:585)
| at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterce
| ptor.java:72)
| at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_4
| 373267.invoke(InvocationContextInterceptor_z_fillMethod_4373267.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.
| java:88)
| at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_437326
| 7.invoke(InvocationContextInterceptor_z_setup_4373267.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.
| java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityMa
| nagerInterceptor.java:56)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.StatelessBMTInterceptor.handleInvocation(StatelessBMTInterceptor.java:106)
| at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:6
| 8)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.j
| ava:80)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:6
| 7)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterce
| ptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:249)
| at org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.jav
| a:44)
| at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
| at java.util.TimerThread.mainLoop(Timer.java:512)
| at java.util.TimerThread.run(Timer.java:462)
|
FYI: The 'com.thesearchagency.service.kat.model.KATReportDeleteTimer' class is definetly include in the ejb jar file. So it seems this maybe a class loader issue. In my ear file I have included the following jboss-app.xml file in the META-INF directory :
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-app>
| <loader-repository>com.services:archive=Service-Loader-Repository
| <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
| </jboss-app>
|
Any help here would be much appreciated!
Thanks,
Kyle
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255382#4255382
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255382
15 years, 4 months