[JBoss Messaging] - two server cluster - consumer count 2
by kpirklï¼ elynx.com
I am using messaging 1.3 with JB 4.2 clustered on two servers
I have a standalone client application running on both servers
The server names are jbossclust1 and jbossclust2
When I start the client applications the Queue ConsumerCount on jbossclust2 is 2.
I would expect the ConsumerCount to be 1 on both machines
Here is the relevant client code.
String strQueue = "/queue/testDistributedQueue";
ic = new InitialContext();
cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
connection = cf.createConnection();
Queue testQueue = (Queue)ic.lookup(strQueue);
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// task queue
MessageConsumer consumer = session.createConsumer(testQueue);
connection.start();
while(true) {
// if we get an admin shutdown message - exit
if ( false ) {
log(" shutdown requested");
break;
}
// get a task to process
message = (TextMessage)consumer.receive(36000);
if ( message == null ) {
log(" no messages available");
continue;
}
log(" found a message - continuing");
ProcessMessage(message);
}
Suggestions please...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055750#4055750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055750
18Â years, 10Â months
[JBoss Seam] - c:set (or ui:param) and s:link, s:button action parameter
by ChristopheA
I'd like to use some form of aliasing for my Seam components with qualified (and yet possibly long) names. I'd like my aliases to be valid for a given page. And I'm using facelets.
I tried to use ui:param or c:set tags, and everything went fine - except with action parmaters of s:link and s:button tags.
Here's the facelet code :
| <!-- my alias... -->
| <!-- <ui:param name="manager" value="#{my.package.manager}"/> -->
| <c:set var="manager" value="#{my.package.manager}" />
|
| ...
|
| <s:link value="s:link" action="#{manager.start}"/> // Not working
|
| <s:button value="s:button" action="#{manager.start}"/> // Not working
|
| <h:form>
| <h:commandButton value="h:cmdButton" action="#{manager.start}"/> // Working fine
| </h:form>
|
Everything works fine with h:commandButton. But for s:link and s:button I got :
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'manager' resolved to null
As the action method called is #{manager.start} rather than #{my.package.manager.start}. Here is the html generated :
actionMethod=example%2Fmember_view.xhtml%3Amanager.start&cid=30
Anyone has an idea ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055741#4055741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055741
18Â years, 10Â months
[JBoss Seam] - User Navigation Design Pattern
by Delphi's Ghost
I have an edit page for a widget, and each widget has a set of sub widgets. I want to show the widget details as editable inputTexts, and have a clickable list of subwidgets. If you click on a subwidget, you go to a page to edit the subwidget, click save on the subwidget page, and it should save the subwidget, and take you back to the widget edit page. On the widget edit page, you can finish editing the widget, click save, and it will save the widget.
I'm finding this hard to do in seam, since the entity manager flush mode is set to manual, and obviously, when I flush it for the subwidget, it also flushes it for the widget itself which I don't want.
I'm wondering whether a) I can do this in seam, or b) I'm still thinking in desktop client/server mode and need to adapt my ideas of user interaction to adapt to the web, for which seam is most suited.
Regarding option A, I'm wondering whether I need to do something along the lines of starting a nested conversation, and trying to get a new entity manager. I have tried to put the subwidget editor into a separate nested conversation, but it appears not to work since it shares the entity manager (I'm using the @In EntityManager entityManager seam managed transactional entity manager).
For option B, I can see that my current problem is that I am trying to have 2 different 'editors' in the same conversation space, and I can't pick and choose which one I want to flush. This leads me to think my interface design is wrong. We are inexperienced web developers and still thinking in client/server mode.
As an alternative navigation/interface design, I'm thinking of a 'view widget' page which lets you see the details as view only, with a link to edit the details. The view only page also has the clickable list of subwidgets which takes you to a page to edit the subwidget. The navigation would then revolve around the view details page, and you can only edit one item (widget or subwidget) at a time and go back to the view details page each time after saving the item. With this design, I don't think I will have any problems implementing it in Seam. This also gives me the benefit of having a page with view only access that the user cannot edit, and I can check rights to see if they can edit the widget/subwidgets. I also notice that this is similar to the style that seam-gen uses when it generates the crud pages.
Anyone's experience or thoughts on this would be most welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055739#4055739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055739
18Â years, 10Â months