Hibernate and ora_rowscn

We are trying to implement optimistic locking through the used of ORA_ROWSCN, and the developers are running into the problem that hibernate is incrementing the ora_rowscn number when updates are done on the row.
Develpers don't see a way to make using ORA_ROWSCN work with the second-level cache. If they could tell Hibernate to invalidate the cache when updates are done instead of put the updated entity directly into the cache, they think they could make it work. Unfortunately they haven't been able to find a way to modify the cache's behavior.
Has anybody run into this problem?
I will appreciate any suggestions on how to make hibernate to work with ora_rowscn.
We are using Spring 2.5.6 with JPA Hibernate Entity Manager 3.3.2 running on Tomcat 6, we are not using OC4J.
We are using Atomikos 2.1.7 for our transaction manager, and here are some of our hibernate settings:
jpa.hibernate.max_fetch_depth=2
jpa.hibernate.default_batch_fetch_size=16
jpa.hibernate.order_updates=true
jpa.hibernate.connection.isolation=4
jpa.hibernate.generate_statistics=true
jpa.hibernate.jdbc.use_get_generated_keys=false
jpa.hibernate.jdbc.fetch_size=0
jpa.hibernate.jdbc.batch_size=30
jpa.hibernate.connection.release_mode=after_statement
jpa.hibernate.default_schema=
jpa.hibernate.strict_jpaql=true
jpa.hibernate.cache.use_second_level_cache=true
jpa.hibernate.cache.use_query_cache=true
Thanks in advance for any help on this.

thanks for your reply.
We are already doing that, but even with that setting we still have the problem and we cannot get hibernate to not increment the ora_rowscn.
This is what we have in our code.
@Version
@Column(name = "ORA_ROWSCN", insertable = false, updatable = false)
@org.hibernate.annotations.Generated(GenerationTime.ALWAYS)
private Long version;
Did anybody run into this problem with hibernate using ora_rowscn?
Any help will be greatly appreciated.
Thanks

Similar Messages

  • Integration with Hibernate and KODO

    I'm aware that Coherence has some optimisation for distributed queries with indices etc, but are Hibernate/Kodo able to benefit from this? If you have any statistics or white papers covering query performance and optimisation between Hibernate and Kodo I'd be very interested.
         (From Paul Woodward).

    Hi Paul,
         At present, Kodo and Hibernate do not have direct support for our distributed query features.
         Note that if you use Coherence as a plug-in to your ORM provider, you still have the option of maintaining separate Coherence caches on which you may use distributed queries.
         Jon Purdy
         Tangosol, Inc.

  • Satellite L505D-S5965 got shutdown, hibernate and sleep problem after Windows 7 upgrade

    I bought my Satellite L505D-S5965 last August. Everything worked fine on Vista. Last month I upgraded it to Windows 7 (Home premium, build 7600), then it started having problem to shutdown, hibernate and sleep. Half of the time, it will shutdown, hibernate or sleep just fine, however, the other half of the time it just never turns off.
    For shutdown, it will go to the shutdown screen for 10 minutes until the a blue screen comes up, telling something about windows experience a crash and dumping memory, then it restarts itself.
    For hibernation and sleep, it will go to the normal black screen but the hard disk light never turns off (i.e. the hardisk would keep running forever).
    It will be a big help if someone can help me with that, I just don't want to keep doing the "hard turn off".

    Hey thats great posting and detailed, thank you! :)
    Im wondering how you found it out.
    But I want to add something: Before you do or change something in Windows registry, make a backup of it. In worst case you restore the old Windows registry. Just to be sure ;)

  • I put my computer to hibernate and i stoped to download lion. How i restart the download?

    I put my computer to hibernate and i stoped to download lion. How i restart the download?

    Read here >  Mac App Store: How to resume interrupted downloads

  • EJB annotations are not documented , versus Hibernate and JBoss seam do

    I have an application that contains EJB3 annotations, Hibernate Annotations and JBoss Seam annotations in the java code.
    When I generate the javadoc, the Hibernate and JBoss Seam annotations show by the side of the members and methods who has them, like, for example
    @Name(value="authenticator")
    @Scope(value=SESSION)
    @AutoCreate
    public class AuthenticatorImpl
    <dt>extends java.lang.Object </dt><dt>implements </dt>
    or, another example,
    h3. facesContext{noformat}@In(value="org.jboss.seam.faces.facesContext",
    create=true)
    private javax.faces.context.FacesContext facesContext{noformat}
    However, none of the EJB3 annotations included in the code are being dieplayed in the javadocs.
    Does someone knows if there is any reason why this should happen?
    This is my javadoc command:
    javadoc -version -d doc2 -sourcepath src\model;src\action -classpath "lib/core.jar;lib/jboss-embedded-api.jar;lib/jsr250-api.jar;classes/test;lib/hibernate.jar;lib/log4j.jar;lib/testng.jar;lib/ojdbc14.jar;lib/hibernate-commons-annotations.jar;lib/hibernate-search.jar;lib/hibernate-entitymanager.jar;lib/drools-compiler.jar;lib/richfaces-impl.jar;lib/jboss-cache.jar;lib/jboss-seam.jar;lib/janino.jar;lib/hibernate-annotations.jar;lib/richfaces-api.jar;lib/ejb-api.jar;lib/mvel14.jar;lib/jbosssx.jar;bootstrap;lib/jbpm-jpdl.jar;lib/commons-beanutils.jar;lib/lucene-core.jar;lib/jgroups.jar;lib/jsf-api.jar;lib/jboss-el.jar;lib/el-api.jar;lib/antlr-runtime.jar;lib/jstl.jar;classes/model;lib/antlr.jar;lib/persistence-api.jar;lib/jsf-facelets.jar;classes/action;lib/richfaces-ui.jar;lib/mail.jar;lib/drools-core.jar;lib/jboss-seam-debug.jar;lib/hibernate-validator.jar;lib/servlet-api.jar;lib/jta.jar" -private mil.navy.med.rota.model mil.navy.med.rota.security mil.navy.med.rota.action.util mil.navy.med.rota.action.util.mpd mil.navy.med.rota.action.mpd mil.navy.med.rota.action.referrals mil.navy.med.rota.model.referrals mil.navy.med.rota.action.trainman mil.navy.med.rota.model.trainman -use -version -author -splitindex
    The version of javadoc used is
    Standard Doclet 1.6.0.0_3
    Aticipated thanks!

    Nevermind, the issue was that my persistence.xml did not contain the following property:
    <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
    Therefore, the tables were not being created upon deployment.
    Still, I would expect to see entity beans listed in the WebLogic console.

  • Wht is the difference between hibernate and EJB 3.0

    What are the main features differences in Hibernate and EJB3.0. What one should we prefer to use. Can some one provide me links to work and learn on these two technologies in depth.

    Hello all,
    Apart from what we are discussing above there is one more intresting feature which allows to work with any database without modifying the code, this is becuase of hibernate layer in application. Hibernate sits in between you application's logic and database, and you access your database with the help of objects (POJO) and write the data accesing queries in Object form(HQL - Hibernate Query Language) which is indepened of all database. whenever you want to chage your backed database just change the configuration files(hibernate.cfg.xml) and you are done. Isnt is cool feature, you dont need to worry about the underlying database.
    Surya
    --Idea's can change everything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Question concerning Hibernate and EJB3 Annotation overlap

    Consider the following, from the JBoss EJB3 Tutorial:
    @OneToOne(cascade = {CascadeType.ALL})
    @JoinColumn(name = "ADDRESS_ID")
    public Address getAddress()
    return address;
    The above two annotations are applicable, using JBoss Libraries and Hibernate Libraries.
    If one wishes to use both JBoss EJB3 annotations, and Hibernate with Annotations,
    do annotations need to be used twice? Naturally, if Hibernate and Jboss identical
    annocations are imported, there will be a compilation conflict error.
    I know that full package names can be used on annotations to avoid that.
    So, if I used the above code snippet, and I want to Hibernate using
    the equivalent hibernate annotations, what should one ideally
    do and why?

    Zac1234 wrote:
    I know that Netbeans automatically may build and deploy the completed
    EJB using ant to gather resources behind the scenes.
    which is why you shouldn't use it to learn about things. It hiding things from you means you don't learn all you need to know.
    with V2.1, regardless as to the container software that I'm deploying the bean to,
    am I now required to have an appropriate XML deployment descriptor,
    yup, and the ANT build file is not it.
    or is this something unique to jsps/servlets?Not the same thing. Different deployment descriptors for different applications.

  • Which better between Hibernate and EJB

    Hello i am a new begginer in J2EE, i have some question
    Which better between Hibernate and EJB ?
    i still confuse when must using Hibernate or EJB, because as i know in EJB it can use datasource which can i map to Entity bean.
    this function is same as Hibernate as i know.
    if my concept is wrong please correct my concept
    thx in advanced

    fbrayuki.darmanto wrote:
    Hello i am a new begginer in J2EE, i have some question
    Which better between Hibernate and EJB ?Just to clarify, you mean EJB3.x, not the earlier versions.
    Define "better".
    They're actually pretty similar.
    If you use Hibernate instead of EJB3 you don't need a full-blown Java EE app server. You can deploy apps on a servlet/JSP engine or on the desktop.
    i still confuse when must using Hibernate or EJB, because as i know in EJB it can use datasource which can i map to Entity bean.
    this function is same as Hibernate as i know.
    if my concept is wrong please correct my concept
    thx in advanced%

  • Hibernate and Oracle Lite 10g

    Has anyone been able to get Oracle Lite 10g working with Hibernate?

    What problems are you having? You are using Webtogo OC4J right?
    It has been a while since I worked with Hibernate and in theory, it should work with any relational database. Since Oracle Lite closely resembles Oracle, I can't see an issue with the database, just the container that it is running in.
    <property name="connection.driver_class">oracle.lite.web.WTGJdbcDriver</property>
    <property name="connection.url">jdbc:oracle:webtogo</property>
    <property name="connection.username"></property>
    <property name="connection.password"></property>

  • Mapping Problem using hibernate and annotations

    Hi,
    i am German student and new to hibernate. I established a mn conetction between to entities using hbm.xml mapping files. now I try to create the same connection applying annotations. unfortunately it does not work and I do not now why. First my error message followed by my classes and xml's:
    Initial SessionFactory creation failed.org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:39)
    at services.HibernateUtil.getSessionFactory(HibernateUtil.java:20)
    at test.Test.main(Test.java:20)
    Caused by: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:552)
    at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:517)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:36)
    ... 2 more
    package domain;
    import java.util.LinkedList;
    import java.util.List;
    import domain.Termin;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "PERSON")
    public class Person {
       private long id;
       private String vorname;
       private String nachname;
       private List<Termin> termine=new LinkedList<Termin>();
       public Person() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getNachname() {
          return nachname;
       public void setNachname(String nachname) {
          this.nachname = nachname;
       public String getVorname() {
          return vorname;
       public void setVorname(String vorname) {
          this.vorname = vorname;
       public void addTermin(Termin termin){
          termine.add(termin);
       @ManyToMany(mappedBy="person")
       public List<Termin> getTermine() {
          return termine;
       public void setTermine(List<Termin> termine) {
          this.termine = termine;
    package domain;
    import java.util.ArrayList;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "TERMIN")
    public class Termin {
       private long id;
       private String titel;
       private Person eigentuemer;
       private List<Person> teilnehmer= new ArrayList<Person>();
       public void addTeilnehmer(Person person){
          teilnehmer.add(person);
       @ManyToMany
       public List<Person> getTeilnehmer() {
          return teilnehmer;
       public void setTeilnehmer(List<Person> teilnehmer) {
          this.teilnehmer = teilnehmer;
       public Termin() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getTitel() {
          return titel;
       public void setTitel(String titel) {
          this.titel = titel;
       public Person getEigentuemer() {
          return eigentuemer;
       public void setEigentuemer(Person eigentuemer) {
          this.eigentuemer = eigentuemer;
    package test;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    import org.hibernate.tool.hbm2ddl.SchemaExport;
    import services.HibernateUtil;
    import domain.Person;
    import domain.Termin;
    public class Test {
       public static void main(String[] args) {
          Session session = null;
          HibernateUtil.setRecreateDB(true);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          /*      Person person1 =new Person();
          person1.setNachname("P1");
          Transaction transaction = session.beginTransaction();
          session.save(person1);
          transaction.commit();
          Person person2 =new Person();
          person2.setNachname("P2");
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(person2);
          transaction.commit();
          Termin termin1 =new Termin();
          termin1.setTitel("T1");
          termin1.setEigentuemer(person1);
          termin1.addTeilnehmer(person1);
          termin1.addTeilnehmer(person2);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(termin1);
          transaction.commit();
       Termin termin2 =new Termin();
          termin2.setTitel("t2");
          termin2.setEigentuemer(person1);
          termin2.addTeilnehmer(person1);
          termin2.addTeilnehmer(person2);
          transaction = session.beginTransaction();
          session.save(termin2);
          transaction.commit();
          session.close();
    package services;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.AnnotationConfiguration;
    import domain.Person;
    import domain.Termin;
    public class HibernateUtil {
       private static boolean recreateDB = false;
       public static void setRecreateDB(boolean recreateDB) {
          HibernateUtil.recreateDB = recreateDB;
       public static SessionFactory getSessionFactory() {
          if (sessionFactory == null) {
             sessionFactory = sessionFactory("hibernate.cfg.xml");
          return sessionFactory;
       private static SessionFactory sessionFactory = null;
       private static SessionFactory sessionFactory(String configurationFileName) {
          try {
             AnnotationConfiguration annotationConfiguration =
                new AnnotationConfiguration()
                .addAnnotatedClass(Person.class)
                .addAnnotatedClass(Termin.class);
             if (recreateDB) annotationConfiguration.setProperty("hibernate.hbm2ddl.auto", "create");
             annotationConfiguration.configure();
             return annotationConfiguration.buildSessionFactory();
          } catch (Throwable ex){
             System.err.println("Initial SessionFactory creation failed." + ex);
             throw new ExceptionInInitializerError(ex);
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-configuration
        PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory >
          <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
            <property name="hibernate.connection.password">application</property>
            <property name="hibernate.connection.url">jdbc:mysql://localhost/test</property>
            <property name="hibernate.connection.username">application</property>
            <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
           <property name="current_session_context_class">thread</property>
          <property name="hibernate.show_sql">true</property>
        </session-factory>
    </hibernate-configuration>

    The error message is pretty much telling you the problem:
    mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    This tells you that there's a mappedBy setting on the Person class's termine property annotation, and that the property it's referring to (the person property of the Termin class) doesn't exist.
    @ManyToMany(mappedBy="person")
    public List<Termin> getTermine() {
       return termine;
    }If we have a look at the Termin class, indeed it has the following properties:
    id
    teilnehmer
    titel
    eigentuemerAnd no person property. Remember, a property is defined by the existence of a get/set pair for the name. It's unrelated to the types returned by them and the private variables implementing them.
    mappedBy has the equivalent effect to the inverse property in a hbm.xml mapping file - it defines which entity's property will cause the foreign key value to be updated (persisting the relationship to the database). From the context of your code, I'm guessing you really want the annotation to read:
    @ManyToMany(mappedBy="teilnehmer")

  • Software for suspend/hibernate and power management?

    After working with Arch on my desktop pc for a while, I today installed it on my laptop, as well. Everything works fine so far, but after reading through a lot of articles on the wiki and threads on this board, I'm a little confused about which tools I should use for hibernate/suspend and power management?
    Cpufreq-utils, acpid, pm-utils, laptop-mode-tools, etc. What do you recommend for use?
    Thanks in advance!
    Last edited by mamr (2008-10-25 09:07:14)

    All that you listed there have different functions. I use all the above on my laptop. Cpufreq-utils enables the frequency scaling, pm-utils (should) enables suspend and/or hibernate, laptop-mode-tools adds some power management functions, etc. Anyways, they're all useful for a laptop. Install, tweak, ask questions
    Good luck!
    Scott

  • Multiple Database configurations with Hibernate and caching

    Hi,
    I am building an webservice app which has 2 different DBs( Oracle and DB2). Please let me know whats the best way of designing the hibernate layer to access both the DBs ; I have some cross reference tables in both of them.
    I am planning to create a logical model of the physical DB model ( combining both Oracle and DB2) and use property files or some configuration to map my logical to the actual physical table. What would be the best design for this? Do you recommend caching these conversion values?
    Please let me know the best practice / way to work on my above situation.
    fyi - I am neither a novice nor an expert in J2EE.

    I have the same experience. I can connect to the database of the inital setup but then I try to create a second DB connection with
    Create the connection
    java -jar apex.war setup --database edwdev1
    Sep 28, 2012 5:08:04 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /space/sw/oracle/products/apex/2.0.0/config/apex
    Enter the name of the database server [localhost]:ddb001-v.maximusbchealth.local
    Enter the database listen port [1521]:1521
    Enter 1 to specify the database service name, or 2 to specify the database SID [1]:1
    Enter the database service name:apex_edwdev1.maximusbc.ca
    Enter the database user name [APEX_PUBLIC_USER]:APEX_PUBLIC_USER
    Enter the database password for APEX_PUBLIC_USER:
    Confirm password:
    Enter 1 to enter passwords for the RESTful Services database users (APEX_LISTENER,APEX_REST_PUBLIC_USER), 2 to use the same password as used for APEX_PUBLIC_USER or, 3 to skip this step [1]:3
    Sep 28, 2012 5:10:12 PM oracle.dbtools.common.config.file.ConfigurationFiles update
    INFO: Updated configurations: apex_al, apex_rt, apex, edwdev1, edwdev1_al, edwdev1_rt
    Then I create a routing based on theRequest Path Prefix:
    java -jar apex.war map-url --type base-path /edwdev1 edwdev1
    Sep 28, 2012 5:12:32 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /space/sw/oracle/products/apex/2.0.0/config/apex
    oracle@vs-dapp041:/sw/oracle/products/apex/2.0.0$
    Everything seems fine but when I try to access the second db I get:
    http://vs-dapp041.maximusbchealth.local:7501/apex/edwdev1 => 404 not found
    I am going to be at Open World next week and see if I can talk so someone at the apex stand there.

  • How to connect to different databases in hibernate and mysql

    I have a question maybe someone can help me, I need to MAKE A java Enforcement (Desktop) Using Hibernate Where can create a Database, and then allow me to open or connect to the database I want, let's say I have two databases schedules1 one call and another call Horarios2, if I give open Horario1 ps I load the records that database, if anyone can give me ideas, or some articles where I will be grateful I can hayar information, I am using Mysql

    http://hibernate.org/docs

  • JSF - spring - hibernate and session

    Hi,
    I'm currently using hibernate spring and JSF
    1/ the first problem
    In the JSF common header page I try to test if a bean is in the session scope in order to show login or logout link, and the test always fails : the logout link is always displayed.
    the JSF page :
    <f:subview id="header" >
        <h:form id="headerForm">
            <table cellspacing="0" width="100%">
        <tr>
            <td align="left" valign="middle">
                  <a href="front.jsf"><img border="0" src="images/logo1.jpg"/></a>
            </td>
        <td align="right" valign="middle"> <br>
       <!--<a href="front.jsf" rendered="#"> Accueil<</a> -->
        <c:choose>
                    <c:when test="${empty sessionScope.accountBean}">
                        <h:commandLink action="Sign on">
                            <h:outputText value="Sign on"/>
                        </h:commandLink>  
                    </c:when>
                    <c:otherwise>
                        <h:commandLink id ="logout" action="#{accountBean.logoutAction}" >
                             <h:outputText value="log out"/>
                        </h:commandLink>
                   </c:otherwise>
                </c:choose>
            </td>
        </tr>
    </table>
    <table cellspacing="0" width="100%">
        <tr>
            <td>
                <hr color="#99ca3c"  size="5" noShade SIZE=1>
            </td>
        </tr>
    </table>
         </h:form>
    </f:subview>The accountBean code :
    public class AccountBean extends BaseBean{
    //private Logger log = Log.getLog(this);
        private String uid;
        private String password;
        private boolean loggedIn;
        private AdminService adminService;
        private Admin admin;
        public AccountBean() {
            this.logger.debug("Authentication");
            this.loggedIn = false;
            uid=null;
            password=null;
           // admin=new Admin();
    public String loginAction() {
              try {
                        this.logger.debug("loginAction");
                         admin = adminService.login(this.uid, this.password);
                                    //this.serviceLocator.getUserService().login(this.username, this.password);
                   if (admin != null) {
                                if("".equals(admin.getUid())|| "".equals(admin.getPassword())){
                                 this.loggedIn=false;
                                    String msg = "Le mot de passe et l'identifiant doivent etre saisis ";
                        addErrorMessage(msg + ", saississez un mot de passe et un identifiant corrects");
                                 return NavigationResults.RETRY;
                                else{
                        this.loggedIn = true;
                                    HttpSession session = SessionUtil.getSession();
                                    session.setAttribute("Admin", this.uid);
                        return NavigationResults.SUCCESS;
                   else {
                        this.loggedIn = false;
                        String msg = "Le mot de passe est incorrect ";
                        addErrorMessage(msg + ", saississez un mot de passe correct");
                        this.logger.debug(msg);
                        return NavigationResults.RETRY;
              catch (UsernameNotExistException ue) {
                   String msg = "L'identifiant (login) est incorrect";
                   this.logger.info(msg);
                   addErrorMessage(msg + ", ressaysissez votre identifiant.");
                   return NavigationResults.RETRY;
              catch (Exception e) {
                   this.logger.error("Could not log in user.", e);
                   addInfoMessage("Could not log in user: Internal Error");
                   return NavigationResults.FAILURE;
          * The backing bean action to logout a user.
          * @return the navigation result
         public String logoutAction() {
              //this.clear();
               FacesContext fc = FacesContext.getCurrentInstance();
               HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);
               session.invalidate();
              this.logger.debug("Logout successfully.");
              return NavigationResults.MAIN;
        public String getPassword() {
            return password;
        public void setPassword(String password) {
            this.password = password;
        public String getUid() {
            return uid;
        public void setUid(String uid) {
            this.uid = uid;
        public Admin getAdmin() {
            return admin;
        public boolean getLoggedIn() {
            return loggedIn;
        public void setLoggedIn(boolean loggedIn) {
            this.loggedIn = loggedIn;
        public void setAdminService(AdminService adminService) {
            this.adminService = adminService;
    }the faces managed bean configuration
    <managed-bean-name>accountBean</managed-bean-name>
        <managed-bean-class>fr.cbmjadmin.views.bean.AccountBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
         <property-name>adminService</property-name>
                <value>#{adminService}</value>
        </managed-property>2/ the second problem :
    my application shows a list of datas.
    I log on the application , i update this list outside the application ( by using sql command) , i try to list my data using the application : the application does not reflect the modifications. I logout using the log out link, then i log on and the application does not reflect the modifications.
    what happens?
    How could I resove these problems.
    How can i logout properly?
    how can i show logout link when the user is logged in? and hide the log out link when the user is logout
    Thanks.

    It depends on how you want to reprecate the session btwn instances or cluters
    there are three kinds File System, Memory to Memory, HA
    You can configure it from this property in the admin console
    Configuration on a cluster -> Availability Service -> Web Container Availability -> Persistence Type:

  • Persistence and hibernate (and maybe XFire)

    Sorry didnt know in which forum to post this.
    I have a very weird problem. We are using Springframework with XFire and Hibernate. All Database rows are implemented as Persistence Objects for Hibernate. So far it works well.
    We transfer this persistent objects over XFire between several Services which works too. But as soon as there is "Boolean" (NOT boolean) type involved the value stored in Boolean variable ist lost after transferring over XFire. So at the target service always null arrives as variable value.
    It's important to note that this strange behaviour only applies to persistence objects, but not to normal objects transferred over XFire.
    Maybe someone encountered this problem too and has a solution for it :(

    as mentioned already: difference between 2.6.35.6 and 2.6.35.7 in one patch for Xen:
    commit b0dd220aefe1ab80823cf13e9588c64fec151488
    Author: James Dingwall <[email protected]>
    Date:   Mon Sep 27 09:37:17 2010 +0100
        Xen: fix typo in previous patch
        Correctly name the irq_chip structure to fix an immediate failure when booting
        as a xen pv_ops guest with a NULL pointer exception. The missing 'x' was
        introduced in commit [fb412a178502dc498430723b082a932f797e4763] applied to
        2.6.3[25]-stable trees.  The commit to mainline was
        [aaca49642b92c8a57d3ca5029a5a94019c7af69f] which did not have the problem.
        Signed-off-by: James Dingwall <[email protected]>
        Reported-by: Pawel Zuzelski <[email protected]>
        Tested-by: Pawel Zuzelski <[email protected]>
        Signed-off-by: Greg Kroah-Hartman <[email protected]>
    so you may as well stay with 2.6.35.6 if you have less problems with it but your is not related to a bug introduced to 2.6.35.7
    also I don't have any issues with 2.6.35.7 so maybe there is something about your config?
    Last edited by broch (2010-10-05 12:59:47)

Maybe you are looking for

  • Support Package Stacks Best Practice

    Good morning all, We're at the start of a mySAP ERP implementation and we'd like to set a strategy as regards how we implement SP Stacks. We are only using the base mySAP ERP functionality; we're not using the HR, Retail, Public Services extensions.

  • How to retreive resultset of WCM_PLACEHOLDER service using ridc api

    Hi,    I am trying to call WCM_PLACEHOLDER  service using ridc api. I was able to set dataFileDocName and templateID, but was unable to retreive the result set, since I am not sure with which name should I have to search in the result set. AS like GE

  • Creating a Oracle Form as a Spreadsheet

    Has anyone created an Oracle Form to function as a spreadsheet? Thank you.

  • Why isn't Thunderbird for Mac updating since v17.0.4?

    I been having trouble with emails not marking as read, replied to, and when I checked the version I'm running it shows 17.0.4 and the update log say it hasn't updated since last March. The current version is v24? I have preferences set to auto update

  • CS5 Panel Developer Guide?

    I am ready to upgrade to CS5, but I have a couple custom panels that I cannot do without.The CS4 panels made with Flex will not work at all. When can we get a panel Developer's Guide for CS5?