[JBoss Messaging] - Re: JMS Server Locks Up
by timfox
No need for another stack trace - I can see what is happening - it's all in the original trace
The consumer close tries to flush any deliveries in progress to the network, and it tries to wait for that to return, but it doesn't because the previous task in the queued executor is locked on the simpleconnectionmanager:
| "Thread-168" prio=10 tid=0x00e10ab8 nid=0x2770 waiting for monitor entry [0x9aeff000..0x9aeffaf0]
| at org.jboss.jms.server.connectionmanager.SimpleConnectionManager.handleClientFailure(SimpleConnectionManager.java:131)
| - waiting to lock <0xb8710e68> (a org.jboss.jms.server.connectionmanager.SimpleConnectionManager)
| at org.jboss.jms.server.endpoint.ServerConsumerEndpoint$Deliverer.run(ServerConsumerEndpoint.java:814)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
|
So it all seizes up.
This should be a simple fix.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016628#4016628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016628
19Â years, 2Â months
[EJB 3.0] - Using a JoinTable, getting unique constraint violtions
by SmokingAPipe
Let's say I'm making an accounting system. I have Invoices, and on Invoices I have Products. Every invoice can have a set of one or more products, and there could be duplicates. Every product could show up on any number of invoices. The relationship is uni-directional. The Product doesn't need to have a collection of Invoices that contain it.
How do I map this?
It seems like what I need is a JoinTable specification, but when I create it, I get a table with a unique constraint on invoice_id. That should not be the case; I should be able to use that invoice_id multiple times to be able to specify a set of products.
What I need is a join table that would look like this:
| invoice_id product_id
| 33 58
| 33 37
| 33 962
|
but it's failing on the uniqueness constraint of invoice_id. Any ideas on how to specify this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016620#4016620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016620
19Â years, 2Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Re: Using JBoss's JDBC Managed Connection Pools
by wls
Ok, so here's what I'm learning so far -- and perhaps my question was nonsensical.
In JDBC you get a connection, to which you can have database transactions.
When you start talking about Transactions in terms of JBoss, these are NOT database transactions, but unit of work transactions.
If your bean happens to represent some piece of business logic, then it's easy to see how invoking a method on that bean starts a transaction, and when the method exits, the transaction is done. Complexity arises when beans start using other beans, because you have to decide if it's part of the same transaction, a separate transaction, and if the transactions have any dependency on one another.
JBoss can persist your bean using Container Managed Persistence (CMP), or your bean can persist itself using Bean Managed Persistence (BMP). In each case, it uses a database connection pool ...and so far things make sense.
My problem is that my bean is stateless with no data to persist. It merely enters a very long look when told to do so. My thought was that I, as a bean writer, had the exact same access to the database connection pool and could use it to serve my whims, wholly independent of object persistence.
Two things are complicating that. One, I can't seem to get the JBoss connection pool to let me have a connection which allows me to do commits. Two, all of my processing seems to be happening in the context of some magic all-encompassing wrapper transaction, so even when I do twiddle with the database, using the connection pool, it won't commit until the invoking method exits. And for what I want to do, that isn't helpful at all.
Is there a way, perhaps with some annotation or something, to indicate that no transaction is desired? And is there a way to grab a raw connection from the connection pool?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016619#4016619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016619
19Â years, 2Â months
[JBoss Seam] - Seam, Trinidad, Ajax4Jsf and Facelets
by lowecg2004
I can't for the life of me get these libraries to play together. There are no exceptions - just the Ajax4Jsf components do not render. Without Trinidad, I have been able use the Ajax4Jsf poller just fine.
I've added a simple poller to my page as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns=" http://www.w3.org/1999/xhtml"
| ...
| xmlns:tr="http://myfaces.apache.org/trinidad"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
|
| <ui:composition template="../public/common.xhtml">
| <ui:define name="body">
|
| <form jsfc="tr:form">
| <a4j:poll interval="1000" action="#{paymentBean.pollPaymentStatus }" />
| </form>
|
| ...
| </ui:define>
| </ui:composition>
| </html>
At render time, the poller is ignored and nothing is added to my page, hence no polling. I get output like this repeated about 12 times despite there only being one instance of the poller:
14:04:26,453 ERROR [STDERR] 29-Jan-2007 14:04:26 org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase getRenderer
| WARNING: Renderer 'javax.faces.ViewRoot' not found for component family 'javax.faces.ViewRoot'
| 14:04:26,453 INFO [[/ripuk]] No Renderer found for component {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /view/secure/payment-processing.xhtml]} (component-family=javax.faces.ViewRoot, renderer-type= javax.faces.ViewRoot)
| 14:04:26,453 WARN [UIComponentBase] No Renderer found for component {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /view/secure/payment-processing.xhtml]} (component-family=javax.faces.ViewRoot, renderer-type=javax.faces.ViewRoot)
Is there anything special that I need to do in order to make these libraries play together?
I have seen the wiki http://wiki.apache.org/myfaces/TrinidadSeamAjax4Jsf
and the forum posting http://jboss.com/index.html?module=bb&op=viewtopic&p=3994880
I tried their recommendations but no luck.
My web.xml and faces-config.xml are below.
Any help will be greatly appreciated - I'm starting to lose hair over this.
Best Regards,
Chris.
web.xml
|
| <?xml version="1.0"?>
| <web-app version="2.4"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
|
| <!-- MyFaces ******************************************************************************** -->
|
| <context-param>
| <param-name>javax.faces.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/navigation.xml, /WEB-INF/managed-beans.xml,/WEB-INF/con-val.xml</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
|
| <!-- Trinidad ******************************************************************************* -->
|
| <context-param>
| <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
| <param-value>com.sun.facelets.FaceletViewHandler</param-value>
| </context-param>
|
|
| <!-- Facelets ******************************************************************************* -->
|
| <context-param>
| <param-name>facelets.LIBRARIES</param-name>
| <param-value>/WEB-INF/facelets/ripuk.taglib.xml</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.SKIP_COMMENTS</param-name>
| <param-value>false</param-value>
| </context-param>
|
|
| <!-- Filters ******************************************************************************** -->
|
| <!-- ajax4jsf filter - must be before any other filter -->
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class> org.ajax4jsf.Filter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| </filter-mapping>
|
|
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter </filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
|
| <filter>
| <filter-name>Seam Redirect Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Redirect Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
|
| <filter>
| <filter-name>trinidad</filter-name>
| <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter </filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>trinidad</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| </filter-mapping>
|
|
| <!-- Listeners ****************************************************************************** -->
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
| </listener>
|
|
| <!-- Servlets ******************************************************************************* -->
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
|
| <servlet>
| <servlet-name>resources</servlet-name>
| <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet </servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>resources</servlet-name>
| <url-pattern>/adf/*</url-pattern>
| </servlet-mapping>
|
|
| <!-- Misc *********************************************************************************** -->
|
| <login-config>
| <auth-method>BASIC</auth-method>
| </login-config>
|
| <error-page>
| <error-code>404</error-code>
| <location>/view/public/home.seam</location>
| </error-page>
|
| <session-config>
| <session-timeout>30</session-timeout>
| </session-config>
| </web-app>
|
|
|
| faces-config.xml
|
| <faces-config>
|
| <application>
| <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
| </application>
|
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
| </lifecycle>
|
| <application>
| <message-bundle>messages</message-bundle>
| <locale-config>
| <default-locale>en</default-locale>
| <supported-locale>en</supported-locale>
| </locale-config>
| </application>
|
| </faces-config>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016616#4016616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016616
19Â years, 2Â months