]> git.mxchange.org Git - jjobs-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>
Sun, 3 Sep 2017 16:39:13 +0000 (18:39 +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>
16 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/jjobs/beans/business/basicdata/JobsBusinessDataWebRequestBean.java
src/java/org/mxchange/jjobs/beans/business/employee/JobsCompanyEmployeeWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/phone/JobsContactPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/country/JobsCountryWebRequestBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsPhoneWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestController.java
src/java/org/mxchange/jjobs/beans/user/activity/JobsUserActivityWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/email_address/JobsEmailChangeWebRequestBean.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 6997be2666ddaccddebc9dcaa1baee847898b438..4a78467a2dab09f8ee1822ea275eb593888c7c32 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-6.0.jar
 libs.primefaces.displayName=PrimeFaces 6.0
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 0001f4de28020b8ef4a29fae8f34134d1741d61b..d8f0439d034f2d23e651591a5d3dcc05045d91c4 100644 (file)
@@ -40,7 +40,6 @@ file.reference.jaddressbook-lib.jar=lib/jaddressbook-lib.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.cdi-api.jar=lib/cdi-api.jar
-file.reference.gf-client.jar=lib/gf-client.jar
 file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
 file.reference.jcontacts-lib.jar=lib/jcontacts-lib.jar
 file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar
@@ -90,10 +89,10 @@ javac.classpath=\
     ${reference.jjobs-core.jar}:\
     ${reference.jjobs-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 f1ab73d02eb8ac077ba49e90b7b9806867d011a7..fc4a88cb64852861b4a65ba7b2f4301b24375dfd 100644 (file)
@@ -69,9 +69,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>
@@ -81,6 +78,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 403f38042a291fd7f6c292f769fee14008a20260..62f5ba125c32217b256e312c90b0b6143d562756 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.business.basicdata;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -30,7 +31,6 @@ import org.mxchange.jcontactsbusiness.basicdata.AdminBusinessDataSessionBeanRemo
 import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
 import org.mxchange.jcontactsbusiness.basicdata.BusinessDataSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.events.basicdata.added.ObservableAdminAddedBusinessBasicDataEvent;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jjobs.beans.BaseJobsController;
 
@@ -58,7 +58,7 @@ public class JobsBusinessDataWebRequestBean extends BaseJobsController implement
         * A list of all registered companies (globally)
         */
        @Inject
-       @Cached (cacheName = "basicDataCache")
+       @NamedCache (cacheName = "basicDataCache", managementEnabled = true)
        private transient Cache<Long, BusinessBasicData> basicDataCache;
 
        /**
index 9db724ff4565a65891f13151503e2110e61e9ecb..6fe69dd6207a0db29f26bd94c419dc418d393f92 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.business.employee;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -27,7 +28,6 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.employee.CompanyEmployeeSessionBeanRemote;
 import org.mxchange.jcontactsbusiness.employee.Employee;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
@@ -54,7 +54,7 @@ public class JobsCompanyEmployeeWebRequestBean extends BaseJobsController implem
         * List of all company employees
         */
        @Inject
-       @Cached(cacheName = "companyEmployeeCache")
+       @NamedCache (cacheName = "companyEmployeeCache", managementEnabled = true)
        private transient Cache<Long, Employee> companyEmployeeCache;
 
        /**
index 2e7951066dad5c76554c8b75acbf67a968946909..8079c24022eb1968c10b541cd163232f3821fdbe 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.contact;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.Date;
@@ -37,7 +38,6 @@ import org.mxchange.jcontacts.contact.UserContact;
 import org.mxchange.jcontacts.contact.title.PersonalTitle;
 import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.user.JobsUserWebRequestController;
@@ -101,7 +101,7 @@ public class JobsContactWebRequestBean extends BaseJobsController implements Job
         * Contact list
         */
        @Inject
-       @Cached (cacheName = "contactsCache")
+       @NamedCache (cacheName = "contactsCache", managementEnabled = true)
        private transient Cache<Long, Contact> contactsCache;
 
        /**
@@ -118,7 +118,7 @@ public class JobsContactWebRequestBean extends BaseJobsController implements Job
         * Email address list
         */
        @Inject
-       @Cached (cacheName = "emailAddressCache")
+       @NamedCache (cacheName = "emailAddressCache", managementEnabled = true)
        private transient Cache<Long, String> emailAddressCache;
 
        /**
index 865a63cca6619866cc2ed9d276b89f53a6833afe..ae18da6e1af5eacaf7cfa5c85fa84d6c66005e46 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.contact.phone;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.LinkedList;
 import java.util.List;
@@ -30,7 +31,6 @@ import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContac
 import org.mxchange.jcontacts.events.fax.unlinked.ObservableAdminUnlinkedFaxNumberEvent;
 import org.mxchange.jcontacts.events.landline.unlinked.ObservableAdminUnlinkedLandLineNumberEvent;
 import org.mxchange.jcontacts.events.mobile.unlinked.ObservableAdminUnlinkedMobileNumberEvent;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent;
 import org.mxchange.jphone.events.landline.created.ObservableCreatedLandLineNumberEvent;
@@ -68,7 +68,7 @@ public class JobsContactPhoneWebRequestBean extends BaseJobsController implement
         * relationship (one contact, many numbers).
         */
        @Inject
-       @Cached(cacheName = "contactsPhoneCache")
+       @NamedCache (cacheName = "contactsPhoneCache", managementEnabled = true)
        private transient Cache<DialableNumber, List<Contact>> contactsPhoneCache;
 
        /**
index 2d65948091d34d30b581e062cff5648e2a703ba9..6394bb232d11429c3a26a4b47f8a2819a4a3db1e 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.country;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -26,7 +27,6 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
 import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
@@ -56,7 +56,7 @@ public class JobsCountryWebRequestBean extends BaseJobsController implements Job
         * List of all countries
         */
        @Inject
-       @Cached (cacheName = "countryCache")
+       @NamedCache (cacheName = "countryCache", managementEnabled = true)
        private transient Cache<Long, Country> countryCache;
 
        /**
index cc71c8d47ace5ee76be5e0cffeff1b38387a2043..e53fb33c506a1e47299460b4edaa00d2e31b2f37 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.mobileprovider;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -27,7 +28,6 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.events.mobileprovider.added.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
@@ -57,7 +57,7 @@ public class JobsMobileProviderWebRequestBean extends BaseJobsController impleme
         * "Cached" list of mobile providers
         */
        @Inject
-       @Cached (cacheName = "mobileProviderCache")
+       @NamedCache (cacheName = "mobileProviderCache", managementEnabled = true)
        private transient Cache<Long, MobileProvider> mobileProviderCache;
 
        /**
index c945b1140cc56cce21229af24933ed68a28c4954..94748e7062d1bc5441685ac0e46ef1c75c79be3a 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.phone;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -33,7 +34,6 @@ import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContac
 import org.mxchange.jcontacts.events.fax.linked.ObservableAdminLinkedFaxNumberEvent;
 import org.mxchange.jcontacts.events.landline.linked.ObservableAdminLinkedLandLineNumberEvent;
 import org.mxchange.jcontacts.events.mobile.linked.ObservableAdminLinkedMobileNumberEvent;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.events.fax.deleted.AdminDeletedFaxNumberEvent;
 import org.mxchange.jphone.events.fax.updated.AdminUpdatedFaxNumberEvent;
@@ -65,21 +65,21 @@ public class JobsPhoneWebRequestBean extends BaseJobsController implements JobsP
         * 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 435417fc5769990e6d5cc44a380aca2145f2ed1c..a42107a5e5eaad01ed5b1819092f10b3b5380704 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.user;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -34,7 +35,6 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController;
 import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
@@ -118,7 +118,7 @@ public class JobsUserWebRequestBean extends BaseJobsController implements JobsUs
         * A list of all user profiles
         */
        @Inject
-       @Cached (cacheName = "userCache")
+       @NamedCache (cacheName = "userCache", managementEnabled = true)
        private transient Cache<Long, User> userCache;
 
        /**
@@ -141,7 +141,7 @@ public class JobsUserWebRequestBean extends BaseJobsController implements JobsUs
         * User name list
         */
        @Inject
-       @Cached (cacheName = "userNameCache")
+       @NamedCache (cacheName = "userNameCache", managementEnabled = true)
        private transient Cache<Long, String> userNameCache;
 
        /**
index 0c97da20bff0e219761a422e9476bdbdd1d75b46..3e71e8c11fe6905140955c612fc3037dc9df457e 100644 (file)
@@ -61,13 +61,6 @@ public interface JobsUserWebRequestController 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>
@@ -77,14 +70,6 @@ public interface JobsUserWebRequestController 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 5f3972168b3b7464601c2206d250b76cb72d0f9a..e483a6fd213c8121b05ec859bb0ed48ca4bc56f0 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.user.activity;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Collections;
 import java.util.GregorianCalendar;
@@ -27,7 +28,6 @@ import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 import javax.inject.Named;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
 import org.mxchange.jusercore.events.user.created.ObservableCreatedUserEvent;
@@ -78,8 +78,8 @@ public class JobsUserActivityWebRequestBean extends BaseJobsController implement
         * "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
@@ -507,9 +507,9 @@ public class JobsUserActivityWebRequestBean extends BaseJobsController implement
                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());
@@ -549,13 +549,13 @@ public class JobsUserActivityWebRequestBean extends BaseJobsController implement
                // 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
@@ -664,13 +664,13 @@ public class JobsUserActivityWebRequestBean extends BaseJobsController implement
                }
 
                // 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 b78e2ef569d70a6e0bf898b38a9985f31b098981..e853cad0e16379244855a1944df61cc7cd949f97 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jjobs.beans.user.email_address;
 
+import fish.payara.cdi.jsr107.impl.NamedCache;
 import java.text.MessageFormat;
 import java.util.Iterator;
 import java.util.List;
@@ -27,7 +28,6 @@ import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcoreee.jcache.Cached;
 import org.mxchange.jcoreee.utils.FacesUtils;
 import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
@@ -78,7 +78,7 @@ public class JobsEmailChangeWebRequestBean extends BaseJobsController implements
         * Local list of already queued email addresses
         */
        @Inject
-       @Cached (cacheName = "queuedEmailCache")
+       @NamedCache (cacheName = "queuedEmailCache", managementEnabled = true)
        private transient Cache<String, Boolean> queuedEmailCache;
 
        /**