<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.jcore-logger-lib.jar}" todir="${build.classes.dir}"/>
+ <copyfiles files="${file.reference.jcountry-core.jar}" todir="${build.classes.dir}"/>
+ <copyfiles files="${file.reference.jcountry-lib.jar}" todir="${build.classes.dir}"/>
<copyfiles files="${file.reference.jshop-core.jar}" todir="${build.classes.dir}"/>
<copyfiles files="${file.reference.jshop-ee-lib.jar}" todir="${build.classes.dir}"/>
<copyfiles files="${reference.PizzaService-lib.jar}" todir="${build.classes.dir}"/>
<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.jcore-logger-lib.jar}" property="manifest.file.reference.jcore-logger-lib.jar"/>
+ <basename file="${file.reference.jcountry-core.jar}" property="manifest.file.reference.jcountry-core.jar"/>
+ <basename file="${file.reference.jcountry-lib.jar}" property="manifest.file.reference.jcountry-lib.jar"/>
<basename file="${file.reference.jshop-core.jar}" property="manifest.file.reference.jshop-core.jar"/>
<basename file="${file.reference.jshop-ee-lib.jar}" property="manifest.file.reference.jshop-ee-lib.jar"/>
<basename file="${reference.PizzaService-lib.jar}" property="manifest.reference.PizzaService-lib.jar"/>
<basename file="${file.reference.cdi-api.jar}" property="manifest.file.reference.cdi-api.jar"/>
<manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
- <attribute name="Extension-List" value="jar-1 jar-2 jar-3 jar-4 jar-5 jar-6 "/>
+ <attribute name="Extension-List" value="jar-1 jar-2 jar-3 jar-4 jar-5 jar-6 jar-7 jar-8 "/>
<attribute name="jar-1-Extension-Name" value="${manifest.file.reference.jcoreee.jar}"/>
<attribute name="jar-2-Extension-Name" value="${manifest.file.reference.jcore-logger-lib.jar}"/>
- <attribute name="jar-3-Extension-Name" value="${manifest.file.reference.jshop-core.jar}"/>
- <attribute name="jar-4-Extension-Name" value="${manifest.file.reference.jshop-ee-lib.jar}"/>
- <attribute name="jar-5-Extension-Name" value="${manifest.reference.PizzaService-lib.jar}"/>
- <attribute name="jar-6-Extension-Name" value="${manifest.file.reference.cdi-api.jar}"/>
+ <attribute name="jar-3-Extension-Name" value="${manifest.file.reference.jcountry-core.jar}"/>
+ <attribute name="jar-4-Extension-Name" value="${manifest.file.reference.jcountry-lib.jar}"/>
+ <attribute name="jar-5-Extension-Name" value="${manifest.file.reference.jshop-core.jar}"/>
+ <attribute name="jar-6-Extension-Name" value="${manifest.file.reference.jshop-ee-lib.jar}"/>
+ <attribute name="jar-7-Extension-Name" value="${manifest.reference.PizzaService-lib.jar}"/>
+ <attribute name="jar-8-Extension-Name" value="${manifest.file.reference.cdi-api.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.jcore-logger-lib.jar}" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jcountry-core.jar}" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jcountry-lib.jar}" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.jshop-core.jar}" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.jshop-ee-lib.jar}" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${reference.PizzaService-lib.jar}" todir="${dist.ear.dir}/lib"/>
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
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
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}:\
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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.j2ee.ejbjarproject</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
- <name>PizzaService-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.jcore-logger-lib.jar</included-library>
- <included-library dirs="200">file.reference.jshop-core.jar</included-library>
- <included-library dirs="200">file.reference.jshop-ee-lib.jar</included-library>
- <included-library dirs="200">reference.PizzaService-lib.jar</included-library>
- <included-library dirs="200">file.reference.cdi-api.jar</included-library>
- <source-roots>
- <root id="src.dir"/>
- </source-roots>
- <test-roots>
- <root id="test.src.dir"/>
- </test-roots>
- </data>
- <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
- <definitions>lib/nblibraries.properties</definitions>
- </libraries>
- <references xmlns="http://www.netbeans.org/ns/ant-project-references/2">
- <reference>
- <foreign-project>PizzaService-lib</foreign-project>
- <artifact-type>jar</artifact-type>
- <script>${project.PizzaService-lib}/build.xml</script>
- <target>jar</target>
- <clean-target>clean</clean-target>
- <id>jar</id>
- </reference>
- </references>
- </configuration>
+ <type>org.netbeans.modules.j2ee.ejbjarproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
+ <name>PizzaService-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.jcore-logger-lib.jar</included-library>
+ <included-library dirs="200">file.reference.jcountry-core.jar</included-library>
+ <included-library dirs="200">file.reference.jcountry-lib.jar</included-library>
+ <included-library dirs="200">file.reference.jshop-core.jar</included-library>
+ <included-library dirs="200">file.reference.jshop-ee-lib.jar</included-library>
+ <included-library dirs="200">reference.PizzaService-lib.jar</included-library>
+ <included-library dirs="200">file.reference.cdi-api.jar</included-library>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
+ <definitions>lib/nblibraries.properties</definitions>
+ </libraries>
+ <references xmlns="http://www.netbeans.org/ns/ant-project-references/2">
+ <reference>
+ <foreign-project>PizzaService-lib</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>${project.PizzaService-lib}/build.xml</script>
+ <target>jar</target>
+ <clean-target>clean</clean-target>
+ <id>jar</id>
+ </reference>
+ </references>
+ </configuration>
</project>
--- /dev/null
+/*
+ * 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.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
+ * <p>
+ * @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<Country> allCountries () {
+ // Init query
+ Query query = this.getEntityManager().createNamedQuery("AllCountries"); //NOI18N
+
+ // Return it
+ return query.getResultList();
+ }
+
+}