[JBoss Seam] - @Validator causing EntityHome.managed equal false
by hstang
Does anyone know why throwing a ValidatorException in annotated @Validator classes would cause EntityHome.managed false? Other validation errors would not cause the managed property to be false except for those matched by @Validator classes. In the code I provide below, after you enter "false" in the input text box, the button update button would disappear upon refresh because the managed property is set to false.
## sheep.xhtml
| <h:form>
| <f:facet name="afterInvalidField">
| <s:message/>
| </f:facet>
|
| <s:validateAll>
| <s:decorate>
| <h:inputText value="#{sheepHome.instance.name}"
| required="true"
| validator="testValidator"/>
| </s:decorate>
| </s:validateAll>
|
| <h:commandButton action="#{sheepHome.update}"
| value="Update"
| rendered="#{sheepHome.managed}"/>
| </h:form>
|
## sheep.page.xml
| <page>
|
| <begin-conversation join="true"/>
|
| <param name="id" value="#{sheepHome.id}" converterId="javax.faces.Long"/>
|
| </page>
|
## TestValidator.java
| @Name("testValidator")
| @Validator
| public class TestValidator extends EntityController
| implements javax.faces.validator.Validator, Serializable {
|
| public void validate(FacesContext facesContext, UIComponent uiComponent, Object object) throws ValidatorException {
| if ("false".equals((String) object)) throw new ValidatorException(new FacesMessage("Managed is false"));
| }
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051781#4051781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051781
18Â years, 10Â months
[Installation, Configuration & Deployment] - mod_jk intermittently loosing connection to jboss 4.2
by modoc
I have a Debian (stable) server which is running Apache 2.2.3, and using mod_jk to connect to my application running within JBoss.
I have been running with this using JBoss 4.0.5 for many months, without issue. I just upgraded to JBoss 4.2.0. Things start off fine, however after running for a while (last night it took 6.5 hours) the mod_jk logs start showing these errors:
| [Wed Jun 06 07:45:00 2007][29336:14016] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (948): (node1) can't receive the response message from tomcat, network problems or tomcat is down (*MyIP*:8009), err=-104
| [Wed Jun 06 07:45:00 2007][29336:14016] [error] ajp_get_reply::jk_ajp_common.c (1566): (node1) Tomcat is down or refused connection. No response has been sent to the client (yet)
| [Wed Jun 06 07:45:00 2007][29336:14016] [error] ajp_service::jk_ajp_common.c (1928): (node1) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
|
These errors do NOT happen with each request. They happen perhaps one out of five, although it seems to fluctuate. Most requests work, but many don't. There are NO errors in the JBoss logs. I have tried using 127.0.0.1 and my actual non-loopback IP address and the same thing happens.
I can fix it by restarting JBoss, then everything works, for a few hours at least, before the problem starts up again.
Has anyone seen anything like this? Any ideas on what I can do? I'd hate to have to move back to JBoss 4.0.5, as I would like to use the newer libraries without having to load my own in.
Please help.
Regards,
Devon
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051779#4051779
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051779
18Â years, 10Â months