1 package league.ws; 2 3 import java.rmi.RemoteException ; 4 import java.util.Collection ; 5 import java.util.Date ; 6 import java.util.Hashtable ; 7 import league.ejb.entity.PlayerLocal; 8 import league.ejb.entity.RoundLocal; 9 import league.util.League; 10 import league.util.Match; 11 import league.util.Player; 12 import league.util.Round; 13 14 15 16 21 public class LeagueWebServiceBean implements javax.ejb.SessionBean { 22 private javax.ejb.SessionContext context; 23 24 30 public void setSessionContext(javax.ejb.SessionContext aContext) { 31 context = aContext; 32 } 33 34 37 public void ejbActivate() { 38 39 } 40 41 44 public void ejbPassivate() { 45 46 } 47 48 51 public void ejbRemove() { 52 53 } 54 56 60 public void ejbCreate() { 61 } 66 67 68 69 72 private league.ejb.session.LeagueFacadeRemote lookupLeagueFacadeBean() { 73 try { 74 return ((league.ejb.session.LeagueFacadeRemoteHome) league.ejb.CachingServiceLocator.getInstance().getRemoteHome("java:comp/env/ejb/LeagueFacadeBean",league.ejb.session.LeagueFacadeRemoteHome.class)).create(); 75 } catch(javax.naming.NamingException ne) { 76 java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne); 77 throw new RuntimeException (ne); 78 } catch(javax.ejb.CreateException ce) { 79 java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce); 80 throw new RuntimeException (ce); 81 } catch(java.rmi.RemoteException re) { 82 java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,re); 83 throw new RuntimeException (re); 84 } 85 } 86 87 90 public void addTeamToLastPlace(Integer roundId, Integer teamId) { 91 try { 93 lookupLeagueFacadeBean().addTeamToLastPlace(roundId, teamId); 94 } catch (RemoteException re) { 95 96 } 97 } 98 99 102 public String testGroups() { 103 try { 105 return lookupLeagueFacadeBean().testGroups(); 106 } catch (RemoteException re) { 107 } 108 return null; 109 } 110 111 114 public void updateMatch(Match m) { 115 try { 117 lookupLeagueFacadeBean().updateMatch(m); 118 } catch (RemoteException re) { 119 } 120 } 121 122 125 public Integer createMatch(Integer roundId, Hashtable results) { 126 try { 127 return lookupLeagueFacadeBean().createMatch(roundId, results); 128 } catch (RemoteException re) { 129 } 130 return null; 131 } 132 133 136 public Round getActiveRound(Integer leagueId) { 137 try { 138 return lookupLeagueFacadeBean().getActiveRound(leagueId); 139 } catch (RemoteException re) { 140 } 141 return null; 142 } 143 144 147 public League createLeague(java.lang.String name, Date startDate, Date endDate, java.lang.String note) { 148 try { 149 return lookupLeagueFacadeBean().createLeague(name, startDate, endDate, note); 150 } catch (RemoteException re) { 151 } 152 return null; 153 } 154 155 158 public void createRound(Integer leagueId, java.lang.String name, Date startDate) { 159 try { 160 lookupLeagueFacadeBean().createRound(leagueId, name, startDate); 161 } catch (RemoteException re) { 162 } 163 } 164 165 168 public Collection getPlayersInRound(RoundLocal rl) { 169 try { 170 return lookupLeagueFacadeBean().getPlayersInRound(rl); 171 } catch (RemoteException re) { 172 } 173 return null; 174 } 175 176 179 public void setTeamStartPoints(Integer teamId, Integer groupId, Integer startPoints) { 180 try { 181 lookupLeagueFacadeBean().setTeamStartPoints(teamId, groupId, startPoints); 182 } catch (RemoteException re) { 183 } 184 } 185 186 189 public Integer createPlayer(java.lang.String name, java.lang.String note, java.lang.String userId) { 190 try { 191 return lookupLeagueFacadeBean().createPlayer(name, note, userId); 192 } catch (RemoteException re) { 193 } 194 return null; 195 } 196 197 200 public Player getPlayer(PlayerLocal player) { 201 return null; 202 } 203 204 205 } 206 | Popular Tags |