]> git.mxchange.org Git - addressbook-ejb.git/commitdiff
Initial creation of first addressbook EJB. This requires adding some own libs and...
authorRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 07:59:12 +0000 (09:59 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 9 Oct 2015 07:59:12 +0000 (09:59 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

.gitignore
lib/jcoreee.jar [new file with mode: 0644]
lib/juser-lib.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/conf/beans.xml [new file with mode: 0644]
src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java [new file with mode: 0644]

index 315ea15c01c70a2765915a6daa7f2e3b1a2cb2c5..bc920a3de6acac46bb2ad752150419004c698ef8 100644 (file)
@@ -1,3 +1,4 @@
 /dist/
 /build/
-/nbproject/private/
\ No newline at end of file
+/nbproject/private/
+/nbproject/*~
diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar
new file mode 100644 (file)
index 0000000..b39cb8c
Binary files /dev/null and b/lib/jcoreee.jar differ
diff --git a/lib/juser-lib.jar b/lib/juser-lib.jar
new file mode 100644 (file)
index 0000000..a1cdc14
Binary files /dev/null and b/lib/juser-lib.jar differ
index aa0c0bc79106a5cc47853c064d73004a4037b39b..75d0db99c20ebed685d167a19a5208e339a3a0ee 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>
@@ -819,16 +826,24 @@ 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.jcoreee.jar}" todir="${build.classes.dir}"/>
+        <copyfiles files="${file.reference.juser-lib.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="${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 "/>
-            <attribute name="jar-1-Extension-Name" value="${manifest.reference.addressbook-lib.jar}"/>
+            <attribute name="Extension-List" value="jar-1 jar-2 jar-3 "/>
+            <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}"/>
         </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="${reference.addressbook-lib.jar}" todir="${dist.ear.dir}/lib"/>
         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
index d5a3262027467d039d0cf5f74b7693d8f74d6494..4203e6b9e9f4270b66642ef7e5f88b98dbe96fb5 100644 (file)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=096a9654
+build.xml.data.CRC32=99c0adbf
 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=096a9654
-nbproject/build-impl.xml.script.CRC32=68bd0df7
+nbproject/build-impl.xml.data.CRC32=99c0adbf
+nbproject/build-impl.xml.script.CRC32=9f98b4d1
 nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.51.1
index 2d3336f0353154731defb92192b702c9b12abb35..e0224b9dd270dde8e862dfd97265134ee8993e35 100644 (file)
@@ -18,12 +18,15 @@ 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.jcoreee.jar=lib\\jcoreee.jar
+file.reference.juser-lib.jar=lib/juser-lib.jar
 includes=**
 j2ee.compile.on.save=true
 j2ee.deploy.on.save=true
 j2ee.platform=1.7
-j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar
+j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar
 j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
 j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
 j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar
@@ -34,6 +37,8 @@ jar.compress=false
 jar.name=addressbook-ejb.jar
 jars.in.ejbjar=false
 javac.classpath=\
+    ${file.reference.jcoreee.jar}:\
+    ${file.reference.juser-lib.jar}:\
     ${reference.addressbook-lib.jar}
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
@@ -72,6 +77,8 @@ 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.jcoreee.jar=../jcoreee/src/
+source.reference.juser-lib.jar=../juser-lib/src/
 source.root=src
 src.dir=${source.root}/java
 test.src.dir=test
index 7a3905f93bfdd64af42ddfca65f04016ddbd9a77..07a88f3fa3a31fb050e75b06ef6a445fcf211512 100644 (file)
@@ -5,6 +5,8 @@
         <data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
             <name>addressbook-ejb</name>
             <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">reference.addressbook-lib.jar</included-library>
             <source-roots>
                 <root id="src.dir"/>
diff --git a/src/conf/beans.xml b/src/conf/beans.xml
new file mode 100644 (file)
index 0000000..0f4e2aa
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+          bean-discovery-mode="all">
+</beans>
diff --git a/src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java b/src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java
new file mode 100644 (file)
index 0000000..191c4b1
--- /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.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;
+}