geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r991501 [2/3] - in /geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test: ./ webbean-jpa-test/ webbean-jpa-test/src/ webbean-jpa-test/src/main/ webbean-jpa-test/src/main/java/ webbean-jpa-test/src/main/java/org/ webbean-jpa-tes...
Date Wed, 01 Sep 2010 11:02:58 GMT
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.controller.admin;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.apache.webbeans.reservation.bindings.EntityManagerQualifier;
+import org.apache.webbeans.reservation.bindings.intercep.Transactional;
+import org.apache.webbeans.reservation.entity.Hotel;
+import org.apache.webbeans.reservation.entity.Reservation;
+import org.apache.webbeans.reservation.entity.Users;
+
+/**
+ * Contains admin related activities.
+ */
+@Named
+@RequestScoped
+public class AdminController
+{
+    private @Inject @EntityManagerQualifier EntityManager entityManager;
+    
+    @Transactional
+    public void createNewHotel(String name, int star, String city, String country)
+    {        
+        
+        if(name.equals("") || city.equals("") || country.equals(""))
+        {
+            return;
+        }
+        Hotel hotel = new Hotel();
+        hotel.setCity(city);
+        hotel.setCountry(country);
+        hotel.setName(name);
+        hotel.setStar(star);
+        
+        entityManager.persist(hotel);
+        
+    }
+    
+    @SuppressWarnings("unchecked")
+    public List<Hotel> getHotels()
+    {
+        Query query = this.entityManager.createQuery("select h from Hotel h");
+        
+        return  (List<Hotel>)query.getResultList();
+    }
+    
+    @SuppressWarnings("unchecked")
+    public List<Users> getUsers()
+    {
+        Query query = this.entityManager.createQuery("select u from Users u");
+        
+        return  (List<Users>)query.getResultList();
+        
+    }
+
+    /**
+     * Returns hotel with given id.
+     * 
+     * @param id hotel id
+     * @return hotel
+     */
+    public Hotel getHotelWithId(int id)
+    {
+        Hotel hotel = this.entityManager.find(Hotel.class, id);
+        
+        return hotel;
+    }
+    
+    @SuppressWarnings("unchecked")
+    public List<Users> getReservationsWithHotel(int hotelId)
+    {
+        Query query = this.entityManager.createQuery("select u from Users u join fetch u.reservations r where r.id=:id");
+        query.setParameter("id", hotelId);
+        
+        List<Users> users = query.getResultList();
+        
+        return users;
+    }
+    
+    public Set<Hotel> getReservationsWithUser(int userId)
+    {
+        Query query = this.entityManager.createQuery("select u from Users u where u.id=:id");
+        query.setParameter("id", userId);
+        
+        Users user = (Users)query.getSingleResult();
+        
+        Set<Hotel> hotels = new HashSet<Hotel>();
+        
+        Set<Reservation> reservations = user.getReservations();
+        
+        for(Reservation reserve : reservations)
+        {
+            hotels.add(reserve.getHotel());
+        }
+        
+        return hotels;
+    }
+    
+    
+    @Transactional
+    public void updateHotel(int id, String name, int star, String city, String country)
+    {
+        Hotel hotel = this.entityManager.find(Hotel.class, id);
+        
+        hotel.setName(name);
+        hotel.setStar(star);
+        hotel.setCountry(country);
+        hotel.setCity(city);
+    }
+    
+    @Transactional
+    @SuppressWarnings("unchecked")
+    public void deleteHotel(int id)
+    {
+        Hotel hotel = this.entityManager.find(Hotel.class, id);
+        
+        this.entityManager.remove(hotel);
+        
+        Query query = this.entityManager.createQuery("select r from Reservation r where r.hotel.id=:id");
+        query.setParameter("id",hotel.getId());
+        
+        List<Reservation> res = query.getResultList();
+        
+        for(Reservation r : res)
+        {
+            this.entityManager.remove(r);
+        }
+        
+    }
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/admin/AdminController.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.controller.api;
+
+import org.apache.webbeans.reservation.entity.Users;
+
+public interface ILoginController
+{
+    public Users checkLogin(String userName, String password);
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/ILoginController.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.controller.api;
+
+import org.apache.webbeans.reservation.entity.Users;
+
+public interface IRegisterController
+{
+    public Users registerUser(String userName, String password, String name, String surname , int age, boolean admin);
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/api/IRegisterController.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.controller.user;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.model.SelectItem;
+import javax.inject.Inject;
+import javax.persistence.EntityManager;
+
+import org.apache.webbeans.reservation.bindings.EntityManagerQualifier;
+import org.apache.webbeans.reservation.bindings.intercep.Transactional;
+import org.apache.webbeans.reservation.entity.Hotel;
+import org.apache.webbeans.reservation.entity.Reservation;
+import org.apache.webbeans.reservation.entity.Users;
+import org.apache.webbeans.reservation.model.ReservationModel;
+
+import java.io.Serializable;
+
+@RequestScoped
+public class UserController implements Serializable
+{
+    private @Inject @EntityManagerQualifier EntityManager entityManager;
+
+    public UserController()
+    {
+        
+    }
+    
+    @PostConstruct
+    public void postConstruct()
+    {
+        //System.out.println("Post Construct Sample .... " + UserController.class.getName() + " is instantiated");
+        
+    }
+    
+    @PreDestroy
+    public void preDestroy()
+    {
+        //System.out.println("Pre Destroy Construct Sample .... " + UserController.class.getName() + " is destroyed by the container");
+    }
+    
+    public Users getUser(int id)
+    {
+        Users user = this.entityManager.find(Users.class, id);
+        
+        return user;
+    }
+    
+    @Transactional
+    public void updateUserInfo(int userId, String name, String surname, int age, String userName, String password)
+    {
+        //logger.debug("Updating user with id : " + userId);
+        //System.out.println("in UserController.updateUserInfo, Updating user with id : " + userId);
+        Users user = this.entityManager.find(Users.class, userId);
+        
+        user.setName(name);
+        user.setSurname(surname);
+        user.setAge(age);
+        user.setUserName(userName);
+        user.setPassword(password);
+    }
+    
+    @Transactional
+    public void addReservation(Map<String, ReservationModel> reservations, int userId)
+    {
+        Users user = this.entityManager.find(Users.class, userId);
+        
+        Set<String> keys = reservations.keySet();
+        
+        for(String item : keys)
+        {
+            ReservationModel rm = reservations.get(item);
+            SelectItem si = rm.getItem();
+            Hotel hotel = this.entityManager.find(Hotel.class, si.getValue());
+            
+            Reservation reservation = new Reservation();
+            
+            user.addHotel(reservation);
+            
+            reservation.setHotel(hotel);
+            reservation.setReservationDate(rm.getDate());
+            
+            this.entityManager.persist(reservation);            
+        }
+                
+    }
+    
+    @Transactional
+    public void deleteReservation(int reservsitonId)
+    {
+        Reservation res = this.entityManager.find(Reservation.class, reservsitonId);
+        Users user = res.getUser();
+        
+        user.getReservations().remove(res);
+        
+        this.entityManager.remove(res);
+    }
+    
+    public List<Reservation> getReservations(int id)
+    {
+        Users user = this.entityManager.find(Users.class, id);
+        
+        Set<Reservation> res = user.getReservations();
+        
+        List<Reservation> l = new ArrayList<Reservation>();
+        for(Reservation r : res)
+        {
+            l.add(r);
+        }
+        
+        return l;
+    }
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/controller/user/UserController.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+@Entity
+public class Hotel
+{
+    @Id
+    @GeneratedValue
+    private int id;
+    
+    @Column(length=100,nullable=false)
+    private String name;
+    
+    @Column
+    private int star;
+    
+    @Column(nullable=false, length=100)
+    private String city;
+    
+    @Column(nullable=false, length=100)
+    private String country;
+    
+    @Version
+    private int version;
+    
+    public Hotel()
+    {
+        
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the star
+     */
+    public int getStar()
+    {
+        return star;
+    }
+
+    /**
+     * @param star the star to set
+     */
+    public void setStar(int star)
+    {
+        this.star = star;
+    }
+
+    /**
+     * @return the city
+     */
+    public String getCity()
+    {
+        return city;
+    }
+
+    /**
+     * @param city the city to set
+     */
+    public void setCity(String city)
+    {
+        this.city = city;
+    }
+
+    /**
+     * @return the country
+     */
+    public String getCountry()
+    {
+        return country;
+    }
+
+    /**
+     * @param country the country to set
+     */
+    public void setCountry(String country)
+    {
+        this.country = country;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId()
+    {
+        return id;
+    }
+
+    /**
+     * @return the version
+     */
+    protected int getVersion()
+    {
+        return version;
+    }
+    
+    
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Hotel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.entity;
+
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToOne;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Version;
+
+@Entity
+public class Reservation
+{
+    @Id
+    @GeneratedValue
+    private int id;
+    
+    @ManyToOne
+    private Users user;
+    
+    @OneToOne
+    private Hotel hotel;
+    
+    @Temporal(TemporalType.DATE)
+    private Date reservationDate;
+    
+    @Version
+    private int version;
+    
+    public Reservation()
+    {
+        
+    }
+
+    /**
+     * @return the user
+     */
+    public Users getUser()
+    {
+        return user;
+    }
+
+    /**
+     * @param user the user to set
+     */
+    public void setUser(Users user)
+    {
+        this.user = user;
+    }
+
+    /**
+     * @return the reservationDate
+     */
+    public Date getReservationDate()
+    {
+        return reservationDate;
+    }
+
+    /**
+     * @param reservationDate the reservationDate to set
+     */
+    public void setReservationDate(Date reservationDate)
+    {
+        this.reservationDate = reservationDate;
+    }
+
+    /**
+     * @return the version
+     */
+    public int getVersion()
+    {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    public void setVersion(int version)
+    {
+        this.version = version;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId()
+    {
+        return id;
+    }
+
+    /**
+     * @return the hotel
+     */
+    public Hotel getHotel()
+    {
+        return hotel;
+    }
+
+    /**
+     * @param hotel the hotel to set
+     */
+    public void setHotel(Hotel hotel)
+    {
+        this.hotel = hotel;
+    }
+
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Reservation.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.entity;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Version;
+
+@Entity
+public class Users
+{
+    @Id
+    @GeneratedValue
+    private int id;
+
+    @Column(length=64,nullable=false)
+    private String name;
+
+    @Column(length=64,nullable=false)
+    private String surname;
+
+    @Column
+    private int age;
+
+    @Column(length=50,nullable=false,unique=true)
+    private String userName;
+
+    @Column(nullable=false,length=20)
+    private String password;
+
+    @Temporal(value=TemporalType.DATE)
+    private Date registerDate;
+
+    @OneToMany(mappedBy="user",cascade={CascadeType.ALL})
+    private Set<Reservation> reservations = new HashSet<Reservation>();
+
+    @Version
+    private int version;
+
+    @Column
+    private boolean admin;
+
+
+    @Temporal(value=TemporalType.TIMESTAMP)
+    private Date lastLoginDate;
+
+    public Users()
+    {
+
+    }
+
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the surname
+     */
+    public String getSurname()
+    {
+        return surname;
+    }
+
+    /**
+     * @param surname the surname to set
+     */
+    public void setSurname(String surname)
+    {
+        this.surname = surname;
+    }
+
+    /**
+     * @return the age
+     */
+    public int getAge()
+    {
+        return age;
+    }
+
+    /**
+     * @param age the age to set
+     */
+    public void setAge(int age)
+    {
+        this.age = age;
+    }
+
+    /**
+     * @return the reservations
+     */
+    public Set<Reservation> getReservations()
+    {
+        return reservations;
+    }
+
+    /**
+     * @param reservations the reservations to set
+     */
+    public void setReservations(Set<Reservation> reservations)
+    {
+        this.reservations = reservations;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId()
+    {
+        return id;
+    }
+
+    public void addHotel(Reservation hotel)
+    {
+        this.reservations.add(hotel);
+
+        hotel.setUser(this);
+    }
+
+    /**
+     * @return the password
+     */
+    public String getPassword()
+    {
+        return password;
+    }
+
+    /**
+     * @param password the password to set
+     */
+    public void setPassword(String password)
+    {
+        this.password = password;
+    }
+
+
+    /**
+     * @return the userName
+     */
+    public String getUserName()
+    {
+        return userName;
+    }
+
+
+    /**
+     * @param userName the userName to set
+     */
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+
+    /**
+     * @return the version
+     */
+    public int getVersion()
+    {
+        return version;
+    }
+
+
+    /**
+     * @return the registerDate
+     */
+    public Date getRegisterDate()
+    {
+        return registerDate;
+    }
+
+
+    /**
+     * @param registerDate the registerDate to set
+     */
+    public void setRegisterDate(Date registerDate)
+    {
+        this.registerDate = registerDate;
+    }
+
+
+    /**
+     * @return the admin
+     */
+    public boolean isAdmin()
+    {
+        return admin;
+    }
+
+
+    /**
+     * @param admin the admin to set
+     */
+    public void setAdmin(boolean admin)
+    {
+        this.admin = admin;
+    }
+
+
+    /**
+     * @return the lastLoginDate
+     */
+    public Date getLastLoginDate()
+    {
+        return lastLoginDate;
+    }
+
+
+    /**
+     * @param lastLoginDate the lastLoginDate to set
+     */
+    public void setLastLoginDate(Date lastLoginDate)
+    {
+        this.lastLoginDate = lastLoginDate;
+    }
+
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/entity/Users.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.events;
+
+
+import org.apache.webbeans.reservation.entity.Users;
+
+
+
+/**
+ * Events that is fired when user logged into the system.
+ */
+public class LoggedInEvent
+{
+    private Users user;
+
+    public LoggedInEvent(Users user)
+    {
+        this.user = user; 
+    }
+
+    
+    public Users getUser()
+    {
+        return this.user;
+    }
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/events/LoggedInEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.intercept;
+
+import javax.decorator.Delegate;
+import javax.decorator.Decorator;
+import javax.inject.Inject;
+
+import org.apache.webbeans.reservation.bindings.DatabaseLogin;
+import org.apache.webbeans.reservation.controller.api.ILoginController;
+import org.apache.webbeans.reservation.entity.Users;
+
+@Decorator
+public class LoginDecorator implements ILoginController 
+{
+    @Inject @Delegate @DatabaseLogin ILoginController decorator;
+
+    /* (non-Javadoc)
+     * @see org.apache.webbeans.reservation.controller.LoginController#checkLogin(java.lang.String, java.lang.String)
+     */
+    public Users checkLogin(String userName, String password)
+    {
+        //System.out.println("Enter LoginDecorator.checkLogin."+decorator.getClass().getName()+". Login process is started. Use tries to login with user name : " + userName );
+        return decorator.checkLogin(userName, password);
+    }
+
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/LoginDecorator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.intercept;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+import javax.transaction.Status;
+import javax.transaction.UserTransaction;
+import javax.annotation.Resource;
+
+import org.apache.webbeans.reservation.bindings.intercep.Transactional;
+
+@Interceptor
+@Transactional
+public class TransactionalInterceptor
+{
+    @Resource UserTransaction tx;
+   
+    @AroundInvoke
+    public Object invoke(InvocationContext context) throws Exception
+    {
+       
+        //System.out.println("in TransactionInterceptor, get tx!"+context.getTarget().getClass().getName());
+        try
+        {
+            if(tx.getStatus()==Status.STATUS_NO_TRANSACTION)
+            {
+                tx.begin();
+                //System.out.println("in TransactionInterceptor,tx.begin!");
+            }
+            //System.out.println("in TransactionInterceptor,context.proceed()!");
+            return context.proceed();
+
+        }
+        catch(Exception e)
+        {
+            //System.out.println("Exception in transactional method call:"+ e.getMessage());
+            if(tx != null)
+            {
+                tx.rollback();
+            }
+
+            throw e;
+
+        }
+        finally
+        {
+            if(tx != null && tx.getStatus()==Status.STATUS_ACTIVE)
+            {
+                tx.commit();
+                //.out.println("in TransactionInterceptor, tx.commit!");
+            }
+        }
+
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/intercept/TransactionalInterceptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.model;
+
+import java.util.Date;
+
+import javax.faces.model.SelectItem;
+
+public class ReservationModel
+{
+    private SelectItem item;
+    
+    private Date date;
+
+    public ReservationModel(SelectItem item, Date date)
+    {
+        this.item = item;
+        this.date = date;
+    }
+
+    /**
+     * @return the item
+     */
+    public SelectItem getItem()
+    {
+        return item;
+    }
+
+    /**
+     * @param item the item to set
+     */
+    public void setItem(SelectItem item)
+    {
+        this.item = item;
+    }
+
+    /**
+     * @return the date
+     */
+    public Date getDate()
+    {
+        return date;
+    }
+
+    /**
+     * @param date the date to set
+     */
+    public void setDate(Date date)
+    {
+        this.date = date;
+    }
+    
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/model/ReservationModel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.security;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.apache.webbeans.reservation.entity.Users;
+import org.apache.webbeans.reservation.session.SessionTracker;
+
+public class JSFSecurityPhaseListener implements PhaseListener
+{
+
+    private static final long serialVersionUID = -1308051590485364148L;
+    
+    public void afterPhase(PhaseEvent event)
+    {        
+        FacesContext context = event.getFacesContext();
+        String pathInfo = context.getExternalContext().getRequestServletPath();
+        System.out.println("pathInfo:"+pathInfo);
+        if(pathInfo.startsWith("/admin") || pathInfo.startsWith("/user"))
+        {
+            SessionTracker tracker = null;
+            Users user = null;
+            try
+            {
+                tracker = (SessionTracker)context.getApplication().evaluateExpressionGet(context, "#{sessionTracker}", SessionTracker.class);
+                user = tracker.getUser();
+                
+            }
+            catch(Exception e)
+            {
+                //Tracker is null
+                //System.out.println("Context is not active");
+            }
+            
+            if(tracker == null || user == null)
+            {
+                try
+                {
+                    context.getExternalContext().redirect(context.getExternalContext().getRequestContextPath() + "/login.jsf");
+                }
+                catch (IOException e)
+                {
+                    throw new RuntimeException(e);
+                }
+            }
+            
+        }
+         
+        
+    }
+
+    public void beforePhase(PhaseEvent event)
+    {
+    }
+
+    public PhaseId getPhaseId()
+    {
+        return PhaseId.RESTORE_VIEW;
+    }
+
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/security/JSFSecurityPhaseListener.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.session;
+
+
+import java.io.Serializable;
+
+
+import org.apache.webbeans.reservation.entity.Users;
+import org.apache.webbeans.reservation.events.LoggedInEvent;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.event.Observes;
+import javax.inject.Named;
+
+@SessionScoped
+@Named
+public class SessionTracker implements Serializable
+{
+    private static final long serialVersionUID = 6365740106065427860L;
+
+    private Users user;
+     
+    /**
+     * When event fires, this observer method is called
+     * by the {@link javax.enterprise.inject.spi.BeanManager} interface.
+     * 
+     * @param loggedInEvent event 
+     */
+    public void userAdded(@Observes LoggedInEvent loggedInEvent)
+    {
+        this.user = loggedInEvent.getUser();
+    }
+
+    public Users getUser()
+    {
+        return this.user;
+    }
+
+    /**
+     * @param user the user to set
+     */
+    public void setUser(Users user)
+    {
+        this.user = user;
+    }
+    
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/session/SessionTracker.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.util;
+
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+public class CalendarUtil
+{
+
+    /**
+     * Gets date.
+     * 
+     * @return the date
+     */
+    public static Date getCurrentDate()
+    {
+        return GregorianCalendar.getInstance().getTime();
+    }
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/CalendarUtil.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.util;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.Produces;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+@RequestScoped
+public class EntityManagerUtil
+{
+    private @PersistenceContext(unitName="reservation") EntityManager entityManager;
+    
+    public EntityManagerUtil()
+    {
+        
+    }
+    
+    @Produces @RequestScoped @org.apache.webbeans.reservation.bindings.EntityManagerQualifier
+    public EntityManager createEntityManager()
+    {        
+        return entityManager;
+    }
+    
+    public void dispose(@Disposes @org.apache.webbeans.reservation.bindings.EntityManagerQualifier EntityManager entityManager)
+    {
+        try{
+        entityManager.close();
+        }catch(IllegalStateException e){
+            //System.out.println("In EntityManagerUtil.dispose, entityManager.close() says: "+e.getMessage());
+        }
+    }
+    
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/EntityManagerUtil.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java Wed Sep  1 11:02:56 2010
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.webbeans.reservation.util;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Simple JSF Utility methods.
+ */
+public class JSFUtility
+{
+
+    /**
+     * Getting current faces context
+     * 
+     * @return current context
+     */
+    public static FacesContext getCurrentContext()
+    {
+        return FacesContext.getCurrentInstance();
+    }
+    
+    /**
+     * Gets current http session
+     * 
+     * @return current http session
+     */
+    public static HttpSession getCurrentSession()
+    {
+        HttpSession session = (HttpSession) getCurrentContext().getExternalContext().getSession(false);
+        
+        return session;
+    }
+    
+    /**
+     * Creates and adds error message.
+     * 
+     * @param summary summary 
+     * @param detail detail
+     */
+    public static void addInfoMessage(String summary, String detail)
+    {
+        addMessage(summary, detail, FacesMessage.SEVERITY_INFO);
+    }
+    
+    /**
+     * Creates and adds error message.
+     * 
+     * @param summary summary 
+     * @param detail detail
+     */
+    public static void addErrorMessage(String summary, String detail)
+    {
+        addMessage(summary, detail, FacesMessage.SEVERITY_ERROR);
+    }
+    
+    
+    private static void addMessage(String summary, String detail, Severity severity)
+    {
+        FacesMessage facesMessage = new FacesMessage(severity,summary,detail);
+        
+        getCurrentContext().addMessage(null, facesMessage);
+        
+    }
+}

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/java/org/apache/webbeans/reservation/util/JSFUtility.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version
+    2.0 (the "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+  <persistence-unit name="reservation" transaction-type="JTA">
+    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+    <jta-data-source>jdbc/sample</jta-data-source>
+    <exclude-unlisted-classes>false</exclude-unlisted-classes>
+    <properties>
+      <property name="eclipselink.ddl-generation" value="create-tables"/>
+    </properties>
+  </persistence-unit>
+</persistence>

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/eclipselink-persistence.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+    
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version
+    2.0 (the "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+    version="1.0">
+
+    <persistence-unit name="reservation" transaction-type="RESOURCE_LOCAL">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+          
+          <class>org.apache.webbeans.reservation.entity.Hotel</class>
+  		  <class>org.apache.webbeans.reservation.entity.User</class>
+  		  <class>org.apache.webbeans.reservation.entity.Reservation</class>
+         
+        <properties>
+            <property name="openjpa.jdbc.DBDictionary" value="derby" />
+            <property name="openjpa.ConnectionPassword" value="app"/>
+            <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.ClientDriver"/>
+            <property name="openjpa.ConnectionUserName" value="app"/>
+            <property name="openjpa.ConnectionURL" value="jdbc:derby://localhost:1527/sample;create=true"/>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+            <property name="openjpa.AutoDetach" value="close, commit, nontx-read"/>
+        </properties>
+
+    </persistence-unit>
+</persistence>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/openjpa-persistence.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+    
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements. See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version
+    2.0 (the "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+    applicable law or agreed to in writing, software distributed under the
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+    CONDITIONS OF ANY KIND, either express or implied. See the License for
+    the specific language governing permissions and limitations under the
+    License.
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+    version="1.0">
+
+    <persistence-unit name="reservation" transaction-type="RESOURCE_LOCAL">
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+          
+          <class>org.apache.webbeans.reservation.entity.Hotel</class>
+  		  <class>org.apache.webbeans.reservation.entity.User</class>
+  		  <class>org.apache.webbeans.reservation.entity.Reservation</class>
+         
+        <properties>
+            <property name="openjpa.jdbc.DBDictionary" value="derby" />
+            <property name="openjpa.ConnectionPassword" value="app"/>
+            <property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.ClientDriver"/>
+            <property name="openjpa.ConnectionUserName" value="app"/>
+            <property name="openjpa.ConnectionURL" value="jdbc:derby://localhost:1527/sample;create=true"/>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+            <property name="openjpa.AutoDetach" value="close, commit, nontx-read"/>
+        </properties>
+
+    </persistence-unit>
+</persistence>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<beans
+    xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+    http://java.sun.com/xml/ns/javaee
+    http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+    <interceptors>
+        <class>org.apache.webbeans.reservation.intercept.TransactionalInterceptor</class>
+    </interceptors>
+    <decorators>
+    <class>org.apache.webbeans.reservation.intercept.LoginDecorator</class>
+    </decorators>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements. See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version
+	2.0 (the "License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+	applicable law or agreed to in writing, software distributed under the
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+	CONDITIONS OF ANY KIND, either express or implied. See the License for
+	the specific language governing permissions and limitations under the
+	License.
+-->
+<faces-config version="2.0"
+              xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2.0.xsd">
+
+</faces-config>

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<web:web-app xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" 
+    xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" 
+    xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" 
+    xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
+    xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" 
+    xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 
+    xmlns:pers="http://java.sun.com/xml/ns/persistence" 
+    xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" 
+    xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
+    xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+    <dep:environment>
+        <dep:moduleId>
+            <dep:groupId>${project.groupId}</dep:groupId>
+            <dep:artifactId>${project.artifactId}</dep:artifactId>
+            <dep:version>${project.version}</dep:version>
+            <dep:type>car</dep:type>
+        </dep:moduleId>
+        <dep:dependencies>            
+        </dep:dependencies>
+        <dep:hidden-classes>
+            <dep:filter>org.apache.log4j</dep:filter>
+        </dep:hidden-classes>
+    </dep:environment>
+    <web:context-root>/webbean-jpa-test</web:context-root>
+    <dep:gbean class="org.apache.geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean" name="DirectoryLog4jConfiguration"/>
+</web:web-app>

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml?rev=991501&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml Wed Sep  1 11:02:56 2010
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+	Licensed to the Apache Software Foundation (ASF) under one or more
+	contributor license agreements. See the NOTICE file distributed with
+	this work for additional information regarding copyright ownership.
+	The ASF licenses this file to You under the Apache License, Version
+	2.0 (the "License"); you may not use this file except in compliance
+	with the License. You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+	applicable law or agreed to in writing, software distributed under the
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+	CONDITIONS OF ANY KIND, either express or implied. See the License for
+	the specific language governing permissions and limitations under the
+	License.
+-->
+<web-app version="2.5"
+    xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+   <display-name>Web Beans EJB Telephone example</display-name>
+
+   <!-- JSF -->
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.jsf</url-pattern>
+   </servlet-mapping>
+
+   <session-config>
+      <session-timeout>10</session-timeout>
+   </session-config>
+
+</web-app>
\ No newline at end of file

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/webbean1.0-test/webbean-jpa-test/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message