diff -r 12268fc31114 -r 0efefbf5f8b6 java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java Tue Apr 06 00:27:48 2010 +0200 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java Sun Jun 20 14:46:47 2010 +0200 @@ -16,47 +16,47 @@ */ public class HledacSluzby implements Serializable { - private PodnikRemote podnikEJB; - private UzivatelRemote uzivatelEJB; - private ClanekRemote clanekEJB; - 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); - } + private PodnikRemote podnikEJB; + private UzivatelRemote uzivatelEJB; + private ClanekRemote clanekEJB; + 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; } - 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); - } + 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; } - return uzivatelEJB; - } - public ClanekRemote getClanekEJB() { - if (clanekEJB == null) { - try { - Context c = new InitialContext(); - clanekEJB = (ClanekRemote) c.lookup("cz.frantovo.nekurak.ejb.ClanekRemote"); - } catch (NamingException e) { - log.log(Level.SEVERE, "Chyba při hledání ClanekRemote", e); - throw new RuntimeException(e); - } + public ClanekRemote getClanekEJB() { + if (clanekEJB == null) { + try { + Context c = new InitialContext(); + clanekEJB = (ClanekRemote) c.lookup("cz.frantovo.nekurak.ejb.ClanekRemote"); + } catch (NamingException e) { + log.log(Level.SEVERE, "Chyba při hledání ClanekRemote", e); + throw new RuntimeException(e); + } + } + return clanekEJB; } - return clanekEJB; - } }