[Beginners Corner] - TO Delete the entire records in a table
by mallikarjun_nbsg
Hi,
My scenario is delete to entire records from a table, which is the best way to code in CMP bean, I am using EJB2.0 version. I declared my own method removeAllRecords() in the home interface and given a query in the ejb-jar.xml, but on executing the same I am getting deployment error as below:
Bean : RCVlanMacTableHome
Method : public abstract void removeAll() throws EJBException, RemoveException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.
code in ejb-jar.xml:
| <query>
| <description></description>
| <query-method>
| <method-name>removeAllRecords</method-name>
| <method-params/>
| </query-method>
| <ejb-ql>Delete OBJECT(g) From rcVlanMacTable g</ejb-ql>
| </query>
|
Also I have written the same removeAllRecords() method in the bean class with no body in the method from seeing the above error, but when I ran again still getting the same above error.
Which is the best way to code so to delete all the records of the table.
Please respond asap.
Thank you,
Mallikarjun.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158303#4158303
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158303
17 years, 10 months
[EJB 3.0] - TO Delete the entire records in a table
by mallikarjun_nbsg
Hi,
My scenario is delete to entire records from a table, which is the best way to code in CMP bean, I am using EJB2.0 version. I declared my own method removeAllRecords() in the home interface and given a query in the ejb-jar.xml, but on executing the same I am getting deployment error as below:
Bean : RCVlanMacTableHome
Method : public abstract void removeAll() throws EJBException, RemoveException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.
code in ejb-jar.xml:
| <query>
| <description></description>
| <query-method>
| <method-name>removeAllRecords</method-name>
| <method-params/>
| </query-method>
| <ejb-ql>Delete OBJECT(g) From rcVlanMacTable g</ejb-ql>
| </query>
|
Also I have written the same removeAllRecords() method in the bean class with no body in the method from seeing the above error, but when I ran again still getting the same above error.
Which is the best way to code so to delete all the records of the table.
Please respond asap.
Thank you,
Mallikarjun.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158302#4158302
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158302
17 years, 10 months
[JBoss Messaging] - Re: How do I empty a JBoss queue?
by abendt
i tried to use the method removeAllMessages() in the jmx-console. unfortunately that gives me following exception:
is there any other way, besides directly accessing the db tables, to empty the queue?
| javax.management.RuntimeMBeanException
| org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
| org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
| org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 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.IllegalStateException: Cannot remove references while deliveries are in progress, there are 153
| org.jboss.messaging.core.impl.ChannelSupport.removeAllReferences(ChannelSupport.java:390)
| org.jboss.jms.server.destination.ManagedQueue.removeAllMessages(ManagedQueue.java:129)
| org.jboss.jms.server.destination.QueueService.removeAllMessages(QueueService.java:290)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 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=4158300#4158300
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158300
17 years, 10 months
[EJB/JBoss] - TO Delete the entire records in a table
by mallikarjun_nbsg
Hi,
My scenario is delete to entire records from a table, which is the best way to code in CMP bean, I am using EJB2.0 version. I declared my own method removeAllRecords() in the home interface and given a query in the ejb-jar.xml, but on executing the same I am getting deployment error as below:
Bean : RCVlanMacTableHome
Method : public abstract void removeAll() throws EJBException, RemoveException
Section: 12.2.11
Warning: Each local home method must match a method defined in the entity bean class.
code in ejb-jar.xml:
| <query>
| <description></description>
| <query-method>
| <method-name>removeAllRecords</method-name>
| <method-params/>
| </query-method>
| <ejb-ql>Delete OBJECT(g) From rcVlanMacTable g</ejb-ql>
| </query>
|
Also I have written the same removeAllRecords() method in the bean class with no body in the method from seeing the above error, but when I ran again still getting the same above error.
Which is the best way to code so to delete all the records of the table.
Please respond asap.
Thank you,
Mallikarjun.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158299#4158299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158299
17 years, 10 months