[JBoss Messaging] - Re: Bridge cannot find session with QOS_ONCE_AND_ONLY_ONCE
by julians37
anonymous wrote : I don't follow, what details do you have to know?
Suppose you'd set up a bridge to a JMS provider operated by a third party.
If I'm not missing anything, you'd have to ask them whether they run a JBM instance and if so, which ServerPeerIDs their nodes are using, and you'd have to configure your nodes to make sure they use different IDs. That means you have to know internal implementation details about the remote setup.
And that's also the special case I was mentioning - as far as I understand, as soon as it's not JBM on the remote side I assume you wouldn't have to pay attention to potential ServerPeerID conflicts?
I can understand, to some extent, why JBM users are required to manually coordinate nodes within a cluster and make sure they have unique IDs. But having to coordinate all nodes participating in some wider communication network appears very cumbersome and error-prone to me.
Anyway, why wouldn't you want to take the partition name into account when determining node equality - and/or use different measures to make sure remote nodes are not mistaken for a node in the local cluster?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087625#4087625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087625
18 years, 7 months
[Installation, Configuration & DEPLOYMENT] - i really need help on this case
by adam1984
i downloaded JBOSS server 4.2.0, unzipped it and run it. everything was
fine except it failed to deploy my .war file (tomcat had no prob) and b4 u asking, they're on different ports and i also tried to shutdown the tomcat
but nothing. same for V4.2.1 and 4.0.5.
BUT i have a V4.0.5 installed via JEMS add it does deploy successfully the war file.
am i missing something??
i checked the log and found a point where an exception is thrown while deploying my war, but they're different in each version:
V4.0.5:
2007-09-23 12:31:57,156 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test]] Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: javax/el/CompositeELResolver
V4.2.1:
2007-09-23 12:29:26,750 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
java.lang.ClassCastException: com.sun.faces.config.WebConfiguration
both throw a "deployment failed" exception shortly afterward...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087621#4087621
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087621
18 years, 7 months
[JBoss Seam] - Re: form controls with the same property name
by schmod54
I was a bit ambiguous in my previous posts, because I was mixing examples... also I was wrong about the exact problems I've had with different approaches. So I've made a simplified example that shows what I want to do, and how the different approaches fail. I'm running this in a seam-genned project on seam 2 beta, jboss 4.2.1.GA, but I expect it to behave the same way in other versions. Here is the source:
I have the following in my pages.xml... It's not strictly necessary to run the example though:
<page view-id="/control_loop_test.xhtml">
| <begin-conversation join="true"/>
| </page>
Here is an action bean that assigns facesMessages to form controls inside a loop:
import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.faces.FacesMessages;
|
| import java.util.Arrays;
| import java.util.Collection;
|
| @Name("controlLoop")
| @Scope(ScopeType.CONVERSATION)
| public class ControlLoopAction {
|
| @In
| private FacesMessages facesMessages;
|
| public static class MyEntity {
| private String name;
|
| public String getName() {
| return name;
| }
|
| public void setName(String name) {
| this.name = name;
| }
| }
|
| @DataModel
| private Collection<MyEntity> batchEntities = Arrays.asList(new MyEntity(), new MyEntity());
|
| public Collection<MyEntity> getBatchEntities() {
| return batchEntities;
| }
|
| public String submit(String controlPrefix) {
| for (int i = 0; i < batchEntities.size(); i++)
| facesMessages.addToControlFromResourceBundle(controlPrefix + "Name" + i, "badName" + i);
| return "/control_loop_test.xhtml";
| }
| }
Here is a page that tries a few different ways of inputting data into the action bean.
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE html
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:c="http://java.sun.com/jsp/jstl/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets">
| <head>
| <title>Control Loop Test</title>
| </head>
| <body>
| controlLoop: #{controlLoop}<br/>
| global messages: <h:messages globalOnly="true"/><br/>
| hardwired form... this works (at least for h:message anyway) but I really don't want to have to do this for large variable-size forms:
| <h:form id="hardwiredForm">
| Name0:
| <h:inputText id="hardwiredName0" value="#{controlLoop.batchEntities[0].name}"/>
| s:message: <s:message/> h:message: <h:message for="hardwiredName0"/><br/>
| Name1:
| <h:inputText id="hardwiredName1" value="#{controlLoop.batchEntities[1].name}"/>
| s:message: <s:message/> h:message: <h:message for="hardwiredName1"/><br/>
| <h:commandButton value="Submit" action="#{controlLoop.submit('hardwired')}"/>
| </h:form>
| <br/>
| a4j:repeat form... I'm thinking this doesn't work because the id of h:inputText gets resolved when the view is built... see
| <a href="http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets">
| http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets</a>:<br/>
| <h:form id="a4jRepeatForm">
| <a4j:repeat id="mainLoop" value="#{controlLoop.batchEntities}" var="myEntity" rowKeyVar="i">
| Name#{i}:
| <h:inputText id="a4jName#{i}" value="#{myEntity.name}"/>
| s:message: <s:message/> h:message: <h:message for="a4jName#{i}"/><br/>
| </a4j:repeat>
| <h:commandButton value="Submit" action="#{controlLoop.submit('a4j')}"/>
| </h:form>
| <br/>
| ui:repeat form... same problem as a4j:repeat, but I don't want to use ui:repeat anyway because of its known bugs:
| <h:form id="uiRepeatForm">
| <ui:repeat value="#{batchEntities}" var="myEntity">
| Name#{batchEntities.rowIndex}:
| <h:inputText id="uiName#{batchEntities.rowIndex}" value="#{myEntity.name}"/>
| s:message: <s:message/> h:message: <h:message for="uiName#{batchEntities.rowIndex}"/><br/>
| </ui:repeat>
| <h:commandButton value="Submit" action="#{controlLoop.submit('ui')}"/>
| </h:form>
| <br/>
| c:forEach form... maybe this would work if I could get c: tags working... I tried some things I found on the web to get c: tags working, but none of them worked for me:<br/>
| <h:form id="cForEachForm">
| <c:forEach id="mainLoop" value="#{controlLoop.batchEntities}" var="myEntity" varStatus="i">
| Name#{i.index}:
| <h:inputText id="forEachName#{i.index}" value="#{myEntity.name}"/>
| s:message: <s:message/> h:message: <h:message for="forEachName#{i.index}"/><br/>
| </c:forEach>
| <h:commandButton value="Submit" action="#{controlLoop.submit('forEach')}"/>
| </h:form>
|
| </body>
| </html>
If anyone could show me how to get the facesMessages to correctly appear next to the relevant controls within the context of a loop, I'd greatly appreciate it. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087624#4087624
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087624
18 years, 7 months
[JBoss Portal] - Click Button on Portlet A , Portlet B navigates to a new pag
by ameo
Hello,
I have to Portlets. When I click on a button in portlet A, I want that Portlet B
navigates to a new side. The other examples e.g click a Button and changes text on the other Portlet works fine, but I want to manupulate the navigation.
I tried this code in the ProcessAction-Method of Portlet B class, that's called after clicking on button of Portlet A:
|
| public class PortletB extends FacesPortlet{
|
| ..
|
| public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws PortletException, IOException {
|
| ....
| LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
|
| Lifecycle lifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
|
| FacesContext fc = (FacesContext) this.getFacesContextFactory().getFacesContext(portletSession.getPortletContext(),aRequest, aResponse, lifecycle);
|
| fc.getCurrentInstance().getApplication().getNavigationHandler().handleNavigation(fc.getCurrentInstance(), null,"moveit");
|
| ...
|
Therefor the navigation rule is the following one
| <navigation-rule>
| <from-view-id>*</from-view-id>
| <navigation-case>
| <from-outcome>moveit</from-outcome>
| <to-view-id>/WEB-INF/jsp/MoveMe.jsp</to-view-id>
| </navigation-case>
| </navigation-rule>
|
That doesn't work! I don't know, if this is the right way, to get the FacesContext from the processAction method of the PortletClass. Is this the right way? Do you have other ideas ?
Greetings,
ameo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087623#4087623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087623
18 years, 7 months
[JBoss Messaging] - Re: Bridge cannot find session with QOS_ONCE_AND_ONLY_ONCE
by timfox
"julians37" wrote : To elaborate, it feels wrong that if you set up a bridge to send messages "somewhere", to some remote JMS provider, that you have to know details about the way that remote provider is configured.
|
I don't follow, what details do you have to know?
anonymous wrote :
| It feels to me like you shouldn't have to worry about which ServerPeerIDs that remote provider is using internally. As far as I can see, it should be just a "black box" remote JMS system. Ideally, you shouldn't even have to think about whether it's JBM or some other JMS implementation.
|
Not sure what you are referring to. You don't have to think about whether it's JBM or some other JMS implementation. There's nothing in the bridge config that makes you configure JBM servers different from any other.
anonymous wrote :
|
| I guess it would also be good to mention somewhere in the documentation that JBM bridging uses a "special case" when it talks to another JBM instance. (At least that's how I understand the situation.)
|
What special case is that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087619#4087619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087619
18 years, 7 months
[JBoss Seam] - Re: can factory methods have parameters?
by matt.drees
"matt.galvin" wrote :
| There are two options that I've thought of. First, I can use a commandLink and pass an id of the selected item through it, then look up the object in the method that is called. I haven't done it, but can't think of why it wouldn't work. It just doesn't feel "correct".
|
I don't think it's incorrect. This is what seam gen apps do. And my gut feel is you'll encounter less trouble this way.
"matt.galvin" wrote :
| The second was to switch to using a DataModel to back each table and use the DataModelSelection functionality. This is what I think I should be doing. The problem is, I don't know how to create the DataModel using a factory method that needs to take a parameter (ie, make the findCalculations method above be a factory).
|
Right, factory methods can't have parameters.
"matt.galvin" wrote :
| Alternatively, I could remove the method parameters and add an injected property:
| @In private Integer categoryId
| But then I don't know how to have the proper value injected for each of the dataTables.
|
You could (I'm pretty sure) do something like
| @In(value="#{category.id}") private integer categoryId
|
However, I don't think you should use the @DataModel / @DataModelSelection approach here. The reason is you need multiple dataModels (one for each category), and @DataModel only gives you a single dataModel per variable. You could use multiple dataModels with a more traditional JSF approach, though I think your first idea is easier.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087613#4087613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087613
18 years, 7 months