From: Roland Haeder Date: Fri, 9 Oct 2015 07:59:12 +0000 (+0200) Subject: Initial creation of first addressbook EJB. This requires adding some own libs and... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f1cb5d904c918159fa5e9ce398d9711b5b9d7fbb;p=addressbook-mailer-ejb.git Initial creation of first addressbook EJB. This requires adding some own libs and updating project files Signed-off-by:Roland Häder --- diff --git a/.gitignore b/.gitignore index 315ea15..bc920a3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 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 index 0000000..a1cdc14 Binary files /dev/null and b/lib/juser-lib.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index aa0c0bc..75d0db9 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -141,6 +141,13 @@ is divided into following sections: + + + + + + + @@ -819,16 +826,24 @@ exists or setup the property manually. For example like this: + + + + - - + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index d5a3262..4203e6b 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -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 diff --git a/nbproject/project.properties b/nbproject/project.properties index 2d3336f..e0224b9 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -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 diff --git a/nbproject/project.xml b/nbproject/project.xml index 7a3905f..07a88f3 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -5,6 +5,8 @@ addressbook-ejb 1.6.5 + file.reference.jcoreee.jar + file.reference.juser-lib.jar reference.addressbook-lib.jar diff --git a/src/conf/beans.xml b/src/conf/beans.xml new file mode 100644 index 0000000..0f4e2aa --- /dev/null +++ b/src/conf/beans.xml @@ -0,0 +1,6 @@ + + + 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 index 0000000..191c4b1 --- /dev/null +++ b/src/java/org/mxchange/addressbook/model/addressbooks/AddressbookSessionBean.java @@ -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 . + */ +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 + *

+ * @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; +}