[JCA/JBoss] - Limit MDB max instances cluster-wide ?
by jeanbobby
Hi,
I'd like to know what would be your recommendations regarding the need of limiting the number of simultaneous mdbs instances across a cluster ?
Let's say I have some external resource, used thru JCA and more specifically MDBs.
Let's suppose that the IT architecture at a given moment allows for 50 connections on that resource (that may be extended later on) and that each MDB execution is going to connect to that resource (agreed, it could be done directly thru JCA with specific adaptor).
I want that 50 connections limit to be respected and reached with any number of jboss instances on the cluster, transparently balancing the outbound connectivity across the nodes... and of course I want to be able update this limit 'dynamically' when the external resource hardware gets upgraded...
Any best practice with a standard-based approach on the subject ?
Thank you,
Best regards
Olivier
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035933#4035933
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035933
19 years
[JBoss jBPM] - Re: SessionFactory creation
by iantimothy
hello.
yup...like the example code I gave, you would need to create a class (e.g. JbpmUtil.java) and use a static initializer to create an instance of the JbpmConfiguration object.
Also, you need a static method to access the created static jbpmConfiguration.
Then, you would need a listener. i.e.
public class AppListener implements ServletContextListener
You can try googling how to implement the listener.
then you can put this line in the web.xml file
<listener>
| <listener-class>package.AppListener</listener-class>
| </listener>
You could google how to do this also.
In your AppListener, you would need to use this code.
public void contextInitialized(ServletContextEvent arg0) {
| try {
| Class.forName("package.JbpmUtil").newInstance();
| }
| catch (Exception e) {
| e.printStackTrace();
| }
| }
I suggest you google this to get the actual code but I hoped that you have been pointed in the right direction.
What happens is when the server starts, the listener contextInitialized method will be called which will then create an instance of JbpmUtil. When this happens, the JbpmConfiguration is created. I think from then on, you can get the sessionfactory u need from jbpmConfiguration.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035932#4035932
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035932
19 years
[JBoss jBPM] - Combining jBPM and BPEL
by kdeboer
We are intending to use BPM on top of a (partly existing) SOA Architecture.
The BPEL standard has no provisioning for Workflow. A lot of BPEL products extend the standard to incorporate this.
I think jBPM is a far better solution for this. But for service orchestration BPEL is a good option (although i am not a fan myself of XML scripting languages).
JBoss BPEL internally makes use of the same process database (so i have understood).
So an excellent combination would be to have jBPM manage the overall business process including the worklow tasks. But it would be nice to have a bpel engine do the webservice orchestration stuff. This BPEL process should be modelled as a sub process (a process state on the highest level).
It would be deployed in the same jBPM process db and offer good opportunities for Business Activity Monitoring.
Is such a scenario possible with JBoss BPEL and jBPM?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035930#4035930
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035930
19 years
[JBoss Seam] - Action not invoked - config error?
by taprogge
Hello all!
I am currently working on a project that has been dorment for a while. It uses JBoss Seam with JBoss Portal through the MyFacesGenericPortlet.
A have updated Seam to 1.2.1 now and added a new component to test the s:fileUpload functionality.
My problem is now that the action declared in my jsp's commandButton is never invoked when I click it. The server just redisplays the portal page. No error message is given.
The component itself is found when the application deploys, that was ther first thing I checked.
This obviously has to be an error on my part, but somehow, it eludes me.
Perhaps anyone of you has some insights?
My jsp looks like this:
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
| <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s"%>
|
| <f:view>
| <h3>Upload</h3>
| <p>
| <h:form enctype="multipart/form-data">
| <s:fileUpload data="thedatafield"/>
| <h:messages style="color:red"/>
| <h:commandButton type="submit" value="upload" action="#{UploadAction.load}" styleClass="portlet-form-button" />
| </h:form>
| </p>
| </f:view>
|
and my component like this (I'll omit the local interface and omit imports... nothing fancy in there):
| @Stateful
| @Scope(SESSION)
| @Name("UploadAction")
| public class UploadActionBean implements UploadAction {
|
| private static Logger logger = Logger.getLogger(UploadActionBean.class);
|
| @PersistenceContext(type = EXTENDED)
| private EntityManager em;
|
| @In(create = true)
| @Out(required = false)
| private byte[] thedatafield;
|
| @In(create = true)
| private transient ResourceBundle resourceBundle;
|
| @In
| private transient FacesContext facesContext;
|
| @SuppressWarnings("unchecked")
| public String load() {
| System.out.println("in load()");
| if (thedatafield != null) {
| logger.info(thedatafield);
| }
| else {
| logger.info("thedatafield is null");
| }
| return Outcome.REDISPLAY;
| }
|
| public void setThedatafield(byte[] field) {
| this.thedatafield = field;
| }
|
| public byte[] getThedatafield() {
| return this.thedatafield;
| }
|
| @Remove
| @Destroy
| public void destroy() {
| // nothing to clean up here
| }
| }
|
Thanks in advance for any ideas you guys might have.
Best regards,
Phil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035922#4035922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035922
19 years