From: <cat...@us...> - 2010-07-31 16:33:54
|
Revision: 14506 http://andromda.svn.sourceforge.net/andromda/?rev=14506&view=rev Author: catforce Date: 2010-07-31 16:33:45 +0000 (Sat, 31 Jul 2010) Log Message: ----------- Moved ejb3 examples from andromda-plugins prepared, but not activated build for ejb3-example projects Modified Paths: -------------- trunk/documentation/pom.xml Added Paths: ----------- trunk/documentation/samples/demo-ejb3/ trunk/documentation/samples/demo-ejb3/.classpath trunk/documentation/samples/demo-ejb3/.project trunk/documentation/samples/demo-ejb3/app/ trunk/documentation/samples/demo-ejb3/app/pom.xml trunk/documentation/samples/demo-ejb3/app/src/ trunk/documentation/samples/demo-ejb3/app/src/main/ trunk/documentation/samples/demo-ejb3/app/src/main/application/ trunk/documentation/samples/demo-ejb3/app/src/main/application/META-INF/ trunk/documentation/samples/demo-ejb3/app/src/main/application/META-INF/jboss-app.xml trunk/documentation/samples/demo-ejb3/app/src/main/config/ trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-ds.xml trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-mq-destinations-service.xml trunk/documentation/samples/demo-ejb3/client/ trunk/documentation/samples/demo-ejb3/client/pom.xml trunk/documentation/samples/demo-ejb3/client/src/ trunk/documentation/samples/demo-ejb3/client/src/main/ trunk/documentation/samples/demo-ejb3/client/src/main/java/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/account/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/account/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/animal/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/animal/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bicycle/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bicycle/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bio/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bio/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/book/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/book/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/camera/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/camera/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/customer/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/customer/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/email/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/email/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/employee/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/employee/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/mobile/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/mobile/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/order/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/order/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/rental/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/rental/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/rider/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/rider/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/ticket/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/ticket/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/user/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/user/Client.java trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/vehicle/ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/vehicle/Client.java trunk/documentation/samples/demo-ejb3/common/ trunk/documentation/samples/demo-ejb3/common/pom.xml trunk/documentation/samples/demo-ejb3/config.xml trunk/documentation/samples/demo-ejb3/core/ trunk/documentation/samples/demo-ejb3/core/pom.xml trunk/documentation/samples/demo-ejb3/core/src/ trunk/documentation/samples/demo-ejb3/core/src/main/ trunk/documentation/samples/demo-ejb3/core/src/main/java/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/common/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/common/DefaultInterceptor1.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/account/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/account/AccountManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/Animal.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalDaoImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalInterceptor1.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalInterceptor2.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalInterceptor3.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalInterceptorMetod.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalListener.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/animal/AnimalServiceListener.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/athlete/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/athlete/AthleteManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/bicycle/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/bicycle/BicycleServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/bio/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/bio/BioServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/book/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/book/BookManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/book/BookServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/camera/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/camera/CameraManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/customer/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/customer/ContactImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/customer/CredentialImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/customer/CustomerServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/EmailSenderInterceptor1.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/EmailSenderInterceptor2.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/EmailSenderInterceptor3.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/EmailSenderMDBBeanImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/email/EmailSenderServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/employee/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/employee/EmployeeDaoImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/employee/EmployeeServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/mobile/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/mobile/MobileServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/order/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/order/OrderInfoDaoImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/order/OrderManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/PaymentProcessorMDBBeanImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/PaymentServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/PersonDaoImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/RentalCar.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/RentalCarDaoImpl.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rental/RentalServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rider/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/rider/RiderServiceBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/ticket/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/ticket/TicketManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/user/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/user/UserManagerBean.java trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/vehicle/ trunk/documentation/samples/demo-ejb3/core/src/main/java/org/andromda/demo/ejb3/vehicle/VehicleManagerBean.java trunk/documentation/samples/demo-ejb3/jaxrpc-mapping.xml trunk/documentation/samples/demo-ejb3/jbosswsConfig.xml trunk/documentation/samples/demo-ejb3/mda/ trunk/documentation/samples/demo-ejb3/mda/pom.xml trunk/documentation/samples/demo-ejb3/mda/src/ trunk/documentation/samples/demo-ejb3/mda/src/main/ trunk/documentation/samples/demo-ejb3/mda/src/main/config/ trunk/documentation/samples/demo-ejb3/mda/src/main/config/andromda.xml trunk/documentation/samples/demo-ejb3/mda/src/main/config/mappings/ trunk/documentation/samples/demo-ejb3/mda/src/main/config/mappings/WebMergeMappings.xml trunk/documentation/samples/demo-ejb3/mda/src/main/uml/ trunk/documentation/samples/demo-ejb3/mda/src/main/uml/demo-ejb3.xmi trunk/documentation/samples/demo-ejb3/pom.xml trunk/documentation/samples/demo-ejb3/readme.txt trunk/documentation/samples/demo-ejb3/web/ trunk/documentation/samples/demo-ejb3/web/pom.xml trunk/documentation/samples/demo-ejb3/web/src/ trunk/documentation/samples/demo-ejb3/web/src/main/ trunk/documentation/samples/demo-ejb3/web/src/main/properties/ trunk/documentation/samples/demo-ejb3/web/src/main/properties/messages.properties trunk/documentation/samples/demo-ejb3/wstools.bat trunk/documentation/samples/timetracker-ejb3/ trunk/documentation/samples/timetracker-ejb3/.classpath trunk/documentation/samples/timetracker-ejb3/.project trunk/documentation/samples/timetracker-ejb3/app/ trunk/documentation/samples/timetracker-ejb3/app/pom.xml trunk/documentation/samples/timetracker-ejb3/app/src/ trunk/documentation/samples/timetracker-ejb3/app/src/main/ trunk/documentation/samples/timetracker-ejb3/app/src/main/application/ trunk/documentation/samples/timetracker-ejb3/app/src/main/application/META-INF/ trunk/documentation/samples/timetracker-ejb3/app/src/main/application/META-INF/jboss-app.xml trunk/documentation/samples/timetracker-ejb3/app/src/main/application/META-INF/timetracker-login-config.xml trunk/documentation/samples/timetracker-ejb3/app/src/main/application/META-INF/timetracker-login-service.xml trunk/documentation/samples/timetracker-ejb3/app/src/main/config/ trunk/documentation/samples/timetracker-ejb3/app/src/main/config/auth.conf trunk/documentation/samples/timetracker-ejb3/app/src/main/config/timetracker-ds.xml trunk/documentation/samples/timetracker-ejb3/client/ trunk/documentation/samples/timetracker-ejb3/client/pom.xml trunk/documentation/samples/timetracker-ejb3/client/src/ trunk/documentation/samples/timetracker-ejb3/client/src/main/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/org/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/org/andromda/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/org/andromda/timetracker/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/org/andromda/timetracker/client/ trunk/documentation/samples/timetracker-ejb3/client/src/main/java/org/andromda/timetracker/client/Client.java trunk/documentation/samples/timetracker-ejb3/common/ trunk/documentation/samples/timetracker-ejb3/common/pom.xml trunk/documentation/samples/timetracker-ejb3/common/src/ trunk/documentation/samples/timetracker-ejb3/common/src/main/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/timetracker/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/timetracker/security/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/timetracker/security/PasswordEncoder.java trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/timetracker/vo/ trunk/documentation/samples/timetracker-ejb3/common/src/main/java/org/andromda/timetracker/vo/UserVOComparator.java trunk/documentation/samples/timetracker-ejb3/core/ trunk/documentation/samples/timetracker-ejb3/core/pom.xml trunk/documentation/samples/timetracker-ejb3/core/src/ trunk/documentation/samples/timetracker-ejb3/core/src/main/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/domain/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/domain/Timecard.java trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/domain/TimecardDaoImpl.java trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/domain/UserDaoImpl.java trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/domain/UserRoleDaoImpl.java trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/service/ trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/service/TimeTrackingServiceBean.java trunk/documentation/samples/timetracker-ejb3/core/src/main/java/org/andromda/timetracker/service/UserServiceBean.java trunk/documentation/samples/timetracker-ejb3/core/src/test/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/andromda/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/andromda/timetracker/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/andromda/timetracker/service/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/andromda/timetracker/service/test/ trunk/documentation/samples/timetracker-ejb3/core/src/test/java/org/andromda/timetracker/service/test/UserServiceTest.java trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/ trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/default.persistence.properties trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/ejb3-interceptors-aop.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/embedded-jboss-beans.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/jboss-jms-beans.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/jndi.properties trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/log4j.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/login-config.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/roles.properties trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/security-beans.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/testBeanRefFactory.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/testng.xml trunk/documentation/samples/timetracker-ejb3/core/src/test/resources/users.properties trunk/documentation/samples/timetracker-ejb3/mda/ trunk/documentation/samples/timetracker-ejb3/mda/pom.xml trunk/documentation/samples/timetracker-ejb3/mda/src/ trunk/documentation/samples/timetracker-ejb3/mda/src/main/ trunk/documentation/samples/timetracker-ejb3/mda/src/main/config/ trunk/documentation/samples/timetracker-ejb3/mda/src/main/config/andromda.xml trunk/documentation/samples/timetracker-ejb3/mda/src/main/config/mappings/ trunk/documentation/samples/timetracker-ejb3/mda/src/main/config/mappings/WebMergeMappings.xml trunk/documentation/samples/timetracker-ejb3/mda/src/main/uml/ trunk/documentation/samples/timetracker-ejb3/mda/src/main/uml/timetracker.xmi trunk/documentation/samples/timetracker-ejb3/pom.xml trunk/documentation/samples/timetracker-ejb3/readme.txt trunk/documentation/samples/timetracker-ejb3/sql.txt trunk/documentation/samples/timetracker-ejb3/web/ trunk/documentation/samples/timetracker-ejb3/web/pom.xml trunk/documentation/samples/timetracker-ejb3/web/src/ trunk/documentation/samples/timetracker-ejb3/web/src/main/ trunk/documentation/samples/timetracker-ejb3/web/src/main/css/ trunk/documentation/samples/timetracker-ejb3/web/src/main/css/custom.css trunk/documentation/samples/timetracker-ejb3/web/src/main/java/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/andromda/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/andromda/timetracker/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/andromda/timetracker/web/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/andromda/timetracker/web/timecardsearch/ trunk/documentation/samples/timetracker-ejb3/web/src/main/java/org/andromda/timetracker/web/timecardsearch/SearchControllerImpl.java trunk/documentation/samples/timetracker-ejb3/web/src/main/properties/ trunk/documentation/samples/timetracker-ejb3/web/src/main/properties/messages.properties Modified: trunk/documentation/pom.xml =================================================================== --- trunk/documentation/pom.xml 2010-07-29 21:49:31 UTC (rev 14505) +++ trunk/documentation/pom.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -19,6 +19,10 @@ </scm> <modules> <module>samples/timetracker</module> + <!-- + <module>samples/demo-ejb3</module> + <module>samples/timetracker-ejb3</module> + --> <module>getting-started</module> </modules> </project> Added: trunk/documentation/samples/demo-ejb3/.classpath =================================================================== Added: trunk/documentation/samples/demo-ejb3/.project =================================================================== --- trunk/documentation/samples/demo-ejb3/.project (rev 0) +++ trunk/documentation/samples/demo-ejb3/.project 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,14 @@ +<projectDescription> + <name>demo-ejb3</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/app/pom.xml =================================================================== --- trunk/documentation/samples/demo-ejb3/app/pom.xml (rev 0) +++ trunk/documentation/samples/demo-ejb3/app/pom.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,131 @@ +<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.andromda.demo.ejb3</groupId> + <artifactId>demo-ejb3</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <artifactId>demo-ejb3-app</artifactId> + <packaging>ear</packaging> + <name>Demo EJB3 Application</name> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-common</artifactId> + <version>${pom.version}</version> + <exclusions> + <exclusion> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-mda</artifactId> + </exclusion> + <exclusion> + <groupId>org.andromda.profiles.uml14</groupId> + <artifactId>andromda-profile</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + <version>1.7</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-common</artifactId> + <version>${pom.version}</version> + </dependency> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-core</artifactId> + <version>${pom.version}</version> + <type>ejb</type> + </dependency> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-web</artifactId> + <version>${pom.version}</version> + <type>war</type> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + </dependencies> + <build> + <finalName>${application.id}-${pom.version}</finalName> + <resources> + <resource> + <directory>src/main/config</directory> + <targetPath>../</targetPath> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/application</directory> + <targetPath>../${application.id}-${pom.version}</targetPath> + <filtering>true</filtering> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <version>2.1</version> + <configuration> + <includes>**/*.xml</includes> + <excludes>**/jboss-app.xml</excludes> + <version>1.4</version> + <modules> + <javaModule> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-common</artifactId> + <includeInApplicationXml>true</includeInApplicationXml> + </javaModule> + <ejbModule> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-core</artifactId> + </ejbModule> + <webModule> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-web</artifactId> + <contextRoot>/${application.id}</contextRoot> + </webModule> + </modules> + </configuration> + </plugin> + <plugin> + <groupId>org.andromda.maven.plugins</groupId> + <artifactId>andromdapp-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>deploy</goal> + </goals> + </execution> + </executions> + <configuration> + <deployLocation>${jboss.home}/server/default/deploy</deployLocation> + <!-- include the generated data source file --> + <includes> + <include>*ds.xml</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/app/src/main/application/META-INF/jboss-app.xml =================================================================== --- trunk/documentation/samples/demo-ejb3/app/src/main/application/META-INF/jboss-app.xml (rev 0) +++ trunk/documentation/samples/demo-ejb3/app/src/main/application/META-INF/jboss-app.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE jboss-app PUBLIC '-//JBoss//DTD J2EE Application 1.3V2//EN' 'http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd'> +<jboss-app> + <loader-repository> + jboss.loader:loader=${pom.groupId}-${application.id}-${pom.version} + <loader-repository-config>java2ParentDelegation=true</loader-repository-config> + </loader-repository> +</jboss-app> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-ds.xml =================================================================== --- trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-ds.xml (rev 0) +++ trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-ds.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- JBoss Server DataSource --> +<datasources> + <local-tx-datasource> + <jndi-name>${dataSource.name}</jndi-name> + <connection-url>${jdbc.url}</connection-url> + <driver-class>${jdbc.driver}</driver-class> + <user-name>${jdbc.username}</user-name> + <password>${jdbc.password}</password> + <!-- <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> --> + <!-- Checks for error codes and messages for fatal errors --> + <exception-sorter-class-name>${jdbc.exception.sorter}</exception-sorter-class-name> + <!-- Corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> + <metadata> + <type-mapping>${jboss.typeMappings}</type-mapping> + </metadata> + </local-tx-datasource> +</datasources> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-mq-destinations-service.xml =================================================================== --- trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-mq-destinations-service.xml (rev 0) +++ trunk/documentation/samples/demo-ejb3/app/src/main/config/demo-ejb3-mq-destinations-service.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<server> + <mbean code="org.jboss.mq.server.jmx.Queue" + name="jboss.mq.destination:service=Queue,name=EmailSenderMDBBean"> + <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> + <attribute name="JNDIName">queue/emailSender</attribute> + </mbean> + <mbean code="org.jboss.mq.server.jmx.Queue" + name="jboss.mq.destination:service=Queue,name=PaymentProcessorMDBBean"> + <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> + <attribute name="JNDIName">queue/ejb3demo2/payment</attribute> + </mbean> +<!-- jboss mq destinations merge-point --> + +</server> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/client/pom.xml =================================================================== --- trunk/documentation/samples/demo-ejb3/client/pom.xml (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/pom.xml 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,125 @@ +<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.andromda.demo.ejb3</groupId> + <artifactId>demo-ejb3</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <artifactId>demo-ejb3-client</artifactId> + <packaging>jar</packaging> + <name>Demo EJB3 Client</name> + <dependencies> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-common</artifactId> + <version>${pom.version}</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>demo-ejb3-core</artifactId> + <version>${pom.version}</version> + <type>ejb</type> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-j2ee</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbossall-client</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3-client</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3x</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>ejb3-persistence</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-annotations-ejb3</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-serialization</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-remoting</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jnp-client</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-aop-jdk50-client</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-aspect-jdk50-client</artifactId> + </dependency> +<!-- <dependency>--> +<!-- <groupId>org.hibernate</groupId>--> +<!-- <artifactId>hibernate-client</artifactId>--> +<!-- </dependency>--> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbossws-client</artifactId> + </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + </dependency> + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-activation_1.0.2_spec</artifactId> + </dependency> + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-javamail_1.3.1_spec</artifactId> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.andromda.maven.plugins</groupId> + <artifactId>andromda-multi-source-plugin</artifactId> + </plugin> + </plugins> + <resources> + <resource> + <directory>target/src</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </resource> + </resources> + </build> +</project> \ No newline at end of file Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/account/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/account/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/account/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,166 @@ +package org.andromda.demo.ejb3.client.account; + +import java.util.Properties; + +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.andromda.demo.ejb3.account.Account; +import org.andromda.demo.ejb3.account.AccountException; +import org.andromda.demo.ejb3.account.AccountManagerDelegate; +import org.andromda.demo.ejb3.account.AccountManagerRemote; +import org.andromda.demo.ejb3.user.User; +import org.andromda.demo.ejb3.user.UserException; +import org.andromda.demo.ejb3.user.UserManagerDelegate; +import org.andromda.demo.ejb3.vehicle.Motocycle; +import org.andromda.demo.ejb3.vehicle.VehicleException; +import org.andromda.demo.ejb3.vehicle.VehicleManagerDelegate; + +public class Client +{ + + private Properties prop; + + public void init() + { + prop = new Properties(); + prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + prop.put("java.naming.provider.url", "localhost"); + } + + + + + public void insertAccount() + { + System.out.println("Inserting account..."); + + Account account = new Account("SheytanKarimi"); + + AccountManagerDelegate ams = new AccountManagerDelegate(prop); + try + { + ams.addAccount(account); + } catch (AccountException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + ams.close(); + } + + System.out.println("Insert complete."); + } + + + + + + public void deleteAccount() + { + System.out.println("deleting account..."); + + AccountManagerDelegate ams = new AccountManagerDelegate(prop); + try + { + ams.deleteAccount(2); + } + catch (AccountException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + ams.close(); + } + + System.out.println("delete complete."); + } + + + + + public void getAccount() + { + System.out.println("getting account..."); + + AccountManagerDelegate ams = new AccountManagerDelegate(prop); + try + { + Account account = ams.getAccount(1); + System.out.println("Account " + account.getId() + ", " + account.getName() + ", " + account.toString()); + } + catch (AccountException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + ams.close(); + } + } + + + + + + public void insertAccountManual() + { + System.out.println("Inserting account..."); + + Account account = new Account("VanceKarimi"); + + InitialContext ctx = null; + try + { + ctx = new InitialContext(prop); + AccountManagerRemote manager = (AccountManagerRemote)ctx.lookup(AccountManagerRemote.class.getName()); + manager.addAccount(account); + } + catch (NamingException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + catch (AccountException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + if (ctx != null) + { + try + { + ctx.close(); + } catch (NamingException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + System.out.println("Insert complete."); + } + + + + + /** + * @param args + */ + public static void main(String[] args) + { + Client client = new Client(); + client.init(); + client.insertAccount(); + } + +} Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/animal/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/animal/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/animal/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,103 @@ +package org.andromda.demo.ejb3.client.animal; + +import java.util.Collection; +import java.util.Properties; + +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.andromda.demo.ejb3.account.Account; +import org.andromda.demo.ejb3.account.AccountException; +import org.andromda.demo.ejb3.account.AccountManagerDelegate; +import org.andromda.demo.ejb3.account.AccountManagerRemote; +import org.andromda.demo.ejb3.animal.Animal; +import org.andromda.demo.ejb3.animal.AnimalCreateException; +import org.andromda.demo.ejb3.animal.AnimalServiceDelegate; +import org.andromda.demo.ejb3.user.User; +import org.andromda.demo.ejb3.user.UserException; +import org.andromda.demo.ejb3.user.UserManagerDelegate; +import org.andromda.demo.ejb3.vehicle.Motocycle; +import org.andromda.demo.ejb3.vehicle.VehicleException; +import org.andromda.demo.ejb3.vehicle.VehicleManagerDelegate; + +public class Client +{ + + private Properties prop; + + public void init() + { + prop = new Properties(); + prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + prop.put("java.naming.provider.url", "localhost"); + } + + + + + public void insertAnimal() + { + System.out.println("Inserting animal..."); + + Animal animal = new Animal("sheep", "farm", false); + + AnimalServiceDelegate manager = new AnimalServiceDelegate(prop); + try + { + manager.addAnimal(animal); + } catch (AnimalCreateException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + manager.close(); + } + + System.out.println("Insert complete."); + } + + + + + public void getAnimals() + { + System.out.println("getting animals..."); + + AnimalServiceDelegate manager = new AnimalServiceDelegate(prop); + try + { + Collection<Animal> animals = manager.getAllAnimals(); + for (Animal animal : animals) + { + System.out.println("Account " + animal.getName() + ", " + animal.getType() + ", " + animal.getCarnivor()); + } + } + catch (Exception e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + manager.close(); + } + } + + + + + + /** + * @param args + */ + public static void main(String[] args) + { + Client client = new Client(); + client.init(); + client.getAnimals(); + } + +} Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bicycle/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bicycle/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bicycle/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,202 @@ +package org.andromda.demo.ejb3.client.bicycle; + +import java.util.Properties; + +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.NameCallback; +import javax.security.auth.callback.PasswordCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.auth.login.LoginContext; +import javax.security.auth.login.LoginException; + +import org.andromda.demo.ejb3.bicycle.Bicycle; +import org.andromda.demo.ejb3.bicycle.BicycleException; +import org.andromda.demo.ejb3.bicycle.BicycleServiceDelegate; +import org.andromda.demo.ejb3.employee.Employee; +import org.andromda.demo.ejb3.employee.EmployeeContractType; +import org.andromda.demo.ejb3.employee.EmployeeDeptCode; +import org.andromda.demo.ejb3.employee.EmployeeException; +import org.andromda.demo.ejb3.employee.EmployeeServiceDelegate; + +public class Client +{ + private AppCallbackHandler handler = null; + private LoginContext lc = null; + private String principalId = "admin"; + private String password = "admin"; + + private Properties prop; + + public void init() + { + prop = new Properties(); + prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + prop.put("java.naming.provider.url", "localhost:1099"); + + System.setProperty("java.security.auth.login.config", "./auth.conf"); + } + + + + + public void insertBicycle() + { + System.out.println("Inserting bicycle..."); + + Bicycle bicycle = new Bicycle("mountain", 24, "road"); + + try + { + login(); + } + catch (LoginException e) + { + e.printStackTrace(); + } + + BicycleServiceDelegate manager = new BicycleServiceDelegate(prop); + try + { + manager.addBicycle(bicycle); + } catch (BicycleException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + manager.close(); + + try + { + logout(); + } + catch (LoginException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + System.out.println("Insert complete."); + } + + + + + + public void getBicycle() + { + System.out.println("getting bicycle..."); + + try + { + login(); + } + catch (LoginException e) + { + e.printStackTrace(); + } + + BicycleServiceDelegate manager = new BicycleServiceDelegate(prop); + try + { + Bicycle bicycle = manager.getBicycle(1); + System.out.println("bicycle " + bicycle.getId() + ", " + bicycle.getType() + ", " + bicycle.getGears() + ", " + bicycle.getTyreTypes()); + } + catch (BicycleException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + manager.close(); + + try + { + logout(); + } + catch (LoginException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + + + + private void login() + throws LoginException + { + handler = new AppCallbackHandler(principalId, password.toCharArray()); + lc = new LoginContext("ejb3demo2", handler); + System.out.println("Authenticating username[" + principalId + "] password[" + new String(password) + "]"); + lc.login(); + } + + + + + public void logout() + throws LoginException + { + + if (lc != null) { + lc.logout(); + } else { + System.out.println("LoginContext is undefined"); + } + } + + + + /** + * @param args + */ + public static void main(String[] args) + { + Client client = new Client(); + client.init(); + client.getBicycle(); + } + + + /** + * CallbackHandler class for JAAS authentication + * + * @author VanceKarimi + * @version 1.0, 10/12/2004 + */ + private static class AppCallbackHandler + implements CallbackHandler { + + private String username; + private char[] passwd; + + public AppCallbackHandler(String username, char[] passwd) { + this.username = username; + this.passwd = passwd; + } + + public void handle(Callback[] callbacks) + throws java.io.IOException, UnsupportedCallbackException { + + for (int i = 0; i < callbacks.length; i++) { + if (callbacks[i] instanceof NameCallback) { + NameCallback nc = (NameCallback) callbacks[i]; + nc.setName(username); + } else if (callbacks[i] instanceof PasswordCallback) { + PasswordCallback pc = (PasswordCallback) callbacks[i]; + pc.setPassword(passwd); + } else { + throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback"); + } + } + } + } +} Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bio/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bio/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/bio/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,184 @@ +package org.andromda.demo.ejb3.client.bio; + +import java.util.Collection; +import java.util.Properties; +import java.util.Set; +import java.util.SortedSet; + +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.andromda.demo.ejb3.account.Account; +import org.andromda.demo.ejb3.account.AccountException; +import org.andromda.demo.ejb3.account.AccountManagerDelegate; +import org.andromda.demo.ejb3.account.AccountManagerRemote; +import org.andromda.demo.ejb3.bio.Bio; +import org.andromda.demo.ejb3.bio.BioException; +import org.andromda.demo.ejb3.bio.BioReference; +import org.andromda.demo.ejb3.bio.BioServiceDelegate; +import org.andromda.demo.ejb3.user.User; +import org.andromda.demo.ejb3.user.UserException; +import org.andromda.demo.ejb3.user.UserManagerDelegate; +import org.andromda.demo.ejb3.vehicle.Motocycle; +import org.andromda.demo.ejb3.vehicle.VehicleException; +import org.andromda.demo.ejb3.vehicle.VehicleManagerDelegate; + +public class Client +{ + + private Properties prop; + + public void init() + { + prop = new Properties(); + prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + prop.put("java.naming.provider.url", "localhost:1099"); + } + + + + + public void insertBio() + { + System.out.println("Inserting bio..."); + + Bio bio = new Bio("joee", "Justin Oee Bio", "abc".getBytes(), "test".toCharArray()); + + BioReference bioRef = new BioReference("joee", "test ref"); + + Collection<BioReference> bioRefs = bio.getBioReferences(); + bioRefs.add(bioRef); + + BioServiceDelegate bsd = new BioServiceDelegate(prop); + try + { + bsd.addBio(bio); + } + catch (BioException e) + { + e.printStackTrace(); + } + finally + { + if (bsd != null) + { + bsd.close(); + } + } + System.out.println("Insert complete."); + } + + + + + + public void addMoreBioReferences() + { + System.out.println("Inserting bio references..."); + + Bio bio = new Bio("vaka", "vaka Oee Bio", "hia".getBytes(), "test".toCharArray()); + + BioReference bioRef1 = new BioReference("vaka2 ref", "test ref2"); + BioReference bioRef2 = new BioReference("vaka3 ref", "test ref3"); + + Collection<BioReference> bioRefs = bio.getBioReferences(); + bioRefs.add(bioRef1); + bioRefs.add(bioRef2); + + BioServiceDelegate bsd = new BioServiceDelegate(prop); + try + { + bsd.addBio(bio); + } + catch (BioException e) + { + e.printStackTrace(); + } + finally + { + if (bsd != null) + { + bsd.close(); + } + } + System.out.println("Insert complete."); + } + + + + + public void getAllBios() + { + System.out.println("gettings all bios..."); + + BioServiceDelegate bsd = new BioServiceDelegate(prop); + try + { + Collection<Bio> bios = bsd.getAllBios(); + + for (Bio bio : bios) + { + System.out.println("Bio - name: " + bio.getName() + ", " + bio.getInfo() + ", " + bio.getAdvert()); + + for (BioReference bioRef : bio.getBioReferences()) + { + System.out.println("BioRef - name: " + bioRef.getName() + ", " + bioRef.getUrl()); + } + } + } + catch (BioException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + bsd.close(); + } + + } + + + + + public void getBioReferencesForBio() + { + System.out.println("gettings all bio references..."); + + BioServiceDelegate bsd = new BioServiceDelegate(prop); + try + { + Bio bio = bsd.getBio(Long.valueOf(4)); + + for (BioReference bioRef : bio.getBioReferences()) + { + System.out.println("Bio reference - id: " + bioRef.getId() + ", name: " + bioRef.getName() + ", url: " + bioRef.getUrl()); + } + } + catch (BioException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + bsd.close(); + } + + } + + + + + /** + * @param args + */ + public static void main(String[] args) + { + Client client = new Client(); + client.init(); + client.getBioReferencesForBio(); + } + +} Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/book/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/book/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/book/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,100 @@ +package org.andromda.demo.ejb3.client.book; + +import java.util.Properties; + +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.andromda.demo.ejb3.account.Account; +import org.andromda.demo.ejb3.account.AccountException; +import org.andromda.demo.ejb3.account.AccountManagerDelegate; +import org.andromda.demo.ejb3.account.AccountManagerRemote; +import org.andromda.demo.ejb3.book.Book; +import org.andromda.demo.ejb3.book.BookException; +import org.andromda.demo.ejb3.book.BookServiceDelegate; +import org.andromda.demo.ejb3.user.User; +import org.andromda.demo.ejb3.user.UserException; +import org.andromda.demo.ejb3.user.UserManagerDelegate; +import org.andromda.demo.ejb3.vehicle.Motocycle; +import org.andromda.demo.ejb3.vehicle.VehicleException; +import org.andromda.demo.ejb3.vehicle.VehicleManagerDelegate; + +public class Client +{ + + private Properties prop; + + public void init() + { + prop = new Properties(); + prop.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + prop.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + prop.put("java.naming.provider.url", "localhost"); + } + + + + + public void insertBook() + { + System.out.println("Inserting book..."); + + Book book = new Book("Sheytan", 300); + + BookServiceDelegate serviceDelegate = new BookServiceDelegate(prop); + try + { + serviceDelegate.addBook(book); + } catch (BookException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + serviceDelegate.close(); + } + + System.out.println("Insert complete."); + } + + + + + + public void deleteBook() + { + System.out.println("deleting book..."); + + BookServiceDelegate serviceDelegate = new BookServiceDelegate(prop); + try + { + serviceDelegate.deleteBook(1); + } + catch (BookException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + finally + { + serviceDelegate.close(); + } + + System.out.println("delete complete."); + } + + + + + /** + * @param args + */ + public static void main(String[] args) + { + Client client = new Client(); + client.init(); + client.deleteBook(); + } + +} Added: trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/camera/Client.java =================================================================== --- trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/camera/Client.java (rev 0) +++ trunk/documentation/samples/demo-ejb3/client/src/main/java/org/andromda/demo/ejb3/client/camera/Client.java 2010-07-31 16:33:45 UTC (rev 14506) @@ -0,0 +1,130 @@ +package org.andromda.demo.ejb3.client.camera; + +import java.util.Date; +import java.util.Properties; + +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import org.andromda.demo.ejb3.camera.Camera; +import org.andromda.demo.ejb3.camera.CameraException; +import org.andromda.demo.ejb3.camera.CameraManagerDelegate; +import org.and... [truncated message content] |