]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 3 Sep 2017 01:31:36 +0000 (03:31 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 16 Sep 2017 13:33:46 +0000 (15:33 +0200)
- no more fully container-independency in favour of caching
- removed gf-client (no more Glassfish for already a long time)
- used `@NamedCache` (Payara-specific) for annotating fields, very nice, should
  become generic one day

Signed-off-by: Roland Häder <roland@mxchange.org>
21 files changed:
lib/gf-client.jar [deleted file]
lib/nblibraries.properties
lib/payara-api/payara-api.jar [new file with mode: 0644]
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/pizzaapplication/beans/business/basicdata/PizzaBusinessDataWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/business/employee/PizzaCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/checkout/PizzaCheckoutWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaAdminContactPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/phone/PizzaContactPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/country/PizzaCountryWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/mobileprovider/PizzaMobileProviderWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/phone/PizzaPhoneWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/receipt/PizzaReceiptWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebRequestController.java
src/java/org/mxchange/pizzaapplication/beans/user/activity/PizzaUserActivityWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/email_address/PizzaEmailChangeWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/register/PizzaUserRegisterWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/user/resendlink/PizzaResendLinkWebRequestBean.java

diff --git a/lib/gf-client.jar b/lib/gf-client.jar
deleted file mode 100644 (file)
index 2f369f3..0000000
Binary files a/lib/gf-client.jar and /dev/null differ
index e8a8708909206230b08d116bc20b90d8bef792b3..94a5e000df95dc6fe1eebee81c65d57d065cb82a 100644 (file)
@@ -13,11 +13,9 @@ libs.CopyLibs.classpath=\
     ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
 libs.CopyLibs.displayName=CopyLibs Task
 libs.CopyLibs.prop-version=2.0
-libs.JCache_CDI.classpath=\
-    ${base}/JCache_CDI/jcache-cdi-0.1-SNAPSHOT.jar
-libs.JCache_CDI.displayName=JCache CDI
-libs.JCache_CDI.src=\
-    ${base}/JCache_CDI/jcache-cdi-0.1-SNAPSHOT-sources.jar!//
+libs.payara-api.classpath=\
+    ${base}/payara-api/payara-api.jar
+libs.payara-api.displayName=Payara API
 libs.primefaces.classpath=\
     ${base}/primefaces/primefaces-5.3.jar
 libs.primefaces.displayName=PrimeFaces 5.3
diff --git a/lib/payara-api/payara-api.jar b/lib/payara-api/payara-api.jar
new file mode 100644 (file)
index 0000000..02de279
Binary files /dev/null and b/lib/payara-api/payara-api.jar differ
index 9e5d96877e5dc6d41c91803b3af4cc1c151b3bf2..7d73b937d6624b384aa583611c6b5750197ccdfb 100644 (file)
@@ -36,7 +36,6 @@ dist.war=${dist.dir}/${war.name}
 endorsed.classpath=
 excludes=
 file.reference.cdi-api.jar=lib/cdi-api.jar
-file.reference.gf-client.jar=lib/gf-client.jar
 file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar
 file.reference.jcontacts-business-lib.jar=lib/jcontacts-business-lib.jar
 file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
@@ -98,10 +97,10 @@ javac.classpath=\
     ${reference.pizzaservice-core.jar}:\
     ${reference.pizzaservice-lib.jar}:\
     ${file.reference.cdi-api.jar}:\
-    ${file.reference.gf-client.jar}:\
     ${libs.apache_poi.classpath}:\
     ${libs.primefaces.classpath}:\
-    ${libs.cache.classpath}
+    ${libs.cache.classpath}:\
+    ${libs.payara-api.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
index 0fddd02c3a67cdc299ce950c0315153ee63b5ffc..02b1a1f0fb3f73e90207f5873b7c37587b52f64a 100644 (file)
@@ -81,9 +81,6 @@
                 <library dirs="200">
                     <file>${file.reference.cdi-api.jar}</file>
                 </library>
-                <library dirs="200">
-                    <file>${file.reference.gf-client.jar}</file>
-                </library>
                 <library dirs="200">
                     <file>${libs.apache_poi.classpath}</file>
                 </library>
@@ -93,6 +90,9 @@
                 <library dirs="200">
                     <file>${libs.cache.classpath}</file>
                 </library>
+                <library dirs="200">
+                    <file>${libs.payara-api.classpath}</file>
+                </library>
             </web-module-libraries>
             <web-module-additional-libraries/>
             <source-roots>
index 2b40cfc3fba1011db9abfd3792f9d7f75545d1c0..bdd880e7d676b530ee02ee12f1e62f8dbda0f392 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.business.basicdata;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
@@ -56,7 +58,7 @@ public class PizzaBusinessDataWebRequestBean extends BasePizzaController impleme
         * A list of all registered companies (globally)
         */
        @Inject
-       @Cached (cacheName = "basicDataCache")
+       @NamedCache (cacheName = "basicDataCache", managementEnabled = true)
        private transient Cache<Long, BusinessBasicData> basicDataCache;
 
        /**
index 5ab3a04f3bba6bc283106b9c951586a57e07fbf6..f7ec105acffb9367742883b1522795f53fddaa2f 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.business.employee;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -53,7 +54,7 @@ public class PizzaCompanyEmployeeWebRequestBean extends BasePizzaController impl
         * List of all company employees
         */
        @Inject
-       @Cached(cacheName = "companyEmployeeCache")
+       @NamedCache (cacheName = "companyEmployeeCache", managementEnabled = true)
        private transient Cache<Long, Employee> companyEmployeeCache;
 
        /**
index 45a22202b475077007a94fb556243f3d70448b64..25a065ba910c5164c1738032e8afa14da4aad509 100644 (file)
@@ -42,9 +42,9 @@ import org.mxchange.jshopcore.wrapper.CheckoutWrapper;
 import org.mxchange.jshopcore.wrapper.WrapableCheckout;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.basket.PizzaBasketWebSessionController;
+import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.customer.PizzaCustomerWebSessionController;
 import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperController;
-import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.receipt.PizzaReceiptWebRequestController;
 
 /**
index a6b79abd0e663c9bd90e5d4e78d4890d1c7625ae..7d374b892c6ba9bc741dca530a7e365bcf680dd2 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.contact;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.Date;
@@ -24,8 +25,9 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
@@ -38,7 +40,6 @@ import org.mxchange.jcontacts.model.contact.ContactUtils;
 import org.mxchange.jcontacts.model.contact.UserContact;
 import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
 import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
@@ -54,6 +55,7 @@ import org.mxchange.juserlogincore.events.login.ObservableUserLoggedInEvent;
 import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
 import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
 
 /**
@@ -62,7 +64,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("contactController")
-@SessionScoped
+@RequestScoped
 public class PizzaContactWebRequestBean extends BasePizzaController implements PizzaContactWebRequestController {
 
        /**
@@ -100,7 +102,7 @@ public class PizzaContactWebRequestBean extends BasePizzaController implements P
         * Contact list
         */
        @Inject
-       @Cached (cacheName = "contactsCache")
+       @NamedCache (cacheName = "contactsCache", managementEnabled = true)
        private transient Cache<Long, Contact> contactsCache;
 
        /**
@@ -117,7 +119,7 @@ public class PizzaContactWebRequestBean extends BasePizzaController implements P
         * Email address list
         */
        @Inject
-       @Cached (cacheName = "emailAddressCache")
+       @NamedCache (cacheName = "emailAddressCache", managementEnabled = true)
        private transient Cache<Long, String> emailAddressCache;
 
        /**
index 1ee886275bdad606bda1c943aaf9e8455b109017..b804ab1b695b78f8341be65ed2ba955d02c69eb8 100644 (file)
@@ -25,7 +25,6 @@ import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
 import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
@@ -41,6 +40,7 @@ import org.mxchange.jcontacts.events.mobile.linked.AdminLinkedMobileNumberEvent;
 import org.mxchange.jcontacts.events.mobile.linked.ObservableAdminLinkedMobileNumberEvent;
 import org.mxchange.jcontacts.events.mobile.unlinked.AdminUnlinkedMobileNumberEvent;
 import org.mxchange.jcontacts.events.mobile.unlinked.ObservableAdminUnlinkedMobileNumberEvent;
+import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote;
 import org.mxchange.jcountry.model.data.Country;
 import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent;
@@ -52,9 +52,9 @@ import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.model.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
 import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
-import org.mxchange.jphone.model.phonenumbers.model.mobileprovider.MobileProvider;
+import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.phone.PizzaAdminPhoneWebRequestController;
index 3de41314ed2ce93652ca2db4debdce74661314cb..7c1ffd64a40b36f9a87289b8da61cdc8fcaf66d8 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.contact.phone;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
-import javax.enterprise.context.SessionScoped;
+import javax.cache.Cache;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -47,7 +49,7 @@ import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestControl
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("contactPhoneController")
-@SessionScoped
+@RequestScoped
 public class PizzaContactPhoneWebRequestBean extends BasePizzaController implements PizzaContactPhoneWebRequestController {
 
        /**
@@ -67,7 +69,7 @@ public class PizzaContactPhoneWebRequestBean extends BasePizzaController impleme
         * relationship (one contact, many numbers).
         */
        @Inject
-       @Cached(cacheName = "contactsPhoneCache")
+       @NamedCache (cacheName = "contactsPhoneCache", managementEnabled = true)
        private transient Cache<DialableNumber, List<Contact>> contactsPhoneCache;
 
        /**
index fb4e088e7f335105ddfe2d348e32b52944a3c470..eaa490f3daf913cace132a60167685601c297c93 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.country;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
@@ -55,7 +57,7 @@ public class PizzaCountryWebRequestBean extends BasePizzaController implements P
         * List of all countries
         */
        @Inject
-       @Cached (cacheName = "countryCache")
+       @NamedCache (cacheName = "countryCache", managementEnabled = true)
        private transient Cache<Long, Country> countryCache;
 
        /**
index d623fd7d630657baa1c040753c1387463468c286..4eacb4e0c1037e415c642c537d93db5676901b65 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.mobileprovider;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -56,7 +57,7 @@ public class PizzaMobileProviderWebRequestBean extends BasePizzaController imple
         * "Cached" list of mobile providers
         */
        @Inject
-       @Cached (cacheName = "mobileProviderCache")
+       @NamedCache (cacheName = "mobileProviderCache", managementEnabled = true)
        private transient Cache<Long, MobileProvider> mobileProviderCache;
 
        /**
index 5c5e2a96f6ec57b492bafe94605f3cb22b8d358a..dca8cd8ce22776aa5a6856c6e715c9aa115a212d 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.phone;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
-import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -52,7 +54,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("phoneController")
-@ApplicationScoped
+@RequestScoped
 public class PizzaPhoneWebRequestBean extends BasePizzaController implements PizzaPhoneWebRequestController {
 
        /**
@@ -64,21 +66,21 @@ public class PizzaPhoneWebRequestBean extends BasePizzaController implements Piz
         * All fax numbers
         */
        @Inject
-       @Cached(cacheName = "faxNumberCache")
+       @NamedCache (cacheName = "faxNumberCache", managementEnabled = true)
        private transient Cache<Long, DialableFaxNumber> faxNumberCache;
 
        /**
         * All land-line numbers
         */
        @Inject
-       @Cached(cacheName = "landLineNumberCache")
+       @NamedCache (cacheName = "landLineNumberCache", managementEnabled = true)
        private transient Cache<Long, DialableLandLineNumber> landLineNumberCache;
 
        /**
         * All mobile numbers
         */
        @Inject
-       @Cached(cacheName = "mobileNumberCache")
+       @NamedCache (cacheName = "mobileNumberCache", managementEnabled = true)
        private transient Cache<Long, DialableMobileNumber> mobileNumberCache;
 
        /**
index 8d17abeca25f9eb2a6e7c49c2b68de4a5e9a6dbb..a27cc1fd544241d1203f9e18be110a357b4bc37e 100644 (file)
@@ -17,7 +17,7 @@
 package org.mxchange.pizzaapplication.beans.receipt;
 
 import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.faces.FacesException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -34,7 +34,7 @@ import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperControlle
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("receiptController")
-@SessionScoped
+@RequestScoped
 public class PizzaReceiptWebRequestBean extends BasePizzaController implements PizzaReceiptWebRequestController {
 
        /**
index 24cc2a1c068f53d67c870a0b29db26116e2490ea..a86c718694a0cc8c2dd92d5c9a320f00a1d287c8 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.pizzaapplication.beans.user;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -23,8 +24,9 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
@@ -34,7 +36,6 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
 import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
 import org.mxchange.jusercore.events.user.clear.username.ObservableClearUserNameEvent;
@@ -70,7 +71,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("userController")
-@SessionScoped
+@RequestScoped
 public class PizzaUserWebRequestBean extends BasePizzaController implements PizzaUserWebRequestController {
 
        /**
@@ -114,18 +115,18 @@ public class PizzaUserWebRequestBean extends BasePizzaController implements Pizz
        @EJB (lookup = "java:global/jfinancials-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote")
        private UserSessionBeanRemote userBean;
 
-       /**
-        * User id
-        */
-       private Long userId;
-
        /**
         * A list of all user profiles
         */
        @Inject
-       @Cached (cacheName = "userCache")
+       @NamedCache (cacheName = "userCache", managementEnabled = true)
        private transient Cache<Long, User> userCache;
 
+       /**
+        * User id
+        */
+       private Long userId;
+
        /**
         * Login controller (bean)
         */
@@ -141,7 +142,7 @@ public class PizzaUserWebRequestBean extends BasePizzaController implements Pizz
         * User name list
         */
        @Inject
-       @Cached (cacheName = "userNameCache")
+       @NamedCache (cacheName = "userNameCache", managementEnabled = true)
        private transient Cache<Long, String> userNameCache;
 
        /**
index d3d0dec7342b8bdc7cdc0ec197df89fd66434f56..665ffb88720c14ae2ee3d128bc465cd090cdd850 100644 (file)
@@ -44,16 +44,6 @@ public interface PizzaUserWebRequestController extends Serializable {
         */
        String getUserPassword ();
 
-       /**
-        * Clears both user passwords
-        */
-       void clearUserPasswords ();
-
-       /**
-        * Clears user name
-        */
-       void clearUserName ();
-
        /**
         * Checks if both user passwords are left empty and if this is enabled
         * (allowed) in context parameter. If true, the calling bean should create a
@@ -71,13 +61,6 @@ public interface PizzaUserWebRequestController extends Serializable {
         */
        List<User> allUsers ();
 
-       /**
-        * All public user profiles
-        * <p>
-        * @return A list of all public user profiles
-        */
-       List<User> allVisibleUsers ();
-
        /**
         * Checks whether the given contact is a user
         * <p>
@@ -87,14 +70,6 @@ public interface PizzaUserWebRequestController extends Serializable {
         */
        boolean isContactFound (final Contact contact);
 
-       /**
-        * Checks whether a public user account is registered. This means that at
-        * least one user profile has its flag "public user profile" enabled.
-        * <p>
-        * @return Whether at least one user has a public profile
-        */
-       boolean isVisibleUserFound ();
-
        /**
         * Checks whether given user instance's name is used
         * <p>
index 7cfdde383ab101e31aee213ae41c29cdcacb33d0..c9857a1247b17473ae12be9accade86401204ed1 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.user.activity;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.GregorianCalendar;
 import java.util.LinkedList;
 import java.util.List;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
@@ -77,8 +79,8 @@ public class PizzaUserActivityWebRequestBean extends BasePizzaController impleme
         * "Cache" for activity log per user
         */
        @Inject
-       @Cached(cacheName = "usersActivityCache")
-       private transient Cache<User, List<LogableUserActivity>> usersActivityCache;
+       @NamedCache (cacheName = "userActivityCache", managementEnabled = true)
+       private transient Cache<User, List<LogableUserActivity>> userActivityCache;
 
        /**
         * Default constructor
@@ -506,9 +508,9 @@ public class PizzaUserActivityWebRequestBean extends BasePizzaController impleme
                List<LogableUserActivity> list = new LinkedList<>();
 
                // Is the user set?
-               if (this.usersActivityCache.containsKey(this.getUser())) {
+               if (this.userActivityCache.containsKey(this.getUser())) {
                        // Return it
-                       list.addAll(this.usersActivityCache.get(this.getUser()));
+                       list.addAll(this.userActivityCache.get(this.getUser()));
 
                        // Sort list and reverse it
                        Collections.sort(list, new UserActivityLogTimestampComparator());
@@ -548,13 +550,13 @@ public class PizzaUserActivityWebRequestBean extends BasePizzaController impleme
                // Put all in map, per-user
                for (final LogableUserActivity userActivity : list) {
                        // Is the list there?
-                       if (!this.usersActivityCache.containsKey(userActivity.getActivityUser())) {
+                       if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
                                // Init list
-                               this.usersActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
+                               this.userActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
                        }
 
                        // Add by user instance
-                       boolean added = this.usersActivityCache.get(userActivity.getActivityUser()).add(userActivity);
+                       boolean added = this.userActivityCache.get(userActivity.getActivityUser()).add(userActivity);
 
                        // Should be added
                        assert (added) : "Activity log not added"; //NOI18N
@@ -663,13 +665,13 @@ public class PizzaUserActivityWebRequestBean extends BasePizzaController impleme
                }
 
                // Is it there?
-               if (!this.usersActivityCache.containsKey(userActivity.getActivityUser())) {
+               if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
                        // Init it
-                       this.usersActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
+                       this.userActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
                }
 
                // Add activity to log
-               this.usersActivityCache.get(userActivity.getActivityUser()).add(userActivity);
+               this.userActivityCache.get(userActivity.getActivityUser()).add(userActivity);
        }
 
 }
index a94f08d0edd1654d49ef053906a7f1c9d6aa669b..9391927abb19d8b8c109cac7e632c68671876bd2 100644 (file)
  */
 package org.mxchange.pizzaapplication.beans.user.email_address;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
 import javax.annotation.PostConstruct;
+import javax.cache.Cache;
 import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -43,7 +45,7 @@ import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionCo
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("userEmailChangeController")
-@SessionScoped
+@RequestScoped
 public class PizzaEmailChangeWebRequestBean extends BasePizzaController implements PizzaEmailChangeWebRequestController {
 
        /**
@@ -77,7 +79,7 @@ public class PizzaEmailChangeWebRequestBean extends BasePizzaController implemen
         * Local list of already queued email addresses
         */
        @Inject
-       @Cached (cacheName = "queuedEmailCache")
+       @NamedCache (cacheName = "queuedEmailCache", managementEnabled = true)
        private transient Cache<String, Boolean> queuedEmailCache;
 
        /**
index 44b682af4bd8e5a0e758110fe9c19bcd4238d9aa..e7dfd6bb913144d2421400023c99960e0ba698b5 100644 (file)
@@ -26,7 +26,6 @@ import javax.inject.Named;
 import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontacts.model.contact.UserContact;
 import org.mxchange.jcoreee.utils.FacesUtils;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
 import org.mxchange.jusercore.events.user.clear.password.ClearUserPasswordEvent;
 import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
 import org.mxchange.jusercore.events.user.clear.username.ClearUserNameEvent;
@@ -48,6 +47,7 @@ import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
 import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 
 /**
  * A web bean for user registration
index 63d428bc2af288903f69b337758e597d47f61a0a..386794d8a86144d33058cce85b53c2e2edc4d860 100644 (file)
@@ -18,7 +18,7 @@ package org.mxchange.pizzaapplication.beans.user.resendlink;
 
 import java.util.Locale;
 import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.event.Observes;
 import javax.enterprise.inject.Any;
@@ -26,7 +26,6 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
 import org.mxchange.jcoreee.utils.FacesUtils;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
 import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
 import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
@@ -38,6 +37,7 @@ import org.mxchange.juserlogincore.events.resendlink.UserResendLinkAccountEvent;
 import org.mxchange.juserlogincore.model.user.resendlink.ResendLinkSessionBeanRemote;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
 
 /**
  * A web session-scoped bean for resending confirmation link
@@ -45,7 +45,7 @@ import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSession
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("userResendConfirmationController")
-@SessionScoped
+@RequestScoped
 public class PizzaResendLinkWebRequestBean extends BasePizzaController implements PizzaResendLinkWebRequestController {
 
        /**