Skip to content

Commit

Permalink
Initial upload, change pom to Embedded Glassfish 3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
teodesson committed Dec 9, 2013
0 parents commit 9384cd5
Show file tree
Hide file tree
Showing 95 changed files with 7,253 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
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 ***
24 changes: 24 additions & 0 deletions chapter3/ActionBazaar-client/ActionBazaar-client.iml
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>

62 changes: 62 additions & 0 deletions chapter3/ActionBazaar-client/pom.xml
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>
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();
}
}
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
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>
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>
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 );
}
}
28 changes: 28 additions & 0 deletions chapter3/ActionBazaar-ear/ActionBazaar-ear.iml
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>

77 changes: 77 additions & 0 deletions chapter3/ActionBazaar-ear/pom.xml
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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Loading

0 comments on commit 9384cd5

Please sign in to comment.