[JBossCache] - Re: Transactions
by manik.surtaniï¼ jboss.com
Using a distributed TM may work and is worth trying out, as I'd imagine this is the "correct" approach, provided C is configured with a TransactionManagerLookup that knows how to get a handle on the distributed TM.
A simpler approach may be not to use a custom API to communicate between A and C at all, but instead do do something like this:
Let B be another cache instance, which runs in the same JVM as A. A always talks to B, never directly to C. So this way transactional scope is maintained regardless of which TM you use.
Now B can be tuned with an aggressive eviction policy so it does not maintain much state at all in memory so it doesn't impact the machine very much. B is also configured with a TcpCacheLoader pointing at C. C runs with a TcpCacheServer, which acts as a backing cache to B. So all the cache state is really held in C, but B acts as the API front end for interacting with the cache.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062937#4062937
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062937
18Â years, 11Â months
[JBoss Seam] - Re: selectOneMenu and selectItems problem
by mttu
"pete.muir(a)jboss.org" wrote : Any output from h:messages?
Hi,
message from h:messages is:
"value is not valid"
but why ?
the Converter class:
| @Name("CompanyConverter")
| @Converter
| public class CompanyConverter implements javax.faces.convert.Converter, Serializable {
|
| @Logger
| private Log log;
|
| @In(required = false)
| List<Company> companies;
|
| /*
| * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext,
| * javax.faces.component.UIComponent, java.lang.String)
| */
| public Object getAsObject(FacesContext arg0, UIComponent arg1, String string) throws ConverterException {
| if (string == null || string.length() == 0) {
| return null;
| }
|
| long id = Long.valueOf(string).longValue();
| log.info("[getAsObject] string -> " + string);
| log.info("[getAsObject] id -> " + id);
| log.info("[getAsObject] companies -> " + companies);
| if (companies != null) {
| for (Company referenceData : companies) {
| if (referenceData.getId() == id) {
| log.info("[getAsObject] returning -> " + referenceData);
| return referenceData;
| }
| }
| }
| log.info("[getAsObject] returning -> null" );
| return null;
| }
|
| /*
| * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext,
| * javax.faces.component.UIComponent, java.lang.Object)
| */
| public String getAsString(FacesContext arg0, UIComponent arg1, Object obj) throws ConverterException {
| log.info("[getAsString] obj -> " + obj);
| if (obj == null) {
| return null;
| }
| Company company = (Company) obj;
| log.info("[getAsString] company -> " + company);
| return String.valueOf(company.getId());
| }
|
| }
|
Both methods return not null values.
Any idea ?
Thanks,
Mttu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062936#4062936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062936
18Â years, 11Â months