[seam-commits] Seam SVN: r11804 - in modules/remoting/trunk/examples/model: src/main/java/org/jboss/seam/remoting/examples/model and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Dec 10 05:55:30 EST 2009
Author: shane.bryzak at jboss.com
Date: 2009-12-10 05:55:30 -0500 (Thu, 10 Dec 2009)
New Revision: 11804
Modified:
modules/remoting/trunk/examples/model/pom.xml
modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/Customer.java
modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml
modules/remoting/trunk/examples/model/src/main/resources/import.sql
modules/remoting/trunk/examples/model/src/main/webapp/model.html
Log:
workaround deployment problem
Modified: modules/remoting/trunk/examples/model/pom.xml
===================================================================
--- modules/remoting/trunk/examples/model/pom.xml 2009-12-09 10:49:22 UTC (rev 11803)
+++ modules/remoting/trunk/examples/model/pom.xml 2009-12-10 10:55:30 UTC (rev 11804)
@@ -2,28 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss.seam.examples</groupId>
- <artifactId>seam-examples-parent</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
<groupId>org.jboss.seam.remoting.examples</groupId>
<artifactId>remoting-model</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
- <name>Seam Remoting Examples: Model</name>
+ <name>Seam Remoting Model Example</name>
- <pluginRepositories>
- <pluginRepository>
- <id>codehaus snapshot repository</id>
- <url>http://snapshots.repository.codehaus.org/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<!--dependency>
<groupId>org.testng</groupId>
@@ -52,9 +36,29 @@
<scope>provided</scope>
</dependency>
-
-
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <warName>${pom.artifactId}</warName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/Customer.java
===================================================================
--- modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/Customer.java 2009-12-09 10:49:22 UTC (rev 11803)
+++ modules/remoting/trunk/examples/model/src/main/java/org/jboss/seam/remoting/examples/model/Customer.java 2009-12-10 10:55:30 UTC (rev 11804)
@@ -4,10 +4,11 @@
import java.util.Date;
import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
+//import javax.persistence.EnumType;
+//import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
+import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@@ -18,25 +19,26 @@
* @author Shane Bryzak
*/
@Entity
+ at Table(name = "customer")
public class Customer implements Serializable
{
private static final long serialVersionUID = 4289723352398788625L;
- public static enum Gender { male, female }
+// public static enum Gender { male, female }
- @Id @GeneratedValue
+
private Integer customerId;
private String firstName;
private String lastName;
- @Temporal(TemporalType.DATE)
+
private Date dateOfBirth;
- @Enumerated(EnumType.STRING)
- private Gender gender;
+ //@Enumerated(EnumType.STRING)
+ //private Gender gender;
-
+ @Id @GeneratedValue
public Integer getCustomerId()
{
return customerId;
@@ -46,7 +48,7 @@
{
this.customerId = customerId;
}
-
+
public String getFirstName()
{
return firstName;
@@ -67,6 +69,7 @@
this.lastName = lastName;
}
+ @Temporal(TemporalType.DATE)
public Date getDateOfBirth()
{
return dateOfBirth;
@@ -77,7 +80,7 @@
this.dateOfBirth = dateOfBirth;
}
- public Gender getGender()
+/* public Gender getGender()
{
return gender;
}
@@ -85,5 +88,5 @@
public void setGender(Gender gender)
{
this.gender = gender;
- }
+ }*/
}
Modified: modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml 2009-12-09 10:49:22 UTC (rev 11803)
+++ modules/remoting/trunk/examples/model/src/main/resources/META-INF/persistence.xml 2009-12-10 10:55:30 UTC (rev 11804)
@@ -5,6 +5,7 @@
version="1.0">
<persistence-unit name="model">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <class>org.jboss.seam.remoting.examples.model.Customer</class>
<jta-data-source>modelDatasource</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
Modified: modules/remoting/trunk/examples/model/src/main/resources/import.sql
===================================================================
--- modules/remoting/trunk/examples/model/src/main/resources/import.sql 2009-12-09 10:49:22 UTC (rev 11803)
+++ modules/remoting/trunk/examples/model/src/main/resources/import.sql 2009-12-10 10:55:30 UTC (rev 11804)
@@ -1,3 +1,3 @@
-insert into customer (customerid, firstname, lastname, dateofbirth, gender) values (1, 'Shane', 'Bryzak', '19010101', 1);
+insert into customer (customerid, firstname, lastname, dateofbirth) values (1, 'Shane', 'Bryzak', '1901-01-01');
Modified: modules/remoting/trunk/examples/model/src/main/webapp/model.html
===================================================================
--- modules/remoting/trunk/examples/model/src/main/webapp/model.html 2009-12-09 10:49:22 UTC (rev 11803)
+++ modules/remoting/trunk/examples/model/src/main/webapp/model.html 2009-12-10 10:55:30 UTC (rev 11804)
@@ -18,6 +18,8 @@
<script type="text/javascript">
//<![CDATA[
+ Seam.Remoting.setDebug(true);
+
function loadCustomer() {
var customerId = document.getElementById("customerId").value;
More information about the seam-commits
mailing list