-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial upload, change pom to Embedded Glassfish 3.1.2
- Loading branch information
0 parents
commit 9384cd5
Showing
95 changed files
with
7,253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Fork of samples from "EJB 3 in Action Source Code 2nd Edition" | ||
<https://code.google.com/p/action-bazaar/> | ||
|
||
Link to the book: http://www.manning.com/panda/ | ||
|
||
My fork are from chapter 3 & 4, working and tested using Embedded Glassfish 3.1.2 | ||
|
||
*** All credits goes to Authors *** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false"> | ||
<output url="file://$MODULE_DIR$/target/classes" /> | ||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target/classes" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="module" module-name="ActionBazaar-ejb" /> | ||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax:javaee-api:6.0" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.1" level="project" /> | ||
</component> | ||
</module> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>ActionBazaar</artifactId> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-client</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Action Bazaar Client</name> | ||
<url>http://code.google.com/p/action-bazaar/</url> | ||
<packaging>jar</packaging> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>net.cuprak.enterprise.client.App</mainClass> | ||
<addClasspath>true</addClasspath> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<finalName>ActionBazaar-client</finalName> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-ejb</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax</groupId> | ||
<artifactId>javaee-api</artifactId> | ||
<version>6.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
67 changes: 67 additions & 0 deletions
67
chapter3/ActionBazaar-client/src/main/java/com/actionbazaar/client/AccountCreatorClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** | ||
* EJB 3 in Action | ||
* Book: http://www.manning.com/panda/ | ||
* Code: http://code.google.com/p/action-bazaar/ | ||
* Licensed 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 com.actionbazaar.client; | ||
|
||
import com.actionbazaar.buslogic.BidderAccountCreator; | ||
import com.actionbazaar.persistence.BillingInfo; | ||
import com.actionbazaar.persistence.BiographicalInfo; | ||
import com.actionbazaar.persistence.LoginInfo; | ||
import javax.ejb.EJB; | ||
import javax.swing.JFrame; | ||
|
||
/** | ||
* AccountCreatorClient | ||
*/ | ||
public class AccountCreatorClient extends JFrame { | ||
|
||
/** | ||
* Account creator | ||
*/ | ||
@EJB | ||
private static BidderAccountCreator accountCreator; | ||
|
||
/** | ||
* Creates a new AccountCreatorClient | ||
*/ | ||
public AccountCreatorClient() { | ||
super("Accont Creator Client"); | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
LoginInfo login = new LoginInfo(); | ||
login.setUsername("dpanda"); | ||
login.setPassword("welcome"); | ||
|
||
accountCreator.addLoginInfo(login); | ||
|
||
BiographicalInfo bio = new BiographicalInfo(); | ||
bio.setFirstName("Debu"); | ||
bio.setLastName("Panda"); | ||
|
||
accountCreator.addBiographicalInfo(bio); | ||
|
||
BillingInfo billing = new BillingInfo(); | ||
billing.setCreditCardType("VISA"); | ||
billing.setAccountNumber("0123456789"); | ||
|
||
accountCreator.addBillingInfo(billing); | ||
|
||
// Create account | ||
accountCreator.createAccount(); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
chapter3/ActionBazaar-client/src/main/resources/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Created-By: 1.6.0 (Sun Microsystems Inc.) | ||
Main-Class: com.actionbazaar.client.AccountCreatorClient |
4 changes: 4 additions & 0 deletions
4
chapter3/ActionBazaar-client/src/main/resources/META-INF/application-client.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<application-client version="6" 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/application-client_6.xsd"> | ||
<display-name>Skeleton-app-client</display-name> | ||
</application-client> |
5 changes: 5 additions & 0 deletions
5
chapter3/ActionBazaar-client/src/main/resources/META-INF/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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"> | ||
</beans> |
38 changes: 38 additions & 0 deletions
38
chapter3/ActionBazaar-client/src/test/java/net/cuprak/enterprise/client/AppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package net.cuprak.enterprise.client; | ||
|
||
import junit.framework.Test; | ||
import junit.framework.TestCase; | ||
import junit.framework.TestSuite; | ||
|
||
/** | ||
* Unit test for simple App. | ||
*/ | ||
public class AppTest | ||
extends TestCase | ||
{ | ||
/** | ||
* Create the test case | ||
* | ||
* @param testName name of the test case | ||
*/ | ||
public AppTest( String testName ) | ||
{ | ||
super( testName ); | ||
} | ||
|
||
/** | ||
* @return the suite of tests being tested | ||
*/ | ||
public static Test suite() | ||
{ | ||
return new TestSuite( AppTest.class ); | ||
} | ||
|
||
/** | ||
* Rigourous Test :-) | ||
*/ | ||
public void testApp() | ||
{ | ||
assertTrue( true ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
<component name="FacetManager"> | ||
<facet type="javaeeApplication" name="JavaEE"> | ||
<configuration> | ||
<descriptors> | ||
<deploymentDescriptor name="application.xml" url="file://$MODULE_DIR$/target/application.xml" /> | ||
</descriptors> | ||
</configuration> | ||
</facet> | ||
</component> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false"> | ||
<output url="file://$MODULE_DIR$/target/classes" /> | ||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="module" module-name="ActionBazaar-ejb" /> | ||
<orderEntry type="module" module-name="ActionBazaar-web" /> | ||
<orderEntry type="module" module-name="ActionBazaar-client" /> | ||
<orderEntry type="module" module-name="ActionBazaar-ejb" /> | ||
</component> | ||
</module> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> | ||
<artifactId>ActionBazaar</artifactId> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-ear</artifactId> | ||
<packaging>ear</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Action Bazaar EAR</name> | ||
<url>http://code.google.com/p/action-bazaar/</url> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-ear-plugin</artifactId> | ||
<configuration> | ||
<version>6</version> | ||
<generateClient>true</generateClient> | ||
<modules> | ||
<!-- | ||
<jarModule> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-client</artifactId> | ||
<includeInApplicationXml>true</includeInApplicationXml> | ||
<unpack>true</unpack> | ||
</jarModule> | ||
--> | ||
<ejbModule> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-ejb</artifactId> | ||
<!--<unpack>true</unpack>--> | ||
</ejbModule> | ||
</modules> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<finalName>ActionBazaar-ear</finalName> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-ejb</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<type>ejb</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-web</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<type>war</type> | ||
</dependency> | ||
<!-- | ||
<dependency> | ||
<groupId>com.actionbazaar.chapter3</groupId> | ||
<artifactId>ActionBazaar-client</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<type>jar</type> | ||
</dependency> | ||
--> | ||
</dependencies> | ||
<properties> | ||
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server> | ||
</properties> | ||
</project> |
2 changes: 2 additions & 0 deletions
2
chapter3/ActionBazaar-ear/src/main/application/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
|
Oops, something went wrong.