@POST()
        @Path("add")
        @Consumes("application/json")
        @Produces("application/json")
        @SportService(ServiceType.MLB)
        public Player addPlayer(Player p)
        {
                UserTransaction utx = null;

                p.setId(0);

			    try
			    {
                   System.out.println("INPUT: Player id : "+p.getId()+" Player name = "+p.getFirstName()+" "+p.getLastName()+" Position = "+p.getPosition()+" team ID = "+p.getTeamId());

                   utx = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");

                   utx.begin();

                   p = emMlb.merge(p);

                   emMlb.flush();

                   utx.commit();

                   System.out.println("ADDED: Player id : "+p.getId()+" Player name = "+p.getFirstName()+" "+p.getLastName()+" Position = "+p.getPosition()+" team ID = "+p.getTeamId());
			    }
			    catch (Exception e)
			    {
					if (utx == null)
					{}
					else
					{
						try
						{
						   utx.rollback();
					    }
					    catch (Exception ex)
					    {
							System.out.println("Exception = "+ex.getMessage());
						}
					}

					System.out.println("Exception = "+e.getMessage());
				}

                return p;
        }