[Messaging, JMS & JBossMQ] - Weird behavior with ping timeouts
by smithmb
Hello all,
I was wondering if anyone has seen the following behavior before, and if anyone knows a solution for it. We appear to have messages that aren't being delivered. The following is a snip of our logs:
| 2006-09-15 11:27:59,543 WARN [org.jboss.mq.Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
| org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
| at org.jboss.mq.Connection$PingTask.run(Connection.java:1277)
| at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.io.IOException: ping timeout.
| ... 3 more
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.SocketManager] Read msgType: m_ping, msgID: 64
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.SocketManager] Read new msg: org.jboss.mq.il.uil2.msgs.PingMsg1890854[msgType: m_ping, msgID: 64, error: null]
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 21
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : ping
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : 1158334085647
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.SocketManager] Begin internalSendMessage, one-way msg=org.jboss.mq.il.uil2.msgs.PingMsg9602832[msgType: m_pong, msgID: -2147466927, error: null]
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.SocketManager] Write msg: org.jboss.mq.il.uil2.msgs.PingMsg9602832[msgType: m_pong, msgID: -2147466927, error: null]
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.SocketManager] End internalSendMessage, msg=org.jboss.mq.il.uil2.msgs.PingMsg9602832[msgType: m_pong, msgID: -2147466927, error: null]
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : ping
| 2006-09-15 11:28:06,308 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] End handleMsg, msgType: 21
| 2006-09-15 11:28:11,121 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 21
| 2006-09-15 11:28:11,121 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : ping
| 2006-09-15 11:28:11,121 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : 1158334092214
| 2006-09-15 11:28:11,121 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : ping
| 2006-09-15 11:28:11,121 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] End handleMsg, msgType: 21
| ... traced ping message repeats ...
| 2006-09-15 11:28:46,120 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 21
| 2006-09-15 11:28:46,120 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : ping
| 2006-09-15 11:28:46,120 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : 1158334126064
| 2006-09-15 11:28:46,120 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : ping
| 2006-09-15 11:28:46,120 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] End handleMsg, msgType: 21
| 2006-09-15 11:28:59,557 WARN [org.jboss.mq.Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
| org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
| at org.jboss.mq.Connection$PingTask.run(Connection.java:1277)
| at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.io.IOException: ping timeout.
| ... 3 more
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.SocketManager] Read msgType: m_ping, msgID: 65
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.SocketManager] Read new msg: org.jboss.mq.il.uil2.msgs.PingMsg18189100[msgType: m_ping, msgID: 65, error: null]
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 21
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : ping
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : 1158334145653
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.SocketManager] Begin internalSendMessage, one-way msg=org.jboss.mq.il.uil2.msgs.PingMsg8764440[msgType: m_pong, msgID: -2147466921, error: null]
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.SocketManager] Write msg: org.jboss.mq.il.uil2.msgs.PingMsg8764440[msgType: m_pong, msgID: -2147466921, error: null]
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.SocketManager] End internalSendMessage, msg=org.jboss.mq.il.uil2.msgs.PingMsg8764440[msgType: m_pong, msgID: -2147466921, error: null]
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : ping
| 2006-09-15 11:29:06,323 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] End handleMsg, msgType: 21
| 2006-09-15 11:29:11,135 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Begin handleMsg, msgType: 21
| 2006-09-15 11:29:11,135 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : ping
| 2006-09-15 11:29:11,135 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : 1158334152238
| 2006-09-15 11:29:11,135 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : ping
| 2006-09-15 11:29:11,135 TRACE [org.jboss.mq.il.uil2.ServerSocketManagerHandler] End handleMsg, msgType: 21
| .. more ping messages...
|
We have 3 different database connections open, in addition to the JMS backend which is still the default Hypersonic one. It appears some of the logged pings are for those. I'm tracing with the following (from READTHISFIRST) but I'm not sure what other diagnostic information to aquire.
<category name="org.jboss.mq">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
My uil2-service.xml contains <!-- The ping period in millis -->
| <attribute name="PingPeriod">60000</attribute>, so I shouldn't really be having this big of a problem with ping timeouts. After all, the JMS backend is a local database on the same machine, with mostly the default JBoss installer-configured settings.
Can anyone suggest the problem or even other ways to analyze it? Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971956#3971956
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971956
19 years, 7 months
[JBoss Seam] - Re: Any experiences with the Tomahawk components?
by patrick.antivackis
In fact the taglib is already in the jar file.
So for me the installation was quite painless :
App server : JBOSS 4.0.4 GA JEMS
1) place tomahawk-1.1.3.jar, tomahawk-sandbox-xxx-SNAPSHOT.jar, commons-lang-2.1.jar and commons-fileupload-1.1.1.jar in your project resources\WEB-INF\lib directory
2) add
<filter>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
| <init-param>
| <param-name>maxFileSize</param-name>
| <param-value>20m</param-value>
| <description>Set the size limit for uploaded files.
| Format: 10 - 10 bytes
| 10k - 10 KB
| 10m - 10 MB
| 1g - 1 GB
| </description>
| </init-param>
| </filter>
|
| <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
| <servlet-name>Faces Servlet</servlet-name>
| </filter-mapping>
|
| <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
| </filter-mapping>
| <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <url-pattern>*.jsf</url-pattern>
| </filter-mapping>
in your project web.xml file.
3) Add
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
| <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
in all the jsp files using tomahawk or sandbox tags.
4) build & deploy. Don't forget to specify or override the resources\WEB-INF\lib directory in your build.xml such as
<zipfileset id="example.war.webinf.lib"
| prefix="WEB-INF/lib"
| dir="resources/WEB-INF/lib">
| <include name="*.jar"/>
| </zipfileset>
That's it, the tomahawk components work, the sandbox too, and you can also use the DOJO AJAX library with the adequate sandbox jsf tag. For example :
<h:panelGroup>
| <s:dojoInitializer require="dojo.widget.Editor"/>
| <h:form id="myForm">
| <h:inputTextarea id="editarea2" styleClass="dojo-Editor" value="hello world">
|
| </h:inputTextarea>
| <h:commandLink action="submitted" id="submitted" value="[Submit]"/>
|
| <%/* Alternate way to do it */%>
| <h:inputTextarea id="myInputTextarea" value="Customized Toolbars"/>
| <f:verbatim>
| <script type="text/javascript"><!--
| var editorArgs = {
| items: ["textGroup", "blockGroup", "justifyGroup", "colorGroup", "listGroup", "indentGroup", "linkGroup"]
| };
| var editor = dojo.widget.createWidget("Editor", editorArgs,
| dojo.byId("myForm:myInputTextarea"));
| //--></script>
| </f:verbatim>
| </h:form>
| </h:panelGroup>
Next step is to make communicate DOJO directly with SEAM framework.
I not yet to try the direct DOJO/remote Seam communication, but i will let you know the results.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971948#3971948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971948
19 years, 7 months
[EJB 3.0] - Entities not synchronizing
by galo.navarro
I have some problems synchronizing Entities between different parts of my application.
Basically, I have one thread waking up once in a while, it loads a few entity beans, performs actions, and goes back to sleep.
| @Service(objectName="jboss:custom=NOCManagerService")
| public class NOCManagerService implements Runnable, NOCManagementService {
|
| /*
| @Resource
| private SessionContext ctx;
| */
| @EJB(beanName="NOCAccessBean")
| private NOCAccess nocAccessBean;
|
| public void start() throws Exception {
| Thread thread = new Thread(this);
| thread.start();
| }
|
| public void run() {
| running=true;
| while(this.running) {
| loadNOCs();
| if(nocs!=null) {
| for(NOC noc:nocs) {
| this.nocPhaseProcessor.process(noc);
| }
| }
| try {
| synchronized (this) {
| nextRun=System.currentTimeMillis() + this.processingInterval;
| wait(this.processingInterval);
| }
| } catch (Exception e) {
| }
| }
| }
| [...]
| }
|
The following EJB is called for each of those entities and is the one that performs some updates
| @Stateless
| @TransactionAttribute (TransactionAttributeType.REQUIRES_NEW)
| public class NOCPhaseProcessorBean implements NOCPhaseProcessor {
|
| @PersistenceContext(unitName="NOCBeans")
| private EntityManager em;
|
| /**
| * Interceptors plug into this method and send the NOC to queues or do whatever
| * they have to do with them
| */
| @Interceptors({NOCCommonFilter.class, Phase2Filter.class})
| public void process(NOC noc) {
| System.out.println("Processing" + noc.toString());
| try {
| /* [do stuff] */
| em.merge(noc);
| } catch (Exception e) {
| NOCManagerService.getLog().error(e.getMessage());
| }
| }
| }
|
|
I'm using this bean to access my Entities, save them etc.
|
| @Stateful
| @TransactionAttribute (TransactionAttributeType.NOT_SUPPORTED)
| public class NOCAccessBean implements NOCAccess {
| @PersistenceContext(unitName="NOCBeans", type=PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| public List<NOC> listNoCs() {
| List<NOC> nocs = em.createNamedQuery("findAllNOCs").getResultList();
| for(NOC noc:nocs) {
| NOCManagerService.getLog().info("LOADED " + noc);
| }
| return nocs;
| }
|
| @TransactionAttribute (TransactionAttributeType.REQUIRED)
| public boolean saveNOC(NOC noc) {
| noc.setDtTmStp(new Date());
| em.merge(noc);
| em.flush();
| return true;
| }
| [...]
| }
|
OK, I have a web interface that uses that NOCAccessBean and allows me to edit those Entities (via saveNOC in the AccessBean). If change some of the properties, I can see the values are saved in my database, and my web interface is synchronized showing all the new values. Also, when the thread kicks in and performs some updates, the web pages also shows them.
BUT! if I do some updates on the Entities from the webpage, the next time service kicks in it still has the OLD versions of my entities.
I would expect that I don't even need to reload the list of entities, but even doing it the entities are NOT updated. I've tried running em.refresh() for each Entity in the ProcessorBean but still doesn't work.
May anybody illuminate me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971945#3971945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971945
19 years, 7 months