[JBoss Messaging] - Re: [BisocketServerInvoker] unrecognized listener ID: ...
by Smurfs
Hi Ron,
Thanks for your response. I have spent a bit of time investigating the circumstances that trigger the WARN message, and can advise that it only seems to be triggered after a call to the connection close() method.
If you run the following code snippet in a session bean you ought to be able to replicate what I have been experiencing.
| @Resource(mappedName="ConnectionFactory")
| private ConnectionFactory connectionFactory;
|
| @Resource(mappedName="queue/someQueue")
| private Destination someQueue;
|
| private void testMDB() {
| Connection connection = null;
| Session session = null;
| MessageProducer producer = null;
|
| try {
| log.info("\n**** MDB example 1 (with finally block) ****");
| connection = connectionFactory.createConnection();
| session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| producer = session.createProducer(someQueue);
| ObjectMessage message = session.createObjectMessage();
| message.setObject(new String("some serialized object 1"));
| producer.send(message);
| log.info("MDB example 1 dispatched");
|
| } catch (JMSException jmse) {
| log.error("MDB example 1 jms error: " + jmse.getMessage());
| jmse.printStackTrace();
|
| } finally {
| try {
| log.info("MDB example 1 - closing connection in finally block");
| if (connection != null)
| connection.close();
| } catch (JMSException jmsex) {}
| }
|
| try {
| log.info("\n**** MDB Example 2 (without finally block) ****");
| connection = connectionFactory.createConnection();
| session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| producer = session.createProducer(someQueue);
| ObjectMessage message = session.createObjectMessage();
| message.setObject(new String("some serialized object 2"));
| producer.send(message);
| log.info("MDB example 2 dispatched");
|
| } catch (JMSException jmse) {
| log.error("MDB example 2 jms error: " + jmse.getMessage());
| jmse.printStackTrace();
| }
| // No finally block and no WARN message, but connection not closed!
|
| }
|
I trust this clearly demonstrates the issue and clarifies what I previously tried to outline/explain.
Thanks, Andrew
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040990#4040990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040990
17 years, 9 months
[JBoss Seam] - Re: Is it a bug? EntityQuery refresh before update model
by gledson.rabelo
Hi Pete, Thanks for your reply.
I'm using 1.2.1.GA.
I'm using pagination with selectable rows. When I go to the next page, I want send to the back bean the rows selected in the current page.
But, the refresh of query is performed before of update the back bean and it's receive data of next page (because the EntityQuery refresh
already occurred).
I will go to illustrate with an example:
Current Page Rows:
Marked Value
false value1
true value2
true value3
false value4
When I submit and go to the next page the refresh is first performed returning values (value5, value6, value7, value8) and after the model is updated with the values below and the next page is shown:
Marked Value
false value1
true value2
true value3
false value4
So, probably had the premature EntityQuery refresh , the model is updated incorrectly.
My Code is Listed below:
My XHTML:
|
| <body>
|
| <h:form id="searchform">
|
| .....
|
| <!-- search results -->
|
| <rich:dataTable value="#{questionarios.resultList}" var="questionario" id="table">
| <f:facet name="header">
| <rich:columnGroup>
| <rich:column>
| Seleção
| </rich:column>
| <rich:column>
| <h:commandLink value="-" >
| <f:param name="querySorting" value="descricao" />
| </h:commandLink>
| <h:outputText value="Descrição" />
| </rich:column>
| <rich:column>
| <h:commandLink value="-" >
| <f:param name="querySorting" value="exercicio" />
| </h:commandLink>
| <h:outputText value="Exercício" />
| </rich:column>
| </rich:columnGroup>
| </f:facet>
|
| <rich:column>
| <h:selectBooleanCheckbox value="#{questionarioHome.selection[questionario.idQuestionario]}" />
| </rich:column>
|
| <rich:column>
| <s:link view="/viewQuestionario.xhtml" value="#{questionario.descricao}">
| <f:param name="questionarioId" value="#{questionario.idQuestionario}" />
| </s:link>
| </rich:column>
|
| <rich:column>
| <h:outputText value="#{questionario.exercicio}" />
| </rich:column>
|
| </rich:dataTable>
|
| <h:outputText
| value="Não há questionários para seram exibidos."
| rendered="#{empty questionarios.resultList}" class="message" />
|
|
| <div class="tableControl">
|
| <h:outputText value="Total de Registros: ${questionarios.resultCount}" />
|
| <!-- Pagination Buttons -->
|
| <h:commandLink
| value="<<"
| rendered="#{questionarios.previousExists}">
| <f:param name="firstResult" value="0" />
| <f:param name="querySorting" value="#{questionarios.order}" />
| </h:commandLink>
|
| <h:commandLink value="<"
| rendered="#{questionarios.previousExists}">
| <f:param name="firstResult"
| value="#{questionarios.previousFirstResult}" />
| <f:param name="querySorting" value="#{questionarios.order}" />
| </h:commandLink>
|
| <h:commandLink value=">"
| rendered="#{questionarios.nextExists}">
| <f:param name="firstResult" value="#{questionarios.nextFirstResult}" />
| <f:param name="querySorting" value="#{questionarios.order}" />
| </h:commandLink>
|
| <h:commandLink value=">>"
| rendered="#{questionarios.nextExists}">
| <f:param name="firstResult" value="#{questionarios.lastFirstResult}" />
| <f:param name="querySorting" value="#{questionarios.order}" />
| </h:commandLink>
|
| </div>
|
|
| <div class="actionButtons">
| <!-- Delete Button -->
|
| <h:commandLink action="#{questionarioHome.removeChecked}" value="Excluir" >
| <f:param name="firstResult" value="0" />
| <f:param name="querySorting" value="#{questionarios.order}" />
| </h:commandLink>
|
| </div>
|
| </h:form>
|
| </div>
|
| </body>
|
|
My EntityHome:
|
| public class FramexEntityHome<E> extends EntityHome<E> {
|
| Map<Object, Boolean> selection = new CustomHashMap<Object, Boolean>();
|
| public Map<Object, Boolean> getSelection() {
| return selection;
| }
|
| public void setSelection(Map<Object, Boolean> selection) {
| this.selection = selection;
| }
|
| public void removeChecked() {
| System.out.println("CALL REMOVE CHECKED");
| if (selection != null) {
| System.out.println("### SIZE ###" + selection.keySet().size());
| for (Object id : selection.keySet()) {
| System.out.println("---> " + id + ":" + selection.get(id));
| }
| }
| }
|
|
|
and my componentes.xml
|
| <factory name="questionario" value="#{questionarioHome.instance}" />
|
| <fxfwk:framex-entity-home name="questionarioHome"
| entity-manager="#{questionarioEntityManager}"
| entity-class="br.gov.cgu.ativa.questionario.entidade.Questionario" />
|
| <fwk:entity-query name="questionarios" max-results="3"
| entity-manager="#{questionarioEntityManager}">
| <fwk:ejbql>from Questionario</fwk:ejbql>
| <fwk:restrictions>
| <value>
| lower(descricao) like lower( '%' +
| #{questionarioSearch.descricao} + '%' )
| </value>
| <value>exercicio = #{questionarioSearch.exercicio}</value>
| </fwk:restrictions>
| <fwk:order>descricao</fwk:order>
| </fwk:entity-query>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040989#4040989
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040989
17 years, 9 months
[JBoss Messaging] - Re: JBM 3.2 ClassLoader FUBAR
by timfox
Having to deploy scoped is a known PITA, and can be very fiddly in certain situations.
Also the "fat" jboss-messaging-client.jar introduces other issues with versions of dependencies.
Our #1 source of support cases is "I am having classloader issues with messaging". These are almost always resolvable with some fiddling, but admittedly quite fiddly to get right.
Do you have a support contract? If so, someone in support should be able to take you through getting it to work for your case.
We are currently working hard to eliminate scoping and the "fat" client jar. This will be done in the 1.2.0.SP2 release, which is due in probably 2 or 3 weeks time.
Once that release is out these kinds of problems should be a thing of the past.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040988#4040988
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040988
17 years, 9 months