# HG changeset patch # User František Kučera # Date 1270505399 -7200 # Node ID 936ad9853a30169149f590e9467b8767f0c6ddb9 # Parent 0967d5e3b4704036d642ba3e550d758219eef737 Přesun Hledače do společné knihovny. diff -r 0967d5e3b470 -r 936ad9853a30 java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java Tue Apr 06 00:09:59 2010 +0200 @@ -0,0 +1,47 @@ +package cz.frantovo.nekurak.web; + +import cz.frantovo.nekurak.ejb.PodnikRemote; +import cz.frantovo.nekurak.ejb.UzivatelRemote; +import java.io.Serializable; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +/** + * + * @author fiki + */ +public class HledacSluzby implements Serializable { + + private PodnikRemote podnikEJB; + private UzivatelRemote uzivatelEJB; + private static final Logger log = Logger.getLogger(HledacSluzby.class.getSimpleName()); + + public PodnikRemote getPodnikEJB() { + if (podnikEJB == null) { + try { + Context c = new InitialContext(); + podnikEJB = (PodnikRemote) c.lookup("cz.frantovo.nekurak.ejb.PodnikRemote"); + } catch (NamingException e) { + log.log(Level.SEVERE, "Chyba při hledání PodnikRemote", e); + throw new RuntimeException(e); + } + } + return podnikEJB; + } + + public UzivatelRemote getUzivatelEJB() { + if (uzivatelEJB == null) { + try { + Context c = new InitialContext(); + uzivatelEJB = (UzivatelRemote) c.lookup("cz.frantovo.nekurak.ejb.UzivatelRemote"); + } catch (NamingException e) { + log.log(Level.SEVERE, "Chyba při hledání UzivatelRemote", e); + throw new RuntimeException(e); + } + } + return uzivatelEJB; + } +} diff -r 0967d5e3b470 -r 936ad9853a30 java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/HledacSluzby.java --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/HledacSluzby.java Mon Apr 05 22:30:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -package cz.frantovo.nekurak.web; - -import cz.frantovo.nekurak.ejb.PodnikRemote; -import cz.frantovo.nekurak.ejb.UzivatelRemote; -import java.io.Serializable; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * - * @author fiki - */ -public class HledacSluzby implements Serializable { - - private PodnikRemote podnikEJB; - private UzivatelRemote uzivatelEJB; - private static final Logger log = Logger.getLogger(HledacSluzby.class.getSimpleName()); - - public PodnikRemote getPodnikEJB() { - if (podnikEJB == null) { - try { - Context c = new InitialContext(); - podnikEJB = (PodnikRemote) c.lookup("cz.frantovo.nekurak.ejb.PodnikRemote"); - } catch (NamingException e) { - log.log(Level.SEVERE, "Chyba při hledání PodnikRemote", e); - throw new RuntimeException(e); - } - } - return podnikEJB; - } - - public UzivatelRemote getUzivatelEJB() { - if (uzivatelEJB == null) { - try { - Context c = new InitialContext(); - uzivatelEJB = (UzivatelRemote) c.lookup("cz.frantovo.nekurak.ejb.UzivatelRemote"); - } catch (NamingException e) { - log.log(Level.SEVERE, "Chyba při hledání UzivatelRemote", e); - throw new RuntimeException(e); - } - } - return uzivatelEJB; - } -}