1.1 --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/HledacSluzby.java Mon Apr 05 22:30:08 2010 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,47 +0,0 @@
1.4 -package cz.frantovo.nekurak.web;
1.5 -
1.6 -import cz.frantovo.nekurak.ejb.PodnikRemote;
1.7 -import cz.frantovo.nekurak.ejb.UzivatelRemote;
1.8 -import java.io.Serializable;
1.9 -import java.util.logging.Level;
1.10 -import java.util.logging.Logger;
1.11 -import javax.naming.Context;
1.12 -import javax.naming.InitialContext;
1.13 -import javax.naming.NamingException;
1.14 -
1.15 -/**
1.16 - *
1.17 - * @author fiki
1.18 - */
1.19 -public class HledacSluzby implements Serializable {
1.20 -
1.21 - private PodnikRemote podnikEJB;
1.22 - private UzivatelRemote uzivatelEJB;
1.23 - private static final Logger log = Logger.getLogger(HledacSluzby.class.getSimpleName());
1.24 -
1.25 - public PodnikRemote getPodnikEJB() {
1.26 - if (podnikEJB == null) {
1.27 - try {
1.28 - Context c = new InitialContext();
1.29 - podnikEJB = (PodnikRemote) c.lookup("cz.frantovo.nekurak.ejb.PodnikRemote");
1.30 - } catch (NamingException e) {
1.31 - log.log(Level.SEVERE, "Chyba při hledání PodnikRemote", e);
1.32 - throw new RuntimeException(e);
1.33 - }
1.34 - }
1.35 - return podnikEJB;
1.36 - }
1.37 -
1.38 - public UzivatelRemote getUzivatelEJB() {
1.39 - if (uzivatelEJB == null) {
1.40 - try {
1.41 - Context c = new InitialContext();
1.42 - uzivatelEJB = (UzivatelRemote) c.lookup("cz.frantovo.nekurak.ejb.UzivatelRemote");
1.43 - } catch (NamingException e) {
1.44 - log.log(Level.SEVERE, "Chyba při hledání UzivatelRemote", e);
1.45 - throw new RuntimeException(e);
1.46 - }
1.47 - }
1.48 - return uzivatelEJB;
1.49 - }
1.50 -}