dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
+file.reference.jcore-logger-lib.jar=lib\\jcore-logger-lib.jar
file.reference.jcore-swing.jar=lib/jcore-swing.jar
file.reference.jcore.jar=lib/jcore.jar
file.reference.jcoreee.jar=lib/jcoreee.jar
file.reference.jshop-core.jar=lib/jshop-core.jar
file.reference.jshop-ee-lib.jar=lib/jshop-ee-lib.jar
-file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
-file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
javac.classpath=\
${file.reference.jcore.jar}:\
${file.reference.jcoreee.jar}:\
+ ${file.reference.jcore-logger-lib.jar}:\
${file.reference.jshop-core.jar}:\
${file.reference.jshop-ee-lib.jar}:\
${file.reference.jcore-swing.jar}:\
- ${reference.PizzaService-lib.jar}:\
- ${file.reference.log4j-api-2.3.jar}:\
- ${file.reference.log4j-core-2.3.jar}
+ ${reference.PizzaService-lib.jar}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=true
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
+source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/
source.reference.jcore-swing.jar=../jcore-swing/src/
source.reference.jcore.jar=../jcore/src/
source.reference.jcoreee.jar=../jcoreee/src/
--- /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.pizzaapplication;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoreeelogger.beans.local.logger.Log;
+import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
+
+/**
+ * A general Pizza-Service class
+ * <p>
+ * @author Roland Haeder
+ */
+public abstract class BasePizzaServiceSystem extends BaseFrameworkSystem {
+
+ /**
+ * Logger instance
+ */
+ @Log
+ private LoggerBeanLocal loggerBeanLocal;
+
+ /**
+ * Protected constructor
+ */
+ protected BasePizzaServiceSystem () {
+ // Try it
+ try {
+ // Get initial context
+ Context context = new InitialContext();
+
+ // Lookup logger
+ this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
+ } catch (final NamingException ex) {
+ // Throw again
+ throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+ }
+ }
+
+ /**
+ * Getter for logger instance
+ * <p>
+ * @return Logger instance
+ */
+ protected LoggerBeanLocal getLogger () {
+ return this.loggerBeanLocal;
+ }
+}
import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException;
import org.mxchange.jshopcore.model.category.Category;
import org.mxchange.jshopcore.model.product.Product;
+import org.mxchange.pizzaapplication.BasePizzaServiceSystem;
/**
* Main application class
* <p>
* @author Roland Haeder<roland@mxchange.org>
*/
-public class PizzaServiceApplication extends BaseFrameworkSystem implements PizzaApplication {
+public class PizzaServiceApplication extends BasePizzaServiceSystem implements PizzaApplication {
/**
* Default constructor