+/*
+ * 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.jsfcore.beans;
+
+import javax.enterprise.context.Dependent;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * A general bean class. Do not put things in here that are not serializable.
+ * The logger is currently not serializeable, so you will get error messages.
+ *
+ * @author Roland Haeder
+ */
+@Dependent
+public abstract class BaseFrameworkBean implements FrameworkBean {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 83258139481372814L;
+
+ /**
+ * Class' logger
+ */
+ private final Logger LOG;
+
+ /**
+ * Initializer
+ */
+ {
+ // Get logger
+ this.LOG = LogManager.getLogger(this);
+ }
+
+ /**
+ * Protected constructor, please don't add init() call here.
+ */
+ protected BaseFrameworkBean () {
+ }
+
+ /**
+ * Getter for logger
+ *
+ * @return Logger
+ */
+ protected Logger getLogger () {
+ return this.LOG;
+ }
+
+ /**
+ * Super initialization method. Do not set @PostConstruct here. If you overwrite this method, please call it
+ * before (!) your own initialization.
+ *
+ * @throws RuntimeException If something unexpected happens
+ */
+ @Override
+ public void init () throws RuntimeException {
+ }
+}