java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java
changeset 145 0efefbf5f8b6
parent 92 12268fc31114
child 149 8238cdb4113a
     1.1 --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java	Tue Apr 06 00:27:48 2010 +0200
     1.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/web/HledacSluzby.java	Sun Jun 20 14:46:47 2010 +0200
     1.3 @@ -16,47 +16,47 @@
     1.4   */
     1.5  public class HledacSluzby implements Serializable {
     1.6  
     1.7 -    private PodnikRemote podnikEJB;
     1.8 -    private UzivatelRemote uzivatelEJB;
     1.9 -    private ClanekRemote clanekEJB;
    1.10 -    private static final Logger log = Logger.getLogger(HledacSluzby.class.getSimpleName());
    1.11 -    
    1.12 -    public PodnikRemote getPodnikEJB() {
    1.13 -	if (podnikEJB == null) {
    1.14 -	    try {
    1.15 -		Context c = new InitialContext();
    1.16 -		podnikEJB = (PodnikRemote) c.lookup("cz.frantovo.nekurak.ejb.PodnikRemote");
    1.17 -	    } catch (NamingException e) {
    1.18 -		log.log(Level.SEVERE, "Chyba při hledání PodnikRemote", e);
    1.19 -		throw new RuntimeException(e);
    1.20 -	    }
    1.21 +	private PodnikRemote podnikEJB;
    1.22 +	private UzivatelRemote uzivatelEJB;
    1.23 +	private ClanekRemote clanekEJB;
    1.24 +	private static final Logger log = Logger.getLogger(HledacSluzby.class.getSimpleName());
    1.25 +
    1.26 +	public PodnikRemote getPodnikEJB() {
    1.27 +		if (podnikEJB == null) {
    1.28 +			try {
    1.29 +				Context c = new InitialContext();
    1.30 +				podnikEJB = (PodnikRemote) c.lookup("cz.frantovo.nekurak.ejb.PodnikRemote");
    1.31 +			} catch (NamingException e) {
    1.32 +				log.log(Level.SEVERE, "Chyba při hledání PodnikRemote", e);
    1.33 +				throw new RuntimeException(e);
    1.34 +			}
    1.35 +		}
    1.36 +		return podnikEJB;
    1.37  	}
    1.38 -	return podnikEJB;
    1.39 -    }
    1.40  
    1.41 -    public UzivatelRemote getUzivatelEJB() {
    1.42 -	if (uzivatelEJB == null) {
    1.43 -	    try {
    1.44 -		Context c = new InitialContext();
    1.45 -		uzivatelEJB = (UzivatelRemote) c.lookup("cz.frantovo.nekurak.ejb.UzivatelRemote");
    1.46 -	    } catch (NamingException e) {
    1.47 -		log.log(Level.SEVERE, "Chyba při hledání UzivatelRemote", e);
    1.48 -		throw new RuntimeException(e);
    1.49 -	    }
    1.50 +	public UzivatelRemote getUzivatelEJB() {
    1.51 +		if (uzivatelEJB == null) {
    1.52 +			try {
    1.53 +				Context c = new InitialContext();
    1.54 +				uzivatelEJB = (UzivatelRemote) c.lookup("cz.frantovo.nekurak.ejb.UzivatelRemote");
    1.55 +			} catch (NamingException e) {
    1.56 +				log.log(Level.SEVERE, "Chyba při hledání UzivatelRemote", e);
    1.57 +				throw new RuntimeException(e);
    1.58 +			}
    1.59 +		}
    1.60 +		return uzivatelEJB;
    1.61  	}
    1.62 -	return uzivatelEJB;
    1.63 -    }
    1.64  
    1.65 -    public ClanekRemote getClanekEJB() {
    1.66 -	if (clanekEJB == null) {
    1.67 -	    try {
    1.68 -		Context c = new InitialContext();
    1.69 -		clanekEJB = (ClanekRemote) c.lookup("cz.frantovo.nekurak.ejb.ClanekRemote");
    1.70 -	    } catch (NamingException e) {
    1.71 -		log.log(Level.SEVERE, "Chyba při hledání ClanekRemote", e);
    1.72 -		throw new RuntimeException(e);
    1.73 -	    }
    1.74 +	public ClanekRemote getClanekEJB() {
    1.75 +		if (clanekEJB == null) {
    1.76 +			try {
    1.77 +				Context c = new InitialContext();
    1.78 +				clanekEJB = (ClanekRemote) c.lookup("cz.frantovo.nekurak.ejb.ClanekRemote");
    1.79 +			} catch (NamingException e) {
    1.80 +				log.log(Level.SEVERE, "Chyba při hledání ClanekRemote", e);
    1.81 +				throw new RuntimeException(e);
    1.82 +			}
    1.83 +		}
    1.84 +		return clanekEJB;
    1.85  	}
    1.86 -	return clanekEJB;
    1.87 -    }
    1.88  }