[JBossCache] - Re: ClusteredCacheLoader + LOCAL CacheMode
by lovelyliatroim
Ok had a look into
| !-- determines whether this cache loader ignores writes - defaults to false. -->
| <ignoreModifications>true</ignoreModifications>
|
|
and what it can and cant do.
Here is the config i used
| <mbean code="org.jboss.cache.loader.tcp.TcpCacheServer" name="jboss.cache:service=TcpCacheServer">
| <depends optional-attribute-name="CacheJmxWrapper"
| proxy-type="attribute">jboss.cache:service=PriceServerCache</depends>
| <attribute name="BindAddress">${jboss.bind.address:localhost}</attribute>
| <attribute name="Port">7500</attribute>
| <attribute name="MBeanServerName"></attribute>
| <!--<attribute name="CacheName">jboss.cache:service=TreeCache</attribute>-->
| </mbean>
|
Reason for posting that is because twiki needs updating for version 2.0 and this shows how to do it for older versions http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClusteringPatternFarCache
Anyways if you configure your very first node at startup to refer to a remote TcpDelegateCacheLoader and the other node where it resides isnt started you get a
anonymous wrote :
| org.jboss.cache.CacheException: Unable to start cache loaders
|
exception, which is fair enough because the other node is not started but what i didnt expect to happen is that the cache in first node wont be set up, i would have expected the cache loader to fail gracefully and re-try at a later stage to connect but initialisation of the cache would still happen.
So i configured the first start up node not to refer to any other node but just be the TcpCacheServer. I started the second node with config like so
| <attribute name="CacheLoaderConfig" replace="false">
| <config>
| <cacheloader>
| <class>org.jboss.cache.loader.TcpDelegatingCacheLoader</class>
| <properties>
| host=localhost
| port=7500
| </properties>
| <!-- determines whether this cache loader ignores writes - defaults to false. -->
| <ignoreModifications>true</ignoreModifications>
| </cacheloader>
|
| </config>
| </attribute>
|
When i put entries into node2, they are replicated or written into the cache in node1. I played around with setting it to true or false and makes no difference. So I suspect 1 of 3 things,
1. ignoreModifications doesnt work with TcpDelegate, or
2. I checked the log file to see if i could see some debug where it would say something like "ignoreModifications set to true" but nothing in the log file. So maybe it wasnt set??
3. ignoreModifications doesnt work like we thought it would :(
So those are my findings..........
cheers,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112003#4112003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112003
18 years, 4 months
[JBossCache] - Eviction/passivation is called when server shutdown ?
by dmary
Hi all,
I see someone on forum which have success on having evicting action called when his server have shutdown, and with passivation=true, the datas goes into cacheloader and be stored into database.
I've try it (passivation = true), and never , the datas goes into my database.
So this is my question : does JBossCache handle the fact that when a Jboss AS is shutdown manualy, and when passivation flag is set to true (with a cacheloader configured), the datas goes from memory to the physical cache ?
If it does, what should I do ?!
If not, is the action of launching manualy evicting action when the cache is stop, with the help of a TreecacheListener is a good action ??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111999#4111999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111999
18 years, 4 months
[JBoss Seam] - Seam problems --> redirect to /faces/home.xhtml
by dcshonda
Hi, I have a problem with my application. I have done a seam portlet, with a rich:datatable, and it works fine...but, when I go to the next page of the datatable, my application leaves the JBoss Portal and redirect to /faces/home.xhtml, and I don´t have this file in faces directory. I don´t know why happen this?
Sorry for my english.
This is my web.xml config:
| <?xml version="1.0"?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
|
| <description>JbossPortalBuscadorIntervinientes</description>
|
| <context-param>
| <param-name>javax.portlet.faces.BridgeImplClass</param-name>
| <param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value>
| </context-param>
|
| <!-- <context-param>
| <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
| <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
| </context-param>
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>-->
| <!-- Seam -->
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
|
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
|
|
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
|
| <!-- JSF -->
| <!--<context-param>
| <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
| <param-value>NEKO,TIDY,NONE</param-value>
| </context-param>-->
| <!--<context-param>
| <param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
| <param-value>/pages/repeater.xhtml,/pages/tabs.xhtml</param-value>
| </context-param>-->
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>server</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>false</param-value>
| </context-param>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
|
| <session-config>
| <session-timeout>30</session-timeout>
| </session-config>
|
| <welcome-file-list>
| <welcome-file>/faces/index.html</welcome-file>
| </welcome-file-list>
|
|
| </web-app>
|
Anyone can help me? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111997#4111997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111997
18 years, 4 months
[JBoss Seam] - Re: Date parameter at s:button
by jamesjmp
By the way, in my case I am not using a s:button but a s:link.
| <s:link view="/RstInstrumentValuationExList.xhtml"
| id="rstInstrumentValuation2"
| rendered="#{(rstRepProc.rstProcess.rstStatus.code != 0)}">
| <h:graphicImage url="img/view.gif" border="0"/>
| <f:param name="processDate"
| value="#{rstRepProc.rstProcess.processDate}">
| </f:param>
| </s:link>
|
processDate is a java.util.Date field, but in spite of that I have this error:
16:46:22,119 ERROR [SeamPhaseListener] uncaught exception
javax.faces.convert.ConverterException: java.text.ParseException: Unparseable date: "2006-08-31"
at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:84)
...
Caused by: java.text.ParseException: Unparseable date: "2006-08-31"
at java.text.DateFormat.parse(DateFormat.java:335)
at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:80)
... 44 more
16:46:22,181 ERROR [SeamPhaseListener] swallowing exception
javax.faces.convert.ConverterException: java.text.ParseException: Unparseable date: "2006-08-31"
at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:84)
at org.jboss.seam.pages.Param.getValueFromRequest(Param.java:144)
at org.jboss.seam.core.Pages.applyRequestParameterValues(Pages.java:633)
..
Caused by: java.text.ParseException: Unparseable date: "2006-08-31"
at java.text.DateFormat.parse(DateFormat.java:335)
at javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:80)
... 44 more
I have tried with convertDateTime this way:
| <f:param name="processDate"
| value="#{rstRepProc.rstProcess.processDate}">
| <s:convertDateTime type="date" dateStyle="short" pattern="dd/MM/yyyy"/>
| </f:param>
|
Using s:convertDateTime the following error happens:
/RstReport.xhtml @318,112 <s:convertDateTime> Parent not an instance of ValueHolder: javax.faces.component.UIParameter@59227c
any idea? thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111995#4111995
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111995
18 years, 4 months