]> git.mxchange.org Git - jjobs-ejb.git/commitdiff
added persitence unit:
authorRoland Haeder <roland@mxchange.org>
Wed, 2 Mar 2016 19:25:34 +0000 (20:25 +0100)
committerRoland Haeder <roland@mxchange.org>
Wed, 2 Mar 2016 19:25:34 +0000 (20:25 +0100)
- added required jars for persisting private and business contacts
- added necessary dependencies
- added persistence.xml with own JDBC resource

lib/jcontacts-business-core [new submodule]
lib/jcontacts-business-core.jar [new file with mode: 0644]
lib/jcontacts-core.jar [new file with mode: 0644]
lib/jcountry-core.jar [new file with mode: 0644]
lib/jphone-core.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/conf/persistence.xml [new file with mode: 0644]
src/java/log4j2.xml [new file with mode: 0644]

diff --git a/lib/jcontacts-business-core b/lib/jcontacts-business-core
new file mode 160000 (submodule)
index 0000000..84f67c3
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 84f67c320ba8ebbff4f4bea4766d66997dea7360
diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar
new file mode 100644 (file)
index 0000000..edb1f11
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..f4a7771
Binary files /dev/null and b/lib/jcontacts-core.jar differ
diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar
new file mode 100644 (file)
index 0000000..ed14f78
Binary files /dev/null and b/lib/jcountry-core.jar differ
diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar
new file mode 100644 (file)
index 0000000..6f439fd
Binary files /dev/null and b/lib/jphone-core.jar differ
index 67f1b2c0edd9a68d484fcb4be5d6d5b897b38aa2..064428ed009d210af4c28fb5d20e353e7e546132 100644 (file)
@@ -141,6 +141,13 @@ is divided into following sections:
         <property name="javadoc.encoding.used" value="${source.encoding}"/>
         <property name="includes" value="**"/>
         <property name="excludes" value=""/>
+        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+            <and>
+                <isset property="endorsed.classpath"/>
+                <length length="0" string="${endorsed.classpath}" when="greater"/>
+            </and>
+        </condition>
         <condition property="is.server.weblogic" value="true">
             <equals arg1="${j2ee.server.type}" arg2="WebLogic9"/>
         </condition>
@@ -257,6 +264,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
                     <compilerarg line="${javac.compilerargs}"/>
                     <compilerarg value="-processorpath"/>
                     <compilerarg path="@{processorpath}:${empty.dir}"/>
@@ -294,6 +302,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
                     <compilerarg line="${javac.compilerargs}"/>
                     <customize/>
                 </javac>
@@ -489,6 +498,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
                             <path path="${j2ee.platform.classpath}"/>
                             <path path="${j2ee.platform.embeddableejb.classpath}"/>
                         </classpath>
+                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
                         <jvmarg line="${runmain.jvmargs}"/>
                     </customize>
                 </ejbjarproject2:test-impl>
@@ -620,6 +630,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
                             <path path="${j2ee.platform.classpath}"/>
                             <path path="${j2ee.platform.embeddableejb.classpath}"/>
                         </classpath>
+                        <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
                         <jvmarg line="${runmain.jvmargs}"/>
                     </customize>
                 </ejbjarproject2:test-debug-impl>
@@ -653,6 +664,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
             <element name="customize" optional="true"/>
             <sequential>
                 <java classname="@{classname}" fork="true">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
                     <jvmarg line="${runmain.jvmargs}"/>
                     <classpath>
                         <path path="${build.classes.dir}:${javac.classpath}:${j2ee.platform.classpath}"/>
@@ -814,16 +826,32 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="compile,-library-inclusion-in-archive-weblogic,-library-inclusion-in-archive-by-user" name="library-inclusion-in-archive"/>
     <target if="is.jars.in.ejbjar" name="-library-inclusion-in-archive-by-user">
+        <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="${file.reference.jcountry-core.jar}" todir="${build.classes.dir}"/>
+        <copyfiles files="${file.reference.jphone-core.jar}" todir="${build.classes.dir}"/>
         <copyfiles files="${reference.jjobs-lib.jar}" todir="${build.classes.dir}"/>
     </target>
     <target if="is.server.weblogic" name="-library-inclusion-in-archive-weblogic">
+        <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="${file.reference.jcountry-core.jar}" property="manifest.file.reference.jcountry-core.jar"/>
+        <basename file="${file.reference.jphone-core.jar}" property="manifest.file.reference.jphone-core.jar"/>
         <basename file="${reference.jjobs-lib.jar}" property="manifest.reference.jjobs-lib.jar"/>
         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
-            <attribute name="Extension-List" value="jar-1 "/>
-            <attribute name="jar-1-Extension-Name" value="${manifest.reference.jjobs-lib.jar}"/>
+            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 jar-4 jar-5 "/>
+            <attribute name="jar-1-Extension-Name" value="${manifest.file.reference.jcontacts-core.jar}"/>
+            <attribute name="jar-2-Extension-Name" value="${manifest.file.reference.jcontacts-business-core.jar}"/>
+            <attribute name="jar-3-Extension-Name" value="${manifest.file.reference.jcountry-core.jar}"/>
+            <attribute name="jar-4-Extension-Name" value="${manifest.file.reference.jphone-core.jar}"/>
+            <attribute name="jar-5-Extension-Name" value="${manifest.reference.jjobs-lib.jar}"/>
         </manifest>
     </target>
     <target depends="compile" name="library-inclusion-in-manifest">
+        <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="${file.reference.jcountry-core.jar}" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jphone-core.jar}" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${reference.jjobs-lib.jar}" todir="${dist.ear.dir}/lib"/>
         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
index bcf69f2a3030427c1fc91a26eda942c590885d5e..687679e65f47c19cddf9c6deeffc6eb1a0ed4e79 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=6192d214
+build.xml.data.CRC32=8561312a
 build.xml.script.CRC32=9c0f08a9
-build.xml.stylesheet.CRC32=5910fda3@1.51.1
+build.xml.stylesheet.CRC32=5910fda3@1.55.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=6192d214
-nbproject/build-impl.xml.script.CRC32=ce8c1126
-nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.51.1
+nbproject/build-impl.xml.data.CRC32=8561312a
+nbproject/build-impl.xml.script.CRC32=80436f3c
+nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1
index 3a7d19083712683f6d2a73fc58a4ba5a5f6d1f2e..a52c6d618c509aac17a2aa99bdb5b3ab7bccb80f 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
@@ -18,7 +19,12 @@ dist.dir=dist
 dist.ear.jar=${dist.dir}/${jar.name}
 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.jcountry-core.jar=lib/jcountry-core.jar
+file.reference.jphone-core.jar=lib/jphone-core.jar
 includes=**
 j2ee.compile.on.save=true
 j2ee.deploy.on.save=true
@@ -34,6 +40,10 @@ jar.compress=false
 jar.name=jjobs-ejb.jar
 jars.in.ejbjar=false
 javac.classpath=\
+    ${file.reference.jcontacts-core.jar}:\
+    ${file.reference.jcontacts-business-core.jar}:\
+    ${file.reference.jcountry-core.jar}:\
+    ${file.reference.jphone-core.jar}:\
     ${reference.jjobs-lib.jar}
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
@@ -72,6 +82,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.jcountry-core.jar=../jcountry-core/src/
+source.reference.jphone-core.jar=../jphone-core/src/
 source.root=src
 src.dir=${source.root}/java
 test.src.dir=test
index c2182e366c40fc49145c4c68c2f0a4342c5756c3..08c49bc5a33d005d068c7145486850cf0ad406fc 100644 (file)
@@ -5,6 +5,10 @@
         <data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
             <name>jjobs-ejb</name>
             <minimum-ant-version>1.6.5</minimum-ant-version>
+            <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">file.reference.jcountry-core.jar</included-library>
+            <included-library dirs="200">file.reference.jphone-core.jar</included-library>
             <included-library dirs="200">reference.jjobs-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..e638db3
--- /dev/null
@@ -0,0 +1,24 @@
+<?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="jcontacts-ejbPU" transaction-type="JTA">
+    <jta-data-source>jdbc/jjobs</jta-data-source>
+    <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.jobposition.EmployeePosition</class>
+    <class>org.mxchange.jcontactsbusiness.logo.CompanyLogo</class>
+    <class>org.mxchange.jcountry.data.CountryData</class>
+    <class>org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber</class>
+    <class>org.mxchange.jphone.phonenumbers.fax.FaxNumber</class>
+    <class>org.mxchange.jphone.phonenumbers.landline.LandLineNumber</class>
+    <class>org.mxchange.jphone.phonenumbers.smsprovider.CellphoneProvider</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/log4j2.xml b/src/java/log4j2.xml
new file mode 100644 (file)
index 0000000..7f7ee3c
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (C) 2016 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/>.
+-->
+<Configuration status="INFO">
+       <Appenders>
+               <Console name="STDOUT" target="SYSTEM_OUT">
+                       <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
+               </Console>
+       </Appenders>
+       <Loggers>
+               <Root level="trace">
+                       <AppenderRef ref="STDOUT" level="TRACE"/>
+               </Root>
+       </Loggers>
+</Configuration>