[JBoss Seam] - I get a exception
by KoniKoni
Please help, i get a exception.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| template="templates/temp.xhtml">
|
|
|
| <ui:define name="main">
|
| <s:div style="margin-top:5px">
| <a4j:form>
|
| <s:validateAll>
|
| <rich:panel>
| <h:panelGroup id="frms">
| <h:panelGrid columns="3">
|
| <h:outputText value="Fabrikat: "/>
|
| <h:panelGroup style="display:block">
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true" converter="#{fahrzeugin.converter4Her}">
| <s:selectItems value="#{herstellerList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
| reRender="modelsel" />
| </h:selectOneMenu>
| </a4j:region>
| </h:panelGroup>
| <h:message for="hrs" />
|
| <h:outputText value="Modell:" />
| <h:panelGroup style="display:block" id="modelsel" >
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu value="#{kfz.kfzmodel}" required="true" converter="#{fahrzeugin.modConverter}">
| <s:selectItems value="#{kfz.hersteller.kfzmodel}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| </h:selectOneMenu>
| </a4j:region>
| </h:panelGroup>
| <h:message for="modelsel" />
|
| <h:outputText value="Filiale:" />
| <h:selectOneMenu id="fillsel" value="#{kfz.filliale}" required="true" converter="#{fahrzeugin.converter}">
| <s:selectItems value="#{fillLists}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| </h:selectOneMenu>
| <h:message for="fillsel" />
|
| </h:panelGrid>
| </h:panelGroup>
|
| </rich:panel>
| <rich:panel style="margin-top:5px">
|
| <h:panelGrid columns="3">
| <h:outputText id="catsel" value="Kategorie"/>
| <h:selectOneMenu value="#{kfz.category}" required="true" >
| <f:selectItem itemValue="cabrio" itemLabel="Cabrio/Roadster"/>
| <f:selectItem itemValue="gelaendewagen" itemLabel="Gelaendewagen/Pickup"/>
| <f:selectItem itemValue="kleinwagen" itemLabel="Kleinwagen"/>
| <f:selectItem itemValue="limousine" itemLabel="Limousine"/>
| <f:selectItem itemValue="sportwagen" itemLabel="Sportwagen/Coupe"/>
| <f:selectItem itemValue="combi" itemLabel="Combi"/>
| <f:selectItem itemValue="van" itemLabel="Van/Kleinbus"/>
| <f:selectItem itemValue="transporter" itemLabel="alle Transporter/LKW"/>
| <f:selectItem itemValue="andere" itemLabel="Andere"/>
| </h:selectOneMenu>
| <h:message for="catsel" />
|
| <h:outputText value="Leistung"/>
| <h:panelGroup><h:inputText id="lstxt" value="#{kfz.leistung}" required="true" />
| <h:selectOneMenu value="#{kfz.kw}">
| <f:selectItem itemValue="true" itemLabel="KW"/>
| <f:selectItem itemValue="false" itemLabel="PS"/>
| </h:selectOneMenu>
| </h:panelGroup>
| <h:message for="lstxt" />
|
| <h:outputText value="Getriebe"/>
| <h:selectOneMenu id="gtsel" value="#{kfz.getriebe}" >
| <f:selectItem itemValue="beliebig" itemLabel="Beliebig"/>
| <f:selectItem itemValue="handschaltung" itemLabel="Handschaltung"/>
| <f:selectItem itemValue="halbaut" itemLabel="Halbautomatik"/>
| <f:selectItem itemValue="auto" itemLabel="Automatik"/>
| </h:selectOneMenu>
| <h:message for="gtsel" />
|
| <h:outputText value="Kraftstoffart"/>
| <h:selectOneMenu value="#{kfz.kraftstoffart}" required="true">
| <f:selectItem itemValue="beliebig" itemLabel="Beliebig"/>
| <f:selectItem itemValue="benzin" itemLabel="Benzin"/>
| <f:selectItem itemValue="diesel" itemLabel="Diesel"/>
| <f:selectItem itemValue="autogas" itemLabel="Autogas"/>
| <f:selectItem itemValue="erdgas" itemLabel="Erdgas"/>
| <f:selectItem itemValue="elektro" itemLabel="Elektro"/>
| <f:selectItem itemValue="hybrid" itemLabel="Hybrid"/>
| <f:selectItem itemValue="wasserstoff" itemLabel="Wasserstoff"/>
| </h:selectOneMenu>
| </h:panelGrid>
|
| </rich:panel>
|
| <rich:panel style="margin-top:5px">
| <h:outputText id="catsel1" value="Ausstattung: "/>
| <h:panelGrid columns="6">
| <h:selectBooleanCheckbox title="Allradantrieb" value="#{kfz.allradantrieb}" /><h:outputText value="Allradantrieb"/>
| <h:selectBooleanCheckbox title="Lederausstattung" value="#{kfz.lederausstattung}" /><h:outputText value="Lederausstattung"/>
| <h:selectBooleanCheckbox title="Stabilitaetskontrolle" value="#{kfz.stabkontrolle}" /><h:outputText value="Stabilitaetskontrolle"/>
| <h:selectBooleanCheckbox title="Anhaengerkupplung" value="#{kfz.anhaengerkupplung}" /><h:outputText value="Anhaengerkupplung"/>
| <h:selectBooleanCheckbox title="Behindertengerecht" value="#{kfz.behindertengerecht}" /><h:outputText value="Behindertengerecht"/>
| <h:selectBooleanCheckbox title="Einparkhilfe" value="#{kfz.einparkhilfe}" /><h:outputText value="Einparkhilfe"/>
| <h:selectBooleanCheckbox title="Elek. Wegfahrsperre" value="#{kfz.elWegfahrsperre}" /><h:outputText value="Elek. Wegfahrsperre"/>
| <h:selectBooleanCheckbox title="Leichtmetallfelgen" value="#{kfz.leichtmetallfelgen}" /><h:outputText value="Leichtmetallfelgen"/>
| <h:selectBooleanCheckbox title="Navigationssystem" value="#{kfz.navigationssystem}" /><h:outputText value="Navigationssystem"/>
| <h:selectBooleanCheckbox title="Partikelfilter" value="#{kfz.partikelfilter}" /><h:outputText value="Partikelfilter"/>
| <h:selectBooleanCheckbox title="Schiebedach" value="#{kfz.schiebedach}" /><h:outputText value="Schiebedach"/>
| <h:selectBooleanCheckbox title="Sitzheizung" value="#{kfz.sitzheizung}" /><h:outputText value="Sitzheizung"/>
| <h:selectBooleanCheckbox title="Standheizung" value="#{kfz.standheizung}" /><h:outputText value="Standheizung"/>
| <h:selectBooleanCheckbox title="Taxi" value="#{kfz.taxi}" /><h:outputText value="Taxi"/>
| <h:selectBooleanCheckbox title="Tempomat" value="#{kfz.tempomat}" /><h:outputText value="Tempomat"/>
| <h:selectBooleanCheckbox title="Xenonscheinwerfer" value="#{kfz.xnwerfer}" /><h:outputText value="Xenonscheinwerfer"/>
| </h:panelGrid>
| </rich:panel>
| </s:validateAll>
|
| <s:div style="margin-top:5px">
| <s:button value="Zurueck" view="/fahrzeug" />
| <h:commandButton value="Aendern" action="#{fahrzeugin.updateKfz()}" />
| <h:commandButton action="#{fahrzeugin.inserKfz}" value="Inserieren" rendered="#{kfz.free4 == false}" />
| <h:commandButton action="#{fahrzeugin.deinserKfz}" value="Deinserieren" rendered="#{kfz.free4 == true}" />
|
| <h:commandButton value="Loeschen" action="#{fahrzeugin.delKfz}" />
|
|
|
| </s:div>
|
| </a4j:form>
| </s:div>
| </ui:define>
| </ui:composition>
|
|
Session:
| public class FahrzeugIn implements FahrzeuginInterface{
|
| @In
| private FacesMessages facesMessages;
|
|
| @PersistenceContext
| private EntityManager em;
|
| @In
| private Context sessionContext;
|
| @In(required=false)
| @Out(required=false)
| private Kfz kfz;
|
| @DataModel
| private List<Kfz> kfzsList;
|
| @DataModel
| private List<Hersteller> herstellerList;
|
|
| @DataModel
| private Set<Filliale> fillLists;
|
| @DataModelSelection("kfzsList")
| private Kfz selectedKfz;
|
| private Converter converter;
|
| private List<Kfzmodel> list4select;
|
|
|
| @Factory("herstellerList")
| @Begin(join=true)
| public void setherstellerList(){
|
| herstellerList = em.createQuery("select h from Hersteller h")
| .getResultList();
| }
|
| public void setKmodel(){
| list4select = kfz.getHersteller().getKfzmodel();
| }
|
| @Factory("kfzsList")
| @Begin(join=true)
| public void setkfzsList(){
| Usr usr = (Usr) sessionContext.get("usr");
| kfzsList = em.createQuery("from Kfz k where k.usr.id = :id")
| .setParameter("id",usr.getId())
| .getResultList();
| }
|
| public String delKfz(){
|
| Usr usr = (Usr) sessionContext.get("usr");
| String usrname = usr.getBname();
| Usr usr1 = (Usr) em.createQuery("from Usr where bname like :bname")
| .setParameter("bname",usrname)
| .getSingleResult();
| usr1.getKfz().remove(this.kfz);
| em.merge(usr1);
|
| Filliale fill = (Filliale) em.find(Filliale.class,this.kfz.getFilliale().getId());
| fill.getKfz().remove(this.kfz);
| em.merge(fill);
|
| Hersteller her = (Hersteller) em.find(Hersteller.class,this.kfz.getHersteller().getId());
| her.getKfz().remove(this.kfz);
| em.merge(her);
|
| Kfzmodel km = (Kfzmodel) em.find(Kfzmodel.class,this.kfz.getKfzmodel().getId());
| km.getKfz().remove(this.kfz);
| em.merge(km);
|
|
| long id = this.kfz.getId();
| this.kfzsList.remove(this.kfz);
| Kfz kfz1 = (Kfz) em.find(Kfz.class,id);
| this.kfz = null;
| em.remove(kfz1);
| kfz1 = null;
|
| return "/fahrzeug";
| }
|
|
| @Factory("fillLists")
| public void setFList(){
| Usr usr = (Usr) sessionContext.get("usr");
| String usrname = usr.getBname();
| Usr usr1 = (Usr) em.createQuery("from Usr where bname like :bname")
| .setParameter("bname",usrname)
| .getSingleResult();
| fillLists = usr1.getFill();
| }
| public String editKfz() {
| kfz = selectedKfz;
| list4select = kfz.getHersteller().getKfzmodel();
| return "/editkfz";
| }
| @End
| public String updateKfz(){
| em.merge(kfz);
| return "/fahrzeug";
| }
| @End
| public String saveKfz() {
| Usr usr = (Usr) sessionContext.get("usr");
| Usr usr1 = em.find(Usr.class,usr.getId());
| usr1.addKfz(kfz);
| em.merge(usr1);
| return "/fahrzeug";
| }
| public String inserKfz() {
| Kfz kfz = em.find(Kfz.class,this.kfz.getId());
| kfz.setFree4(true);
| em.merge(kfz);
| em.flush();
| return "/fahrzeug";
| }
| public String deinserKfz() {
| Kfz kfz = em.find(Kfz.class,this.kfz.getId());
| kfz.setFree4(false);
| em.merge(kfz);
| em.flush();
| return "/fahrzeug";
| }
|
Entity Bean Kfz:
| public class Kfz implements Serializable{
|
| @Id @GeneratedValue
| private Long id;
|
| @ManyToOne
| @JoinColumn(name="hersteller_id")
| private Hersteller hersteller;
|
| @ManyToOne
| @JoinColumn(name="kfzmodel_id")
| private Kfzmodel kfzmodel;
|
| @ManyToOne
| @JoinColumn(name="usr_id")
| private Usr usr;
|
| @ManyToOne
| @JoinColumn(name="fillial_id")
| private Filliale filliale;
|
| @OneToMany(mappedBy="kfz",cascade=CascadeType.ALL, fetch=FetchType.EAGER)
| private Set<Reservierung> reservierung = new HashSet();
|
The Exception:
|
| 20:22:26,587 ERROR [SeamPhaseListener] uncaught exception
| org.jboss.seam.TransactionException: Could not commit transaction
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:323)
| at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPhase(TransactionalSeamPhaseListener.java:45)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:112)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:345)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=kostja-mobil/468, BranchQual=, localId=468] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.EntityNotFoundException: deleted entity passed to persist: [kk.rentform.entity.Kfz#<null>])
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
| at org.jboss.tm.TxManager.commit(TxManager.java:240)
| at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:313)
| at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPhase(TransactionalSeamPhaseListener.java:45)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:112)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:345)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| Caused by: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [kk.rentform.entity.Kfz#<null>]
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:631)
| at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
| at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
| at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
| at org.jboss.tm.TxManager.commit(TxManager.java:240)
| at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:313)
| at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPhase(TransactionalSeamPhaseListener.java:45)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:112)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:345)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
|
|
If the "<h:commandButton value="Loeschen" action="#{fahrzeugin.delKfz}" />" action fired
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036834#4036834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036834
19 years
[JBossCache] - JDBCCache Loader
by swami_venkat
Hi,
we are using JDBC Cache loader as a read only cache. We are pre-loading all the data at the server startup. But we observe that every time we make cache request for reading data in the cache, the configured jdbc cache loader performs a database query (Select sql statement). Initially we thought that it is trying to fetch data for the first time, however behaviour repeats for the subsequent requests.
Can you please explain why the jdbc cache loader behaves in this manner and how to avoid repeated reads to the database.
Further we are seeing a drastic drop in the number of requests that can be handled by the server. Whereas the primary purpose of the cache is to increase the performance. Your help will be very timely.
The cache configuration used is as follows,
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sample TreeCache Service Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ==================================================================== -->
<!-- Defines TreeCache configuration -->
<!-- ==================================================================== -->
jboss:service=Naming
jboss:service=TransactionManager
<!--
Configure the TransactionManager
-->
com.hp.tpf.cos.runtime.TPFCoSTxManagerLookup
<!--
Isolation level : SERIALIZABLE
REPEATABLE_READ (default)
READ_COMMITTED
READ_UNCOMMITTED
NONE
-->
READ_COMMITTED
<!--
Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC
-->
REPL_SYNC
<!--
Just used for async repl: use a replication queue
-->
false
<!--
Replication interval for replication queue (in ms)
-->
0
<!--
Max number of elements which trigger replication
-->
0
<!-- Name of cluster. Needs to be the same for all clusters, in order
to find each other
-->
My-Cluster
<!-- JGroups protocol stack properties. Can also be a URL,
e.g. file:/home/bela/default.xml
-->
<!-- UDP: if you have a multihomed machine,
set the bind_addr attribute to the appropriate NIC IP address, e.g bind_addr="192.168.0.2"
-->
<!-- UDP: On Windows machines, because of the media sense feature
being broken with multicast (even after disabling media sense)
set the loopback attribute to true -->
<UDP mcast_addr="224.1.2.3" mcast_port="45566"
ip_ttl="64" ip_mcast="true"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false" bind_addr="15.76.223.149"/>
<PING timeout="2000" num_initial_members="3"
up_thread="false" down_thread="false"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<!-- <FD shun="true" up_thread="true" down_thread="true" />-->
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
max_xmit_size="8192" up_thread="false" down_thread="false"/>
<UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
down_thread="false"/>
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="false" down_thread="false"/>
<FRAG frag_size="8192"
down_thread="false" up_thread="false"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
<!--
Whether or not to fetch state on joining a cluster
-->
true
<!--
The max amount of time (in milliseconds) we wait until the
initial state (ie. the contents of the cache) are retrieved from
existing members in a clustered environment
-->
5000
<!--
Number of milliseconds to wait until all responses for a
synchronous call have been received.
-->
10000
<!-- Max number of milliseconds to wait for a lock acquisition -->
15000
<!-- Name of the eviction policy class. Not supported now. -->
<!--
org.jboss.cache.loader.bdbje.BdbjeCacheLoader
c:\tmp\bdbje
true
/
-->
<!--
org.jboss.cache.loader.FileCacheLoader
/tmp
true
/
-->
<!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
false
<!-- comma delimited FQNs to preload -->
/
<!-- are the cache loaders shared in a cluster? -->
true
<!-- we can now have multiple cache loaders, which get chained -->
<!-- the 'cacheloader' element may be repeated -->
org.jboss.cache.loader.JDBCCacheLoader
<!-- same as the old CacheLoaderConfig attribute -->
cache.jdbc.table.name=TPFCoSProvCache
cache.jdbc.table.create=false
cache.jdbc.table.drop=false
cache.jdbc.fqn.column=fqn
cache.jdbc.fqn.type=varchar(255)
cache.jdbc.node.column=node
cache.jdbc.node.type=blob
cache.jdbc.parent.column=parent
cache.jdbc.driver=oracle.jdbc.OracleDriver
cache.jdbc.url=jdbc:oracle:thin:@msdp1.india.hp.com:1521:TPFDB
cache.jdbc.user=dharani
cache.jdbc.password=dharani
<!-- whether the cache loader writes are asynchronous -->
false
<!-- only one cache loader in the chain may set fetchPersistentState to true.
An exception is thrown if more than one cache loader sets this to true. -->
false
<!-- determines whether this cache loader ignores writes - defaults to false. -->
false
<!-- if set to true, purges the contents of this cache loader when the cache starts up.
Defaults to false. -->
false
<!-- Uncomment to get a graphical view of the TreeCache MBean above -->
<!-- -->
<!-- jboss.cache:service=TreeCache-->
<!-- jboss.cache:service=TreeCache-->
<!-- -->
We are seeing this issue in 1.2.x and 1.4.1SP3. Is it because a get call always goes to the persistent store?
Thanks & Regards,
Swami
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036829#4036829
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036829
19 years
[JBoss Seam] - Testing view syntax
by matt.drees
I created a somewhat simple test to make sure all the view files are compilable by facelets. It really only checks syntax (not el bindings, etc), but maybe this will prove useful to people anyway.
(It requires commons-io)
CompileAllPagesTest.java:
| import java.io.File;
| import java.util.Collection;
|
| import org.apache.commons.io.FileUtils;
| import org.jboss.seam.log.Log;
| import org.jboss.seam.log.Logging;
| import org.testng.annotations.Test;
|
| import com.sun.facelets.Facelet;
| import com.sun.facelets.FaceletFactory;
|
| public class CompileAllPagesTest extends FaceletTest {
|
| private Log log = Logging.getLog(CompileAllPagesTest.class);
|
| @SuppressWarnings("unchecked")
| @Test
| public void testLoginPage() throws Exception{
| File viewDir = new File(rootDir);
|
| Collection<File> files = FileUtils.listFiles(viewDir, new String[]{"xhtml"}, true);
| for (File viewFile : files ){
| String path = viewFile.getPath();
| String viewId = path.replaceFirst(rootDir, "").replace('\\', '/');
| log.debug("testing view " + viewId);
| Facelet facelet = FaceletFactory.getInstance().getFacelet(viewId);
| assert facelet != null : "created facelet for view " + viewId + " is null!";
| createComponentTree(viewId, facelet);
| }
| }
| }
|
|
FaceletTest.java:
| public class FaceletTest {
|
| public static final String rootDir = "view";
|
| @Configuration(beforeTest= true)
| public void setupFaceletFactory() throws IOException {
| assert FaceletFactory.getInstance() == null;
| ResourceResolver simpleResolver = new ResourceResolver() {
|
|
| public URL resolveUrl(String path) {
| String urlString = rootDir + path;
| File file = new File(urlString);
| assert file != null;
| URL url = null;
| try {
| url = file.toURL();
| } catch (MalformedURLException e) {
| throw new RuntimeException("bad url: " + urlString, e);
| }
| return url;
| }
|
| };
|
| DefaultFaceletFactory defaultFaceletFactory = new DefaultFaceletFactory(
| new SAXCompiler(), simpleResolver);
| FaceletFactory.setInstance(defaultFaceletFactory);
| assert FaceletFactory.getInstance() != null;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036828#4036828
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036828
19 years
[Installation, Configuration & Deployment] - Re: Setting/Finding Class Path Location
by PeterJ
You might have seen my mug shot in the list of committers (I work on the new admin console, and supply the occasional patch). But I work for Unisys. Mainly I don't get to develop much any more but I do get to dabble in various open source technologies, especially around JBoss AS and the Java EE stack. I answer questions in the forum as much for my own learning as for helping others.
Sounds like you need to look into Linux. The upgrades are free. (By the way, I would not pay a penny to upgrade to Vista, visually pleasing but full of bugs (Explorer crashes on me at least twice a day; I'm running it at work) and quirks (I have a loooong list).) I know someone who buys cheap older PCs on eBay and puts Linux on them and build his own privatet raining network that way. Since it is Java you are researching, it works the same on Windows as Linux. Ditto for Perl and PHP. And before someone else says it, yes in many cases those things work much better on Linux.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036825#4036825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036825
19 years
[Security & JAAS/JBoss] - NPE in ExtendedFormAuthenticator
by leegreiner
I belive I have come across an issue when using the ExtendedFormAuthenticator in 4.0.5.GA. When a user sits on the login page for too long and their session expires the following NullPointerException is thrown in ExtendedFormAuthenticator.authenticate():
13:44:15,765 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.jboss.web.tomcat.security.ExtendedFormAuthenticator.authenticate(ExtendedFormAuthenticator.java:104)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
The session appears to be null and an attempt is made to remove a note from the session thereby causing the NPE. Earlier references to the session are enclosed by if(session != null). The one attempting to remove the note is not.
Any comments?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036822#4036822
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036822
19 years