]> git.mxchange.org Git - addressbook-mailer-ejb.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 12:18:46 +0000 (14:18 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 12:18:46 +0000 (14:18 +0200)
- added persistence.xml and EclipseLink provider
- added really important jars (their entities must be registered in persistence.xml, too)
- First EJB business method added (stub)
- updated jars
Signed-off-by:Roland Häder <roland@mxchange.org>

18 files changed:
lib/eclipselink/eclipselink.jar [new file with mode: 0644]
lib/eclipselink/javax.persistence-2.1.0-doc.zip [new file with mode: 0644]
lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar [new file with mode: 0644]
lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar [new file with mode: 0644]
lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar [new file with mode: 0644]
lib/jcontacts-business-core.jar [new file with mode: 0644]
lib/jcontacts-core.jar [new file with mode: 0644]
lib/jcoreee.jar
lib/juser-core.jar [new file with mode: 0644]
lib/juser-lib.jar
lib/nblibraries.properties
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/conf/persistence.xml [new file with mode: 0644]
src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java [deleted file]

diff --git a/lib/eclipselink/eclipselink.jar b/lib/eclipselink/eclipselink.jar
new file mode 100644 (file)
index 0000000..2b0a810
Binary files /dev/null and b/lib/eclipselink/eclipselink.jar differ
diff --git a/lib/eclipselink/javax.persistence-2.1.0-doc.zip b/lib/eclipselink/javax.persistence-2.1.0-doc.zip
new file mode 100644 (file)
index 0000000..fd55e6e
Binary files /dev/null and b/lib/eclipselink/javax.persistence-2.1.0-doc.zip differ
diff --git a/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar b/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar
new file mode 100644 (file)
index 0000000..841d2e1
Binary files /dev/null and b/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar differ
diff --git a/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar b/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar
new file mode 100644 (file)
index 0000000..001316b
Binary files /dev/null and b/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar differ
diff --git a/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar b/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar
new file mode 100644 (file)
index 0000000..0135c65
Binary files /dev/null and b/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar differ
diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar
new file mode 100644 (file)
index 0000000..1d48fff
Binary files /dev/null and b/lib/jcontacts-business-core.jar differ
diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar
new file mode 100644 (file)
index 0000000..56d1541
Binary files /dev/null and b/lib/jcontacts-core.jar differ
index b39cb8c944ebf489c444e37eff82a6afd0a78220..955e4a94a6ceaaef2069f8602724b4f623b337ed 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
diff --git a/lib/juser-core.jar b/lib/juser-core.jar
new file mode 100644 (file)
index 0000000..0923bea
Binary files /dev/null and b/lib/juser-core.jar differ
index a1cdc145edc7915473994d9fde5b2a0b7ad5fb4a..e0d78fef552b21c16b32bb8b8e640c7685a4e64b 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 6d0afb59d64978f1c42b37eda93de4d6acaa674c..cc80b9d95f98a63e3e3be834d1c05778957a30e5 100644 (file)
@@ -2,3 +2,15 @@ libs.CopyLibs.classpath=\
     ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
 libs.CopyLibs.displayName=CopyLibs Task
 libs.CopyLibs.prop-version=2.0
+libs.eclipselink.classpath=\
+    ${base}/eclipselink/eclipselink.jar;\
+    ${base}/eclipselink/javax.persistence_2.1.0.v201304241213.jar;\
+    ${base}/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar
+libs.eclipselink.displayName=EclipseLink (JPA 2.1)
+libs.eclipselink.javadoc=\
+    ${base}/eclipselink/javax.persistence-2.1.0-doc.zip
+libs.eclipselink.prop-maven-dependencies=\n                org.eclipse.persistence:eclipselink:2.5.2:jar\n            
+libs.eclipselinkmodelgen.classpath=\
+    ${base}/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar
+libs.eclipselinkmodelgen.displayName=EclipseLink-ModelGen (JPA 2.1)
+libs.eclipselinkmodelgen.prop-maven-dependencies=org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:2.5.2:jar
index 75d0db99c20ebed685d167a19a5208e339a3a0ee..3cd8ea2cd7fefc4eb4e891fbae8f8cb1274c7360 100644 (file)
@@ -828,22 +828,34 @@ exists or setup the property manually. For example like this:
     <target if="is.jars.in.ejbjar" name="-library-inclusion-in-archive-by-user">
         <copyfiles files="${file.reference.jcoreee.jar}" todir="${build.classes.dir}"/>
         <copyfiles files="${file.reference.juser-lib.jar}" todir="${build.classes.dir}"/>
+        <copyfiles files="${file.reference.juser-core.jar}" todir="${build.classes.dir}"/>
+        <copyfiles files="${file.reference.jcontacts-core.jar}" todir="${build.classes.dir}"/>
+        <copyfiles files="${file.reference.jcontacts-business-core.jar}" todir="${build.classes.dir}"/>
         <copyfiles files="${reference.addressbook-lib.jar}" todir="${build.classes.dir}"/>
     </target>
     <target if="is.server.weblogic" name="-library-inclusion-in-archive-weblogic">
         <basename file="${file.reference.jcoreee.jar}" property="manifest.file.reference.jcoreee.jar"/>
         <basename file="${file.reference.juser-lib.jar}" property="manifest.file.reference.juser-lib.jar"/>
+        <basename file="${file.reference.juser-core.jar}" property="manifest.file.reference.juser-core.jar"/>
+        <basename file="${file.reference.jcontacts-core.jar}" property="manifest.file.reference.jcontacts-core.jar"/>
+        <basename file="${file.reference.jcontacts-business-core.jar}" property="manifest.file.reference.jcontacts-business-core.jar"/>
         <basename file="${reference.addressbook-lib.jar}" property="manifest.reference.addressbook-lib.jar"/>
         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
-            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 "/>
+            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 jar-4 jar-5 jar-6 "/>
             <attribute name="jar-1-Extension-Name" value="${manifest.file.reference.jcoreee.jar}"/>
             <attribute name="jar-2-Extension-Name" value="${manifest.file.reference.juser-lib.jar}"/>
-            <attribute name="jar-3-Extension-Name" value="${manifest.reference.addressbook-lib.jar}"/>
+            <attribute name="jar-3-Extension-Name" value="${manifest.file.reference.juser-core.jar}"/>
+            <attribute name="jar-4-Extension-Name" value="${manifest.file.reference.jcontacts-core.jar}"/>
+            <attribute name="jar-5-Extension-Name" value="${manifest.file.reference.jcontacts-business-core.jar}"/>
+            <attribute name="jar-6-Extension-Name" value="${manifest.reference.addressbook-lib.jar}"/>
         </manifest>
     </target>
     <target depends="compile" name="library-inclusion-in-manifest">
         <copyfiles files="${file.reference.jcoreee.jar}" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.juser-lib.jar}" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.juser-core.jar}" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jcontacts-core.jar}" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jcontacts-business-core.jar}" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${reference.addressbook-lib.jar}" todir="${dist.ear.dir}/lib"/>
         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
index 4203e6b9e9f4270b66642ef7e5f88b98dbe96fb5..ae249aa56a2d47ac038d8d65ec117a780cdd07c6 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=99c0adbf
+build.xml.data.CRC32=a3556951
 build.xml.script.CRC32=7d41e0fd
 build.xml.stylesheet.CRC32=5910fda3@1.51.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=99c0adbf
-nbproject/build-impl.xml.script.CRC32=9f98b4d1
+nbproject/build-impl.xml.data.CRC32=a3556951
+nbproject/build-impl.xml.script.CRC32=8db758bb
 nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.51.1
index e0224b9dd270dde8e862dfd97265134ee8993e35..8ce3e8f77b241ec74321388d722ef4a6a953a848 100644 (file)
@@ -1,5 +1,6 @@
 annotation.processing.enabled=true
 annotation.processing.enabled.in.editor=true
+annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false
 annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
@@ -20,7 +21,10 @@ dist.jar=${dist.dir}/${jar.name}
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
+file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar
+file.reference.jcontacts-core.jar=lib\\jcontacts-core.jar
 file.reference.jcoreee.jar=lib\\jcoreee.jar
+file.reference.juser-core.jar=lib/juser-core.jar
 file.reference.juser-lib.jar=lib/juser-lib.jar
 includes=**
 j2ee.compile.on.save=true
@@ -39,12 +43,17 @@ jars.in.ejbjar=false
 javac.classpath=\
     ${file.reference.jcoreee.jar}:\
     ${file.reference.juser-lib.jar}:\
+    ${file.reference.juser-core.jar}:\
+    ${file.reference.jcontacts-core.jar}:\
+    ${file.reference.jcontacts-business-core.jar}:\
     ${reference.addressbook-lib.jar}
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
 javac.deprecation=true
 javac.processorpath=\
-    ${javac.classpath}
+    ${javac.classpath}:\
+    ${libs.eclipselink.classpath}:\
+    ${libs.eclipselinkmodelgen.classpath}
 javac.source=1.7
 javac.target=1.7
 javac.test.classpath=\
@@ -77,7 +86,10 @@ run.test.classpath=\
 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
 runmain.jvmargs=
 source.encoding=UTF-8
+source.reference.jcontacts-business-core.jar=../jcontacts-business-core/src/
+source.reference.jcontacts-core.jar=../jcontacts-core/src/
 source.reference.jcoreee.jar=../jcoreee/src/
+source.reference.juser-core.jar=../juser-core/src/
 source.reference.juser-lib.jar=../juser-lib/src/
 source.root=src
 src.dir=${source.root}/java
index 07a88f3fa3a31fb050e75b06ef6a445fcf211512..70677cb5414d9d7b7223010f7979cfe2e5e599eb 100644 (file)
@@ -7,6 +7,9 @@
             <minimum-ant-version>1.6.5</minimum-ant-version>
             <included-library dirs="200">file.reference.jcoreee.jar</included-library>
             <included-library dirs="200">file.reference.juser-lib.jar</included-library>
+            <included-library dirs="200">file.reference.juser-core.jar</included-library>
+            <included-library dirs="200">file.reference.jcontacts-core.jar</included-library>
+            <included-library dirs="200">file.reference.jcontacts-business-core.jar</included-library>
             <included-library dirs="200">reference.addressbook-lib.jar</included-library>
             <source-roots>
                 <root id="src.dir"/>
diff --git a/src/conf/persistence.xml b/src/conf/persistence.xml
new file mode 100644 (file)
index 0000000..e2f3b2d
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
+  <persistence-unit name="addressbook-ejbPU" transaction-type="JTA">
+    <jta-data-source>jdbc/contacts</jta-data-source>
+    <class>org.mxchange.addressbook.model.addressbook.UserAddressbook</class>
+    <class>org.mxchange.addressbook.model.addressbook.entry.UserAddressbookEntry</class>
+    <class>org.mxchange.jcontacts.contact.UserContact</class>
+    <class>org.mxchange.jcontactsbusiness.CompanyContact</class>
+    <class>org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData</class>
+    <class>org.mxchange.jcontactsbusiness.branch.CompanyBranchOffice</class>
+    <class>org.mxchange.jcontactsbusiness.department.CompanyDepartment</class>
+    <class>org.mxchange.jcontactsbusiness.employee.CompanyEmployee</class>
+    <class>org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData</class>
+    <class>org.mxchange.jcontactsbusiness.logo.CompanyLogo</class>
+    <class>org.mxchange.jusercore.model.user.LoginUser</class>
+    <exclude-unlisted-classes>false</exclude-unlisted-classes>
+    <properties>
+      <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
+    </properties>
+  </persistence-unit>
+</persistence>
diff --git a/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java
new file mode 100644 (file)
index 0000000..245c3a7
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.model.addressbook;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote;
+
+/**
+ * A stateless bean handling addressbooks
+ * <p>
+ * @author Roland Haeder
+ */
+@Stateless (name = "addressbook", mappedName = "ejb/stateless-addressbook", description = "A stateless bean for handling addressbooks")
+public class AddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 129_857_871_287_691L;
+
+       /**
+        * Login bean
+        */
+       @EJB
+       private UserLoginSessionBeanRemote loginBean;
+}
diff --git a/src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java
deleted file mode 100644 (file)
index 191c4b1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 Roland Haeder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.model.addressbooks;
-
-import javax.ejb.EJB;
-import javax.ejb.Stateless;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
-import org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote;
-
-/**
- * A stateless bean handling addressbooks
- * <p>
- * @author Roland Haeder
- */
-@Stateless (name = "addressbook", mappedName = "ejb/stateless-addressbook", description = "A stateless bean for handling addressbooks")
-public class AddressbookSessionBean extends BaseDatabaseBean implements AddressbookSessionBeanRemote {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 129_857_871_287_691L;
-
-       /**
-        * Login bean
-        */
-       @EJB
-       private UserLoginSessionBeanRemote loginBean;
-}