[Messaging, JMS & JBossMQ] - Configuring queue in jboss-web.xml
by sudarshanacharya
I am trying to set up the queue in jboss-web.xml. My listener class implements MessageListener,and doesnt implemnet MessageDrivenBean. If it were a MDB, my config in jboss to map to jndi would be:
<message-driven>
<ejb-name>SomeClass</ejb-name>
<destination-jndi-name>queue/QueueA</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/test/TestQueue</res-ref-name>
<jndi-name>ConnectionFactory</jndi-name>
</resource-ref>
</message-driven>
and in my ejb-jar.xml, it would be:
<message-driven>
<ejb-name>SomeClass</ejb-name>
<ejb-class>SomeClass</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>jms/test/TestQueue</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
Could anyone guide me how do I set up Listener MDP's in jboss xmla nd ejbjar.xml?? Thanks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103384#4103384
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103384
18 years, 8 months
[JBoss Seam] - Unexpected behaviour - DataModel & Nested conversations with
by danidacila
I have a problem which just wont solve. Can this be a bug?
Please help if you can.
Environment - Tomcat 6 + Seam 2 + Richfaces 3.1.2 (or 3.2.0 - the same behaviour)
2 beans:
First
@Scope(CONVERSATION)
@Name("inSectionAction")
which has
@DataModel
private List inDocuments;
Second
@Scope(CONVERSATION)
@Name("inDocumentAction")
which has
@In(required = false)
@Out
private Document inDocument;
@Begin(nested = true)
public void editInDocument(Document inDocument) {
this.inDocument = (Document) contaOnlineDatabase.merge( inDocument);
}
@End
public void cancel() {
}
1st bean used for displaying a table in the page
inSection.xhtml
------------------------------------------------------
<rich:dataTable
value="#{inDocuments}"
var="document">
.... some columns....
one of the column contains
<s:link action="#{inDocumentAction.editInDocument(document)}">
<h:graphicImage value="../img/edit.png"/>
</s:link>
</rich:dataTable>
------------------------------------------------------
the s:link above goes to the edit page which has an edit form and a cancel button in the page
addInDocument.xhtml
------------------------------------------------------
<a4j:commandButton value="Cancel" action="#{inDocumentAction.cancel}"/>
------------------------------------------------------
- you can put any cancel button/link here
the pages.xml is like this:
<page view-id="inSection.xhtml">
<navigation from-action="#{inDocumentAction.editInDocument(document)}">
<redirect view-id="addInDocument.xhtml"/>
<page view-id="addInDocument.xhtml">
<navigation from-action="#{inDocumentAction.save}">
<rule if-outcome="successSaveInDocument">
<redirect view-id="inSection.xhtml"/>
<navigation from-action="#{inDocumentAction.cancel}">
<redirect view-id="inSection.xhtml"/>
So almost exactly like in the Hotel example with one exception - the search (the DataModel) isn't done in a Session bean, but in a Conversation bean.
What happens.
I am in the page with the table,
The table looks nice,
hit the edit button - the edit form looks ok
hit cancel - goes back to the page with the table
now the table contains bad data.
I tried different versions of code and I get 2 results:
1 - the data in the table is completely empty - but the number of rows is ok, like the attributes of the entities in the DataModel are all null
2 - all rows have the same attributes as the one edited, but again the number of rows is ok.
The bad data is only on the screen, not in the database.
Even a refresh of the browser (F5) or enter on the address bar wont change anything.
So it seems that something alters the conversation context... but i can't figure what.
I have tested with rich:datatable.
With h:datatable - not realy the same result but at the second click on edit everything crashes - the parameter to editInDocument comes null
Please heeeelp.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103381#4103381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103381
18 years, 8 months
[EJB/JBoss] - Re: SessionSynchronization handling bug?
by eprst
doesn't work on 4.2.2 as well:
| 02:12:06,855 ERROR [TxInterceptorCMT] IllegalStateException while setting transaction for rollback only
| java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] T
| he transaction is not active!
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.setRollbackOnly(TransactionImple.java:380)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:157)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:960)
| at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy367.remove(Unknown Source)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103380#4103380
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103380
18 years, 8 months
[JCA/JBoss] - Errors Migrating no-tx-datasource from 4.0.5 to 4.2.2
by jantzen
Hi All,
I'm trying to run a couple applications in 4.2.2. These work fine in 4.05., but I'm seeing errors at startup now:
--- MBeans waiting for other MBeans ---
| ObjectName: persistence.units:ear=DatabaseImport.ear,jar=DatabaseImport.jar,unitName=MediaWikiDBImporterRole
| State: FAILED
| Reason: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=MediaWikiDBImporterRoleDS
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:ear=DatabaseImport.ear,jar=DatabaseImport.jar,unitName=MediaWikiDBImporterRole
| State: FAILED
| Reason: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=MediaWikiDBImporterRoleDS
|
|
Here's my MySQL DS file:
<?xml version="1.0" encoding="UTF-8"?>
|
| <datasources>
|
| <no-tx-datasource>
| <jndi-name>MediaWikiDBImporterRoleDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/MediaWikiDB</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>username</user-name>
| <password>password</password>
| </no-tx-datasource>
|
| </datasources>
|
|
And here's my persistence.xml:
| <persistence-unit name="MediaWikiDBImporterRole">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <!-- FIXME this should be non-jta-data-source but can't due to a JBoss bug http://jira.jboss.com/jira/browse/EJBTHREE-433 -->
| <jta-data-source>java:/MediaWikiDBImporterRoleDS</jta-data-source>
| <properties>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/PersistenceUnits/MediaWikiDBImporterRole"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
| <property name="hibernate.show_sql" value="false" />
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
| </properties>
| </persistence-unit>
|
In 4.0.5 I had to make this a jta-data-source as that bug alludes to. In 4.2.2 it won't work either as jta or non-jta. Any ideas?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103378#4103378
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103378
18 years, 8 months