[Remoting] - Re: Connection between servers through JNDI?
by Clarich
Hi,
I wonder why this jira issue (http://jira.jboss.com/jira/browse/JBREM-534) has been closed. Is it fixed already? I am using Remoting Versions 2.0.0 CR1 and 2.0.0 GA. And I have exactly the problem, that when killing a server and restarting it afterwards with another protocol (I tried socket, multiplex, sslsocket and sslmultiplex) it fails to receive an incoming connection (I guess it's a heartbeat from the JNDI trying to reach the old protocol) and after a while shuts down itself.
The method which I use to connect my Server with the JNDI looks as follows:
| private JNDIDetector detector;
|
| public void setupConnection(int port, String host) throws Exception {
|
| MBeanServer server = MBeanServerFactory.createMBeanServer();
|
| detector = new JNDIDetector();
| detector.setPort(port);
| detector.setHost(host);
| ObjectName name = new ObjectName("remoting:type=JNDIDetector");
|
| server.registerMBean(detector, name);
| detector.start();
| }
|
Anyway, I found a workaround, that runs for my Application. But this requires to set the Clean Detection Number to zero:
| private JNDIDetector detector;
|
| public void setupConnection(int port, String host) throws Exception {
| MBeanServer server = MBeanServerFactory.createMBeanServer();
|
| detector = new JNDIDetector();
| detector.setPort(port);
| detector.setHost(host);
| detector.setCleanDetectionNumber(0);
| ObjectName name = new ObjectName("remoting:type=JNDIDetector");
| detector.preRegister(server, name);
|
| detector.start();
| server.registerMBean(detector, name);
| detector.forceDetection();
| }
I guess this is not the way a JNDI connection should be build up?! And if this is a Bug, shall I open a new jira issue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023519#4023519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023519
19Â years, 1Â month
[JBoss Seam] - Declaring session beans in ejb-jar.xml
by persabi
In the case where there exists an abstract base class with member level annotations and an inheriting subclass SFSB, a basic Seam app works fine where the @Stateful annotation exists in the inheriting subclass. In this case, the jboss logs show:
| Component: register, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.test.hotelbooking.RegisterActionBean, JNDI: booking-seam-1.0-SNAPSHOT/RegisterActionBean/local
|
However, say instead of specifying the @Stateful annotation on the SFSB subclass, I define the session bean in the ejb-jar.xml like so:
| <session>
| <description>Register Action Bean</description>
| <ejb-name>RegisterActionBean</ejb-name>
| <local>org.test.hotelbooking.RegisterActionLocal</local>
| <ejb-class>org.test.hotelbooking.RegisterActionBean</ejb-class>
| <session-type>Stateful</session-type>
| <transaction-type>Container</transaction-type>
| </session>
|
the bean is not registered as a SFSB Seam component, rather a javabean Seam component.
| Component: register, scope: EVENT, type: JAVA_BEAN, class: org.test.hotelbooking.RegisterActionBean, JNDI: booking-seam-1.0-SNAPSHOT/RegisterActionBean/local
|
Bear in mind, instead of specifying the @Name and @Scope annotations on the bean (subclass), we define them in components.xml like so:
| <component
| name="register"
| class="org.test.hotelbooking.RegisterActionBean"
| scope="event"
| jndi-name="booking-seam-1.0-SNAPSHOT/RegisterActionBean/local"/>
|
Any ideas how we can define these beans as SFSB rather than javabeans and avoid using the @Stateful in the bean subclass?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023512#4023512
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023512
19Â years, 1Â month
[JBossCache] - Re: Problems while using JBoss Cache Replication in Cluster
by nirajal
The Stack Trace for the problem is pasted below: I am using Jboss cache version 1.4.1.GA.
12:56:19,980 INFO [TxInterceptor] There was a problem handling this request
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.cache.TreeCache.callRemoteMethodsViaReflection(TreeCache.ja
va:4352)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4307)
at org.jboss.cache.loader.ClusteredCacheLoader.callRemote(ClusteredCache
Loader.java:75)
at org.jboss.cache.loader.ClusteredCacheLoader.put(ClusteredCacheLoader.
java:143)
at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreI
nterceptor.java:216)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterc
eptor.java:364)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:
160)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInt
erceptor.java:157)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
at org.jboss.cache.TreeCache.put(TreeCache.java:3782)
at org.jboss.cache.aop.PojoCache.lockPojo(PojoCache.java:631)
at org.jboss.cache.aop.PojoCache.removeObject(PojoCache.java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy100.removeObject(Unknown Source)
at com.ingrid.ibp.isi.server.hppconfig.HppStatusManager.UpdateDssReport(
HppStatusManager.java:388)
at com.ingrid.ibp.isi.server.hppconfig.HPPManager.dssReport(HPPManager.j
ava:1227)
at com.ingrid.ibp.isi.server.adapter.HCSInboundAdapterMDB.processMessage
(HCSInboundAdapterMDB.java:217)
at com.ingrid.ibp.isi.server.adapter.HCSInboundAdapterMDB.onMessage(HCSI
nboundAdapterMDB.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
ageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
DrivenInstanceInterceptor.java:116)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
81)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
terceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
ryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
ainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvo
ker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onM
essage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:26
6)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMess
ageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:17
0)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: failure to marshal argument(s)
at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java
:188)
... 59 more
Caused by: java.lang.IllegalArgumentException: Marshaller.extractFqn(): Unknown
method call id: -1
at org.jboss.cache.marshall.Marshaller.extractFqn(Marshaller.java:147)
at org.jboss.cache.marshall.TreeCacheMarshaller140.extractFqnAsString(Tr
eeCacheMarshaller140.java:185)
at org.jboss.cache.marshall.TreeCacheMarshaller140.objectToStream(TreeCa
cheMarshaller140.java:79)
at org.jboss.cache.marshall.VersionAwareMarshaller.objectToByteBuffer(Ve
rsionAwareMarshaller.java:133)
at org.jgroups.blocks.RpcDispatcher.callRemoteMethods(RpcDispatcher.java
:181)
... 59 more
12:56:20,058 WARN [TreeCache] removeObject(): exception occurred: java.lang.Run
timeException: java.lang.reflect.InvocationTargetException
12:56:20,058 INFO [TreeCache] PojoCache.endTransaction(): rolling back tx for f
qn: /ingrid/hppstatus/13
12:56:20,089 INFO [isi_log] Could not remove DssReportData:java.lang.RuntimeExc
eption: PojoCache.removeObject(): fqn: /ingrid/hppstatus/13
12:56:20,121 INFO [TxInterceptor] There was a problem handling this request
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.cache.TreeCache.callRemoteMethodsViaReflection(TreeCache.ja
va:4352)
at org.jboss.cache.TreeCache.callRemoteMethods(TreeCache.java:4307)
at org.jboss.cache.loader.ClusteredCacheLoader.callRemote(ClusteredCache
Loader.java:75)
at org.jboss.cache.loader.ClusteredCacheLoader.put(ClusteredCacheLoader.
java:143)
at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreI
nterceptor.java:216)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterc
eptor.java:364)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:
160)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInt
erceptor.java:157)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5710)
at org.jboss.cache.TreeCache.put(TreeCache.java:3782)
at org.jboss.cache.aop.PojoCache.lockPojo(PojoCache.java:631)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy100.putObject(Unknown Source)
at com.ingrid.ibp.isi.server.hppconfig.HppStatusManager.UpdateDssReport(
HppStatusManager.java:394)
at com.ingrid.ibp.isi.server.hppconfig.HPPManager.dssReport(HPPManager.j
ava:1227)
at
Any help in this regard would be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023509#4023509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023509
19Â years, 1Â month