[JCA/JBoss] - Re: Tests for db connection
by kejoseph
Thats for the reply Peter. My requirement is simple - I want the db connection to be tested by JBoss prior to handing it over to the application. This is easily achieved by the former check-valid-connection-sql statement.
However, in certain cases (say Oracle package changed and JBoss start's receiving ORA-04062) we need to stop and start JBoss even with the above statement. I am wondering whether replacing it with valid-connection-checker-class-name will help resolve this issue and save us from a restart everytime something on Oracle side changes.
Of course, I will try this out ; but wanted to understand the inner workings before blindly changing it. The documentation is not very detailed in this regard.
Kevin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200845#4200845
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200845
17 years, 3 months
[Management, JMX/JBoss] - Re: method overloading issue in 4.2.2 ? Wrong target message
by jbosseron
Stack trace from JMX console:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Failed to invoke operation
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:269)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.management.MBeanException
org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:219)
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.ejb.EJBException: java.lang.IllegalArgumentException: Wrong target. class test.TestMBean for public java.lang.String test.TestMBean.aMethod()
org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:329)
org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:294)
org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.IllegalArgumentException: Wrong target. class test.TestMBean for public java.lang.String test.TestMBean.aMethod()
org.jboss.aop.joinpoint.MethodInvocation.handleErrors(MethodInvocation.java:141)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:116)
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:329)
org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:294)
org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:215)
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200839#4200839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200839
17 years, 3 months
[Management, JMX/JBoss] - method overloading issue in 4.2.2 ? Wrong target message. Wh
by jbosseron
I am trying to create a MBean and test in the JMX console.
It deploys fine and shows up in the JMX console,
but as soon as I call the method with no argument and later tries to call the method with an argument it fails with a "wrong target" error message.
Is it a known issue or am I doing something wrong here?
It works fine if I rename one of the methods so there is no overloading...
I'm using 4.2.2.GA and JDK1.5.0_14
Here is test code that will break once jared up and deployed(2 files):
//Test.java
package test;
public interface Test {
public String aMethod(String aString);
public String aMethod();
}
//TestMBean.java
package test;
import org.jboss.annotation.ejb.Management;
import org.jboss.annotation.ejb.Service;
@Service(objectName="A:service=test")
@Management(Test.class)
public class TestMBean implements Test{
public String aMethod(String string) {
return "Test with arg " +string;
}
public String aMethod() {
return "Test with no arg";
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200838#4200838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200838
17 years, 3 months