Additional lock test in employee.model
fixed some example maven folder structures
diff --git a/dbws/dbws.simple/.classpath b/dbws/dbws.simple/.classpath
index a687a38..649ae0c 100644
--- a/dbws/dbws.simple/.classpath
+++ b/dbws/dbws.simple/.classpath
@@ -6,7 +6,7 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="src" output="target/classes" path="src/main/java">
+	<classpathentry including="/Users/djclarke/GIT/eclipselink/examples/dbws/dbws.simple/target/generated-src/java/**/*.java" kind="src" output="target/classes" path="src/main/java">
 		<attributes>
 			<attribute name="optional" value="true"/>
 			<attribute name="maven.pomderived" value="true"/>
diff --git a/dbws/dbws.simple/pom.xml b/dbws/dbws.simple/pom.xml
index 493bba3..02855da 100644
--- a/dbws/dbws.simple/pom.xml
+++ b/dbws/dbws.simple/pom.xml
@@ -112,7 +112,7 @@
 			<version>1.6.2</version>
 			<scope>provided</scope>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>org.eclipse.persistence</groupId>
 			<artifactId>javax.servlet</artifactId>
@@ -162,7 +162,7 @@
 								<argument>-builderFile</argument>
 								<argument>${project.basedir}/dbws-builder.xml</argument>
 								<argument>-stageDir</argument>
-								<argument>${project.basedir}/src/main/</argument>
+								<argument>${project.basedir}/target/generated-src</argument>
 								<argument>-packageAs</argument>
 								<argument>maven</argument>
 							</arguments>
@@ -171,6 +171,26 @@
 				</executions>
 			</plugin>
 
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<includes>
+						<include>${project.basedir}/target/generated-src/java/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
 		</plugins>
+
+		<resources>
+			<resource>
+				<directory>${project.basedir}/target/generated-src/java/</directory>
+			</resource>
+			<resource>
+				<directory>${project.basedir}/target/generated-src/webapp/</directory>
+			</resource>
+		</resources>
+
+
 	</build>
 </project>
diff --git "a/jpa/employee/employee.model/src/JavaSEExampleTest \0501\051.launch" b/jpa/employee/employee.model/src/PessimisticLockTest.launch
similarity index 88%
rename from "jpa/employee/employee.model/src/JavaSEExampleTest \0501\051.launch"
rename to jpa/employee/employee.model/src/PessimisticLockTest.launch
index 386e13c..4231fbb 100644
--- "a/jpa/employee/employee.model/src/JavaSEExampleTest \0501\051.launch"
+++ b/jpa/employee/employee.model/src/PessimisticLockTest.launch
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/Employee Example - model/src/test/java/test/JavaSEExampleTest.java"/>
+<listEntry value="/employee.model/src/test/java/test/PessimisticLockTest.java"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 <listEntry value="1"/>
@@ -11,8 +11,8 @@
 <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
 <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="test.JavaSEExampleTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Employee Example - model"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="test.PessimisticLockTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="employee.model"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar"/>
 </launchConfiguration>
diff --git a/jpa/employee/employee.model/src/main/java/eclipselink/example/jpa/employee/model/Employee.java b/jpa/employee/employee.model/src/main/java/eclipselink/example/jpa/employee/model/Employee.java
index 19c0df7..a641b6f 100644
--- a/jpa/employee/employee.model/src/main/java/eclipselink/example/jpa/employee/model/Employee.java
+++ b/jpa/employee/employee.model/src/main/java/eclipselink/example/jpa/employee/model/Employee.java
@@ -94,6 +94,7 @@
 
     @Version
     private Long version;
+    
     @ManyToMany
     @JoinTable(joinColumns = @JoinColumn(name = "EMP_ID"), inverseJoinColumns = @JoinColumn(name = "PROJ_ID"), name = "PROJ_EMP")
     private List<Project> projects = new ArrayList<Project>();
diff --git a/jpa/employee/employee.model/src/test/java/test/PessimisticLockTest.java b/jpa/employee/employee.model/src/test/java/test/PessimisticLockTest.java
new file mode 100644
index 0000000..7bbeeb2
--- /dev/null
+++ b/jpa/employee/employee.model/src/test/java/test/PessimisticLockTest.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the 
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
+ * which accompanies this distribution. 
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at 
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *  dclarke - Employee Demo 2.4
+ ******************************************************************************/
+package test;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.LockModeType;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import eclipselink.example.jpa.employee.model.Address;
+import eclipselink.example.jpa.employee.model.SamplePopulation;
+import eclipselink.example.jpa.employee.services.Diagnostics;
+import example.PersistenceTesting;
+
+/**
+ * Simple test case illustrating pessimistic lock usage.
+ * 
+ * @author dclarke
+ * @since EclispeLink 2.4.2
+ */
+public class PessimisticLockTest {
+
+    @Test
+    public void test() {
+        EntityManager em = getEmf().createEntityManager();
+
+        int id = em.createQuery("SELECT a.id FROM Address a", Number.class).getSingleResult().intValue();
+
+        em.getTransaction().begin();
+
+        Address addr = em.find(Address.class, id, LockModeType.PESSIMISTIC_WRITE);
+
+        Assert.assertNotNull(addr);
+        Assert.assertNull(addr.getCity());
+        Assert.assertEquals(em.getLockMode(addr), LockModeType.PESSIMISTIC_WRITE);
+        
+        addr.setCity("Ottawa");
+
+        Assert.assertNotNull(addr.getCity());
+        
+        em.lock(addr, LockModeType.PESSIMISTIC_WRITE);
+        
+        Assert.assertEquals(em.getLockMode(addr), LockModeType.PESSIMISTIC_WRITE);
+        Assert.assertNotNull(addr.getCity());
+
+        em.getTransaction().rollback();
+
+        em.close();
+    }
+
+    private static EntityManagerFactory emf;
+
+    private static Diagnostics diagnostics;
+
+    public static EntityManagerFactory getEmf() {
+        return emf;
+    }
+
+    public static Diagnostics getDiagnostics() {
+        return diagnostics;
+    }
+
+    @BeforeClass
+    public static void createEMF() {
+        emf = PersistenceTesting.createEMF(true);
+        diagnostics = Diagnostics.getInstance(emf);
+
+        EntityManager em = emf.createEntityManager();
+        new SamplePopulation().createNewEmployees(em, 1);
+
+        Number count = em.createNamedQuery("Employee.count", Number.class).getSingleResult();
+        Assert.assertEquals(1, count.intValue());
+
+        em.close();
+
+        emf.getCache().evictAll();
+    }
+
+    @AfterClass
+    public static void closeEMF() {
+        if (emf != null && emf.isOpen()) {
+            emf.close();
+        }
+        emf = null;
+    }
+
+}