]> git.mxchange.org Git - jfinancials-mailer-ejb.git/blobdiff - src/java/org/mxchange/jcountry/data/AddressbookCountrySingletonBean.java
Local singletons cannot be called this way
[jfinancials-mailer-ejb.git] / src / java / org / mxchange / jcountry / data / AddressbookCountrySingletonBean.java
index ab4057a143af1058c1edf8646e1fa0df99c90096..ef97a5b3f5ded7cc3489359ae89f1d4ef475879b 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jcountry.data;
 
 import java.util.List;
 import javax.ejb.Singleton;
+import javax.ejb.Startup;
 import javax.persistence.Query;
 import org.mxchange.jcoreee.database.BaseDatabaseBean;
 
@@ -26,8 +27,9 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean;
  * <p>
  * @author Roland Haeder
  */
-@Singleton (name = "country", mappedName = "ejb/singleton-country", description = "A singleton session bean for country informations")
-public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements AddressbookCountrySingletonBeanRemote {
+@Startup
+@Singleton (name = "country", description = "A singleton session bean for country informations")
+public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements AddressbookCountrySingletonBeanLocal {
 
        /**
         * Serial number
@@ -38,7 +40,7 @@ public class AddressbookCountrySingletonBean extends BaseDatabaseBean implements
        @SuppressWarnings ("unchecked")
        public List<Country> allCountries () {
                // Init query
-               Query query = this.getEntityManager().createNamedQuery("AllCountries");
+               Query query = this.getEntityManager().createNamedQuery("AllCountries"); //NOI18N
 
                // Return it
                return query.getResultList();