Author: dan.j.allen
Date: 2010-06-15 16:28:04 -0400 (Tue, 15 Jun 2010)
New Revision: 13164
Added:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java
Modified:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java
examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml
Log:
move ConfirmedLiteral to seperate class; IDE chokes on it
Modified:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java
===================================================================
---
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java 2010-06-15
20:14:13 UTC (rev 13163)
+++
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingAgentBean.java 2010-06-15
20:28:04 UTC (rev 13164)
@@ -131,7 +131,7 @@
{
em.persist(booking);
// FIXME can't inject event object into bean with passivating scope
- manager.fireEvent(new BookingEvent(booking), Confirmed.INSTANCE);
+ manager.fireEvent(new BookingEvent(booking), ConfirmedLiteral.INSTANCE);
log.info(mf.info("New booking at the {0} confirmed for
{1}").textParams(booking.getHotel().getName(),
booking.getUser().getName()).build().getText());
messages.info(new BundleKey("messages.properties",
"booking.confirmed")).textDefault("Booking confirmed.");
conversation.end();
Modified:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java
===================================================================
---
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java 2010-06-15
20:14:13 UTC (rev 13163)
+++
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/BookingHistoryBean.java 2010-06-15
20:28:04 UTC (rev 13164)
@@ -1,3 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *
+ * $Id$
+ */
package org.jboss.seam.examples.booking.booking;
import java.util.ArrayList;
Modified:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java
===================================================================
---
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java 2010-06-15
20:14:13 UTC (rev 13163)
+++
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/Confirmed.java 2010-06-15
20:28:04 UTC (rev 13164)
@@ -1,3 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *
+ * $Id$
+ */
package org.jboss.seam.examples.booking.booking;
import static java.lang.annotation.ElementType.FIELD;
@@ -10,7 +33,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
-import javax.enterprise.util.AnnotationLiteral;
import javax.inject.Qualifier;
/**
@@ -22,12 +44,4 @@
@Qualifier
public @interface Confirmed
{
-
- static class ConfirmedLiteral extends AnnotationLiteral<Confirmed> implements
Confirmed
- {
- private static final long serialVersionUID = -7035985583479407806L;
- }
-
- public static final Confirmed INSTANCE = new ConfirmedLiteral();
-
}
Added:
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java
===================================================================
---
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java
(rev 0)
+++
examples/trunk/booking-simplified/src/main/java/org/jboss/seam/examples/booking/booking/ConfirmedLiteral.java 2010-06-15
20:28:04 UTC (rev 13164)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *
+ * $Id$
+ */
+package org.jboss.seam.examples.booking.booking;
+
+import javax.enterprise.util.AnnotationLiteral;
+
+public class ConfirmedLiteral extends AnnotationLiteral<Confirmed> implements
Confirmed
+{
+ public static final Confirmed INSTANCE = new ConfirmedLiteral();
+}
Modified: examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml
===================================================================
---
examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml 2010-06-15
20:14:13 UTC (rev 13163)
+++
examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml 2010-06-15
20:28:04 UTC (rev 13164)
@@ -4,21 +4,18 @@
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="booking">
- <!--
+<!--
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- -->
<jta-data-source>jdbc/__default</jta-data-source>
<!--
<jta-data-source>java:/DefaultDS</jta-data-source>
<jta-data-source>jdbc/__arquillian</jta-data-source>
-->
- <exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
+ <!-- Properties for Hibernate (default provider for JBoss AS) -->
<property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
- <!-- These are the default for JBoss EJB 3, but not for Hibernate
EntityManager -->
- <property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
- <property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ <property name="hibernate.format_sql" value="true"/>
<!-- Properties for EclipseLink (default provider for GlassFish) -->
<property name="eclipselink.ddl-generation"
value="drop-and-create-tables"/>