From cad0d61da236755a1f1428ce7df980e3c88ed1d7 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 12 Oct 2015 09:08:12 +0200 Subject: [PATCH] =?utf8?q?added=20jcountry-core=20+=20jcountry-lib=20+=20s?= =?utf8?q?ingleton=20bean=20for=20country=20data=20retrieval=20Signed-off-?= =?utf8?q?by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- PizzaService-ejb/lib/jcountry-core.jar | Bin 0 -> 5669 bytes PizzaService-ejb/lib/jcountry-lib.jar | Bin 0 -> 1284 bytes PizzaService-ejb/nbproject/build-impl.xml | 18 +++-- .../nbproject/genfiles.properties | 4 +- PizzaService-ejb/nbproject/project.properties | 8 ++- PizzaService-ejb/nbproject/project.xml | 66 +++++++++--------- .../PizzaServiceCountrySingletonBean.java | 49 +++++++++++++ 7 files changed, 105 insertions(+), 40 deletions(-) create mode 100644 PizzaService-ejb/lib/jcountry-core.jar create mode 100644 PizzaService-ejb/lib/jcountry-lib.jar create mode 100644 PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java diff --git a/PizzaService-ejb/lib/jcountry-core.jar b/PizzaService-ejb/lib/jcountry-core.jar new file mode 100644 index 0000000000000000000000000000000000000000..7b77495b49d27015044d271af032a2b6e9f44b24 GIT binary patch literal 5669 zcmeHLO>-Pa8Gd^u?P|v>SzlHn*|9fHh$Y+lFtKANc1%{QmDyNd(XIt{2+L@<-;Y*r-tFtxhz5zSEwA38(37TqS}T-ubH(+Qg)crM+H6Cw0{Yj9`cLbC zi{Au(ZRlEVy|_{+mFL%1)^y8w$X#!4n>(&yTd!oV%r6dUIV;qXYv|Qoo<$ovU!K1@ zq~#s1d%QNcbSUuG=NBt4U7y=oypo;SaP+Flvw7QT*pBW&;f zM+_;%-a&O&x9YqHbTSHkRJEIy=N$HsIo(yJrh9rs@SyUej|Tg&8Tifg7R>u2&sR;| zbwB&!4}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Q7_F*b4{O5_)@MBb!t#M#J+D3M=*$gjH)k%49; z2M>Hp>3S9Zmw?ZuFJAf!WqwaXzl=EG`H-q~+wRl!O{zdeAAL*Wb=r~dstoLx(OyF@ zA|t1Vt&ciBcHboS8W|W8eUIpEm(0z(EHTm7{iY9k@r=;tIq_~^=K1%2foR;#pAZnw zlMgPTY>S5O0ecNDuIT(n4E{HKid@-CLR{JTkC6B$K0C5&FHv!Y=RZPp6rsICw0#fK zONY493v?8^>JX=uBlCz}@wHSv`QW>~6{+)_e?1YUmx^3<1X}-&<&B@Bq^GnlgKA6j SKvGB#;_m`1_Fv*eLH`D^68E+M literal 0 HcmV?d00001 diff --git a/PizzaService-ejb/lib/jcountry-lib.jar b/PizzaService-ejb/lib/jcountry-lib.jar new file mode 100644 index 0000000000000000000000000000000000000000..f917c1d8d53b77ff5af0d28950ce9c75cc374106 GIT binary patch literal 1284 zcmah|O>fgc5S>lZnwT0D6mj7|j;$beDn0@YLUKcbsw8cME3RncF78HKyIOA$<$%;5 z!ma;+8wW0M>aXaD8-Jl-BqYW_RBVy2X+Sa08(Es`nb^q6{VIw-4Of z?q0{ax&RoY&~1eNs03dEgzHhkkwW|K-fpMu9oYR&pN9NBi&gC{lQECN?dq0Yw@f#j zTX9dQf5fV|hCiR%k1ew$8CC4CwsWfS4ZHsCX`?o*Z&f$;CG`cXwjy~FNvcqB(=sh{ zR#pzQG=q-rb~foJ~!Ui9>7re~ENz+^Minwl?B#`L1G^jU`s)VZHituBDT zlmE+JvsD7?lllc-oU=b1F<%j=OqO`$cuaCC_$N9PY?T0k0*)dc3Mmn^_6mNj;#UC- zoT2}5RvvUop;BDl4~W88hu^M#r + + @@ -836,23 +838,29 @@ exists or setup the property manually. For example like this: + + - + - - - - + + + + + + + + diff --git a/PizzaService-ejb/nbproject/genfiles.properties b/PizzaService-ejb/nbproject/genfiles.properties index a8b312c..084f710 100644 --- a/PizzaService-ejb/nbproject/genfiles.properties +++ b/PizzaService-ejb/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=cabe2e92 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=8a7af502 -nbproject/build-impl.xml.script.CRC32=d1bf7afb +nbproject/build-impl.xml.data.CRC32=b7f399f9 +nbproject/build-impl.xml.script.CRC32=dcb101ec nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.51.1 diff --git a/PizzaService-ejb/nbproject/project.properties b/PizzaService-ejb/nbproject/project.properties index eebe2f6..347c750 100644 --- a/PizzaService-ejb/nbproject/project.properties +++ b/PizzaService-ejb/nbproject/project.properties @@ -23,13 +23,15 @@ excludes= file.reference.cdi-api.jar=lib/cdi-api.jar file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar file.reference.jcoreee.jar=lib/jcoreee.jar +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jcountry-lib.jar=lib/jcountry-lib.jar file.reference.jshop-core.jar=lib/jshop-core.jar file.reference.jshop-ee-lib.jar=lib/jshop-ee-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 @@ -42,6 +44,8 @@ jars.in.ejbjar=true javac.classpath=\ ${file.reference.jcoreee.jar}:\ ${file.reference.jcore-logger-lib.jar}:\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jcountry-lib.jar}:\ ${file.reference.jshop-core.jar}:\ ${file.reference.jshop-ee-lib.jar}:\ ${reference.PizzaService-lib.jar}:\ @@ -85,6 +89,8 @@ runmain.jvmargs= source.encoding=UTF-8 source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/ source.reference.jcoreee.jar=../../jcoreee/src/ +source.reference.jcountry-core.jar=../jcountry-core/src/ +source.reference.jcountry-lib.jar=../jcountry-lib/src/ source.reference.jshop-core.jar=../../jshop-core/src/ source.reference.jshop-ee-lib.jar=../../jshop-ee-lib/src/ source.root=src diff --git a/PizzaService-ejb/nbproject/project.xml b/PizzaService-ejb/nbproject/project.xml index e6cfa66..aec4efa 100644 --- a/PizzaService-ejb/nbproject/project.xml +++ b/PizzaService-ejb/nbproject/project.xml @@ -1,35 +1,37 @@ - org.netbeans.modules.j2ee.ejbjarproject - - - PizzaService-ejb - 1.6.5 - file.reference.jcoreee.jar - file.reference.jcore-logger-lib.jar - file.reference.jshop-core.jar - file.reference.jshop-ee-lib.jar - reference.PizzaService-lib.jar - file.reference.cdi-api.jar - - - - - - - - - lib/nblibraries.properties - - - - PizzaService-lib - jar - - jar - clean - jar - - - + org.netbeans.modules.j2ee.ejbjarproject + + + PizzaService-ejb + 1.6.5 + file.reference.jcoreee.jar + file.reference.jcore-logger-lib.jar + file.reference.jcountry-core.jar + file.reference.jcountry-lib.jar + file.reference.jshop-core.jar + file.reference.jshop-ee-lib.jar + reference.PizzaService-lib.jar + file.reference.cdi-api.jar + + + + + + + + + lib/nblibraries.properties + + + + PizzaService-lib + jar + + jar + clean + jar + + + diff --git a/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java b/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java new file mode 100644 index 0000000..cabd1f4 --- /dev/null +++ b/PizzaService-ejb/src/java/org/mxchange/jcountry/data/PizzaServiceCountrySingletonBean.java @@ -0,0 +1,49 @@ +/* + * 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.jcountry.data; + +import java.util.List; +import javax.ejb.Singleton; +import javax.ejb.Startup; +import javax.persistence.Query; +import org.mxchange.jcoreee.database.BaseDatabaseBean; + +/** + * A singleton bean for country informations + *

+ * @author Roland Haeder + */ +@Startup +@Singleton (name = "country", mappedName = "ejb/pizzaservice-singleton-country", description = "A singleton session bean for country informations") +public class PizzaServiceCountrySingletonBean extends BaseDatabaseBean implements CountrySingletonBeanRemote { + + /** + * Serial number + */ + private static final long serialVersionUID = 15_846_983_298_691_207L; + + @Override + @SuppressWarnings ("unchecked") + public List allCountries () { + // Init query + Query query = this.getEntityManager().createNamedQuery("AllCountries"); //NOI18N + + // Return it + return query.getResultList(); + } + +} -- 2.39.5