From 06ab4dd392408925c062047dbce3d1033138537d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 15 Oct 2017 23:14:07 +0200 Subject: [PATCH] Continued: - removed findContactById() as this was a performance problem and it should be done all on WAR side (relying on JCache then) - removed findContactByEmailAddress() as this was no longer used outside the EJB's own method and would be a performance problem, too. - the application then needs to rely on it's cache or fetch whole list and check that list then (but I recommend first as 2nd is "same in green color) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../contact/ContactSessionBeanRemote.java | 23 ------------------- .../AdminContactsPhoneSessionBeanRemote.java | 4 ++-- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java b/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java index dd82f00..097863a 100644 --- a/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/model/contact/ContactSessionBeanRemote.java @@ -19,7 +19,6 @@ package org.mxchange.jcontacts.model.contact; import java.io.Serializable; import java.util.List; import javax.ejb.Remote; -import org.mxchange.jcontacts.exceptions.ContactNotFoundException; /** * A remote interface for general contact purposes @@ -89,26 +88,4 @@ public interface ContactSessionBeanRemote extends Serializable { */ List allEmailAddresses (); - /** - * Returns a contact instance which has the given id number. - *

- * @param contactId Contact id - *

- * @return Contact instance - *

- * @throws ContactNotFoundException If the contact was not found - */ - Contact findContactById (final Long contactId) throws ContactNotFoundException; - - /** - * Returns a contact instance which has the given email address. - *

- * @param emailAddress Email address - *

- * @return Contact instance - *

- * @throws ContactNotFoundException If the contact was not found - */ - Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException; - } diff --git a/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java b/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java index 35ee2b2..a6417ff 100644 --- a/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java +++ b/src/org/mxchange/jcontacts/model/phone/AdminContactsPhoneSessionBeanRemote.java @@ -19,8 +19,8 @@ package org.mxchange.jcontacts.model.phone; import java.io.Serializable; import javax.ejb.Remote; import org.mxchange.jcontacts.model.contact.Contact; -import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException; -import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException; +import org.mxchange.jphone.exceptions.phone.PhoneNumberAlreadyLinkedException; +import org.mxchange.jphone.exceptions.phone.PhoneNumberNotLinkedException; import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber; import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber; -- 2.39.2