[JBoss Messaging] - Asynchronous msg delivered synchronously
by davemb
Hi,
We're in the process of upgrading from JBoss 4.2.2 (with JBoss MQ) to JBoss 5.0.1 (with JBM). One of the changes we've noticed is that the first attempt to deliver an asynchronous message is made synchronously. This behaviour appears to be by design as it's documented in one of the JBoss Messaging docs.
It causes us a bit of a problem as we currently make use of the async delivery (of MQ) to separate the client from some relatively intensive and time consuming server-side processing. We'd prefer this processing and any exceptions to be processed asynchronously such that the client is not aware of either.
Is somebody able explain the rationale for the change and also let me know if there's a way to configure JBM such that it attempts all (async) deliveries asynchronously.
Thanks in advance.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214964#4214964
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214964
15 years, 10 months
[JBoss Messaging] - Opening a new JMS session for an already existing transactio
by olimo
Hi,
Is it possible to open a new JMS session for an existing transaction with JBM 1.4?
I imagine that it is what happens when a connection generated by a ClusteredConnectionFactory manages the failover of a JBM cluster node, does it?
Let me introduce the context of my question:
We have a cluster of JBossMessaging instances. For technical limitations of our legacy system, we need to transmit some messages to our cluster via http. In this case, a client sends a message via http, a web application based on each node of our cluster retrieves the messages coming from http, transforms it in jms and send it to JBM. (JBM and the web app are on the same JBOSS instance and both are replicated on each node of our cluster).
We want to manage transactions in http as we do in jms. In order to enable that feature, when a transaction is done via http, the web app stores all the messages of the transaction in Session. When the transaction finishes (commit), the stored messages are sent in a jms transaction on JBM and the stored messages are removed from the Session.
The Session content of the web app is replicated in the cluster (sticky Session is used on the loadBalancer). When a node fails, all the messages of the transaction are still available: weâve done the failover.
However, this solution is not safe since we cannot ensure (functionally) that the number of messages of the transactions will not overflow the cluster node memory.
An alternative solution consists in keeping in the content of the replicated http-session a jms- session created for the transaction. Then the messages received in the transaction via http are sent on-the-fly to JBM (in jms). The jms-transaction is committed or rolled-back when one of these operations is received via http. With this solution, the memory problem is delegated to JBM. Nevertheless, it is no more possible to make the failover: the jms-session replicated in the http-session cannot be reused by other threads (and thus cluster nodes) than its creator.
Since it is not possible to use the replicated jms-session object if the creator node fails, is it possible to open a new JMS session on a living cluster node for the already started transaction?
Thanks for your help !
olivier
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214961#4214961
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214961
15 years, 10 months
[EJB/JBoss] - Design problem: EJB containers prevent threadpool allocation
by mcandelo
I have a design issue I'm working through - I'm attempting to limit requests into a remote system to a set number per client. So for each client we have, I want a max of (for example) 15 requests to be sent to the system. Clients are added and removed constantly so extra development for each client is out of the question.
In normal Java I would just create a new client object that allocates a thread pool and send requests into each client. The thread pool would limit the number of active requests in the system and all is well. However, this logic will not work in EJB land because the container does not like application code allocating thread pools.
The only other way I can think of to implement anything like this would be to submit jobs to a queue and have an MDB pull off the queue with a fixed pool size. But this solution would not allow for dynamically increasing the number of clients (we would need to allocate a new pool for each client).
So, is there a way to create & limit asynchronous processes using JBoss/EJB's?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214952#4214952
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214952
15 years, 10 months
[JCA/JBoss] - Datasource with <ha-xa-datasource> is not deployed under JBO
by agattone
Hi,
I try to deploy the following datasource to enable failover features under a JBOSS 5.0 GA application server.
This xml datasource is validated against the dtd.
For moment, I use only one database URL just to begin my test.
My datasource file is perhaps wrong, but no explicit error message could help me to understand why this datasource is not deployed.
Thanks for your help.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE datasources
| PUBLIC "-//JBoss//DTD JBOSS JCA Config 5.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-ds_5_0.dtd">
| <datasources>
| <ha-xa-datasource>
|
| <jndi-name>jdbc/xxx-ds</jndi-name>
|
| <track-connection-by-tx></track-connection-by-tx>
|
| <!-- Connection settings -->
|
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
|
| <xa-datasource-property name="URL">jdbc:oracle:thin:@host:1523:SID</xa-datasource-property>
|
| <url-property>URL</url-property>
|
| <url-delimiter>|</url-delimiter>
|
| <!-- set to false to fix problems with Oracle -->
|
| <isSameRM-override-value>false</isSameRM-override-value>
|
| <user-name>XXX</user-name>
|
| <password>YYY</password>
|
| <!--pooling parameters-->
|
| <min-pool-size>10</min-pool-size>
|
| <max-pool-size>100</max-pool-size>
|
| <!-- sets the idle timeout to 15 minutes -->
|
| <idle-timeout-minutes>15</idle-timeout-minutes>
|
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a
|
| global transaction and vice-versa -->
|
| <no-tx-separate-pools></no-tx-separate-pools>
|
| <check-valid-connection-sql>SELECT * FROM MY_CONSTANT_TABLE</check-valid-connection-sql>
|
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
|
| <!-- Checks the Oracle error codes and messages for fatal errors -->
|
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
|
| <!-- Prepared Statements -->
|
| <prepared-statement-cache-size>200</prepared-statement-cache-size>
|
| <share-prepared-statements></share-prepared-statements>
|
| </ha-xa-datasource>
|
| </datasources>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214949#4214949
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214949
15 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Connect app to static content folder
by oneworld95
Hi. I'm new to JBoss and have installed version 4.2.3.GA on my WinXP Pro system to match our server. The Java servlet needs to write an uploaded file to a folder on my machine. The app's is located in this folder:
C:\jboss\jboss-4.2.3.GA\server\default\deploy\premupload.war
Its structure is like this:
...\premupload.war
| \uploads\
| \WEB-INF\
| upload.jsp
The upload folder (which is off the root of the app) is defined in the web.xml file as this:
<context-param>
| <param-name>UploadDirectory</param-name>
| <param-value>/uploads/</param-value>
| </context-param>
I try to fetch the upload folder using this line in the servlet:
String uploadDirectory = this.getServletContext().getInitParameter("UploadDirectory");
The app blows up with the following error referring to the above line:
java.lang.NullPointerException
| org.unctv.fileupload.UploadHandler.doPost(UploadHandler.java:47)
| 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)
How do I refer to the upload directory? Does it need to be outside of the premupload.war folder? Your guidance is much appreciated. Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214947#4214947
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214947
15 years, 10 months