Commits

Andy Moncsek committed fd77817

update to b80

Comments (0)

Files changed (33)

Domain/src/main/java/org/jacp/jee/entity/ChatUser.java

 package org.jacp.jee.entity;
 
 import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import java.io.Serializable;
 
         ChatUser chatUser = (ChatUser) o;
 
         if (id != null ? !id.equals(chatUser.id) : chatUser.id != null) return false;
-        if (name != null ? !name.equals(chatUser.name) : chatUser.name != null) return false;
+        return !(name != null ? !name.equals(chatUser.name) : chatUser.name != null);
 
-        return true;
     }
 
     @Override

Domain/src/main/java/org/jacp/jee/entity/ClientMessage.java

 package org.jacp.jee.entity;
 
-import java.io.Serializable;
-
-import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import java.io.Serializable;
 
 //@Entity
 public class ClientMessage implements Serializable {

Domain/src/main/java/org/jacp/jee/entity/Tweet.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.jacp.jee.entity;
 
 import javax.xml.bind.annotation.XmlRootElement;
 
 /**
  * Created with IntelliJ IDEA.
- * User: ady
+ * User: Andy Moncsek
  * Date: 11.03.13
  * Time: 09:14
  * To change this template use File | Settings | File Templates.
  */
 @XmlRootElement
-public class Tweet implements Serializable {
+public class Tweet implements Serializable, Comparable<Tweet> {
     private Date created_at;
     private String from_user;
     private String profile_image_url;
     private String text;
 
+    public Tweet() {
+
+    }
+
+    public Tweet(Date created_at, String from_user, String profile_image_url, String text) {
+        this.created_at = created_at;
+        this.from_user = from_user;
+        this.profile_image_url = profile_image_url;
+        this.text = text;
+    }
+
     public Date getCreated_at() {
         return created_at;
     }
         if (from_user != null ? !from_user.equals(tweet.from_user) : tweet.from_user != null) return false;
         if (profile_image_url != null ? !profile_image_url.equals(tweet.profile_image_url) : tweet.profile_image_url != null)
             return false;
-        if (text != null ? !text.equals(tweet.text) : tweet.text != null) return false;
+        return !(text != null ? !text.equals(tweet.text) : tweet.text != null);
 
-        return true;
     }
 
     @Override
         result = 31 * result + (text != null ? text.hashCode() : 0);
         return result;
     }
+
+    @Override
+    public int compareTo(Tweet o) {
+        return this.created_at.compareTo(o.getCreated_at());
+    }
 }

Domain/src/main/java/org/jacp/jee/entity/TwitterResult.java

 
         if (max_id != null ? !max_id.equals(that.max_id) : that.max_id != null) return false;
         if (query != null ? !query.equals(that.query) : that.query != null) return false;
-        if (results != null ? !results.equals(that.results) : that.results != null) return false;
+        return !(results != null ? !results.equals(that.results) : that.results != null);
 
-        return true;
     }
 
     @Override

EJB/src/main/java/org/jacp/jee/beans/SimpleMessageBean.java

 package org.jacp.jee.beans;
 
-import java.util.ArrayList;
-import java.util.List;
+import org.jacp.jee.api.MessageEJBInterface;
+import org.jacp.jee.entity.ClientMessage;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.ejb.Remote;
-import javax.ejb.Startup;
 import javax.ejb.Stateless;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.Default;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
-import javax.persistence.criteria.CriteriaQuery;
-
-import org.jacp.jee.api.MessageEJBInterface;
-import org.jacp.jee.entity.ClientMessage;
+import java.util.ArrayList;
+import java.util.List;
 
 @Stateless
 @Remote(MessageEJBInterface.class)

EJBClient/src/main/java/org/jacp/jee/api/ChatUserBeanInterface.java

 
 import org.jacp.jee.entity.ChatUser;
 
-import javax.ejb.Remote;
+import java.io.Serializable;
 import java.util.List;
 
 /**
  * Time: 21:14
  * To change this template use File | Settings | File Templates.
  */
-public interface ChatUserBeanInterface {
+public interface ChatUserBeanInterface extends Serializable {
 
     /**
      * save a new user

EJBClient/src/main/java/org/jacp/jee/api/MessageEJBInterface.java

 package org.jacp.jee.api;
 
-import java.util.List;
+import org.jacp.jee.entity.ClientMessage;
 
 import javax.ejb.Remote;
-
-import org.jacp.jee.entity.ClientMessage;
+import java.util.List;
 
 /**
  * The remote interface

JacpFXSSETwitterClient/src/main/java/org/jacp/twitter/entities/Clear.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jacp.twitter.entities;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 13.03.13
+ * Time: 14:01
+ * To change this template use File | Settings | File Templates.
+ */
+public class Clear {
+}

JacpFXSSETwitterClient/src/main/java/org/jacp/twitter/entities/Query.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jacp.twitter.entities;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 13.03.13
+ * Time: 13:57
+ * To change this template use File | Settings | File Templates.
+ */
+public class Query {
+    private final String query;
+
+    public Query(final String query){
+            this.query = query;
+    }
+
+    public String getQuery() {
+        return query;
+    }
+}

JacpFXWebsocketChatClient/src/main/java/org/jacp/chat/main/Paint.java

-package org.jacp.chat.main;
-
-import javafx.application.Application;
-import javafx.event.EventHandler;
-import javafx.scene.Group;
-import javafx.scene.Scene;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.LineTo;
-import javafx.scene.shape.MoveTo;
-import javafx.scene.shape.Path;
-import javafx.stage.Stage;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 07.03.13
- * Time: 14:28
- * To change this template use File | Settings | File Templates.
- */
-public class Paint extends Application {
-    Path path;
-
-    public static void main(String[] args) {
-        launch(args);
-    }
-
-    @Override
-    public void start(Stage primaryStage) {
-        Group root = new Group();
-        Scene scene = new Scene(root, 300, 250);
-
-        path = new Path();
-        path.setStrokeWidth(1);
-        path.setStroke(Color.BLACK);
-
-        scene.setOnMouseClicked(mouseHandler);
-        scene.setOnMouseDragged(mouseHandler);
-        scene.setOnMouseEntered(mouseHandler);
-        scene.setOnMouseExited(mouseHandler);
-        scene.setOnMouseMoved(mouseHandler);
-        scene.setOnMousePressed(mouseHandler);
-        scene.setOnMouseReleased(mouseHandler);
-
-        root.getChildren().add(path);
-        primaryStage.setScene(scene);
-        primaryStage.show();
-    }
-
-    EventHandler<MouseEvent> mouseHandler = new EventHandler<MouseEvent>() {
-
-        @Override
-        public void handle(MouseEvent mouseEvent) {
-            if (mouseEvent.getEventType() == MouseEvent.MOUSE_PRESSED) {
-                path.getElements().clear();
-                path.getElements()
-                        .add(new MoveTo(mouseEvent.getX(), mouseEvent.getY()));
-            } else if (mouseEvent.getEventType() == MouseEvent.MOUSE_DRAGGED) {
-                System.out.println(mouseEvent.getX() + " : " + mouseEvent.getY());
-                path.getElements()
-                        .add(new LineTo(mouseEvent.getX(), mouseEvent.getY()));
-            }
-
-        }
-
-    };
-
-}

JacpFXWebsocketChatClient/src/main/java/org/jacp/twitter/main/Paint.java

+package org.jacp.twitter.main;
+
+import javafx.application.Application;
+import javafx.event.EventHandler;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.LineTo;
+import javafx.scene.shape.MoveTo;
+import javafx.scene.shape.Path;
+import javafx.stage.Stage;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 07.03.13
+ * Time: 14:28
+ * To change this template use File | Settings | File Templates.
+ */
+public class Paint extends Application {
+    Path path;
+
+    public static void main(String[] args) {
+        launch(args);
+    }
+
+    @Override
+    public void start(Stage primaryStage) {
+        Group root = new Group();
+        Scene scene = new Scene(root, 300, 250);
+
+        path = new Path();
+        path.setStrokeWidth(1);
+        path.setStroke(Color.BLACK);
+
+        scene.setOnMouseClicked(mouseHandler);
+        scene.setOnMouseDragged(mouseHandler);
+        scene.setOnMouseEntered(mouseHandler);
+        scene.setOnMouseExited(mouseHandler);
+        scene.setOnMouseMoved(mouseHandler);
+        scene.setOnMousePressed(mouseHandler);
+        scene.setOnMouseReleased(mouseHandler);
+
+        root.getChildren().add(path);
+        primaryStage.setScene(scene);
+        primaryStage.show();
+    }
+
+    EventHandler<MouseEvent> mouseHandler = new EventHandler<MouseEvent>() {
+
+        @Override
+        public void handle(MouseEvent mouseEvent) {
+            if (mouseEvent.getEventType() == MouseEvent.MOUSE_PRESSED) {
+                path.getElements().clear();
+                path.getElements()
+                        .add(new MoveTo(mouseEvent.getX(), mouseEvent.getY()));
+            } else if (mouseEvent.getEventType() == MouseEvent.MOUSE_DRAGGED) {
+                System.out.println(mouseEvent.getX() + " : " + mouseEvent.getY());
+                path.getElements()
+                        .add(new LineTo(mouseEvent.getX(), mouseEvent.getY()));
+            }
+
+        }
+
+    };
+
+}

JavaClient/src/main/java/org/jacp/chat/ChatClientEndpoit.java

-package org.jacp.chat;
-
-
-import org.jacp.jee.messages.ChatMessage;
-import org.jacp.jee.messages.LoginMessage;
-import org.jacp.jee.messages.UserAddMessage;
-
-import javax.websocket.*;
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 28.02.13
- * Time: 09:49
- * To change this template use File | Settings | File Templates.
- */
-@ClientEndpoint(encoders = {ClientLoginEncoder.class, ChatMessageEncoder.class}, decoders = {ClientAddUserDecoder.class, ChatMessageDecoder.class})
-public class ChatClientEndpoit {
-    private Session session;
-    CountDownLatch messageLatch;
-
-    public ChatClientEndpoit(CountDownLatch messageLatch) {
-        this.messageLatch = messageLatch;
-    }
-
-    public ChatClientEndpoit() {
-
-    }
-
-    @OnOpen
-    public void onOpen(Session session) {
-        this.session = session;
-        System.out.println("Connected to endpoint: " + session.getBasicRemote());
-        messageLatch.countDown();
-    }
-
-    public void login() throws IOException, EncodeException {
-        System.out.println("myLogin" + session);
-        session.getBasicRemote().sendObject(new LoginMessage("anni"));
-
-    }
-
-    public void sendMessage(String message) throws IOException, EncodeException {
-        session.getBasicRemote().sendObject(new ChatMessage("anni", message));
-
-    }
-//    @OnMessage
-//    public void onRest(String test) {
-//            System.out.println("TEST:  "+test);
-//    }
-
-    @OnMessage
-    public void onUserAdd(UserAddMessage userAdd) {
-        System.out.println("user add: " + userAdd.getUserName());
-    }
-
-    @OnMessage
-    public void onChatMessage(ChatMessage chatMessage) {
-        System.out.println("chat message: " + chatMessage.getMessage());
-    }
-
-}

JavaClient/src/main/java/org/jacp/chat/ChatMessageDecoder.java

-package org.jacp.chat;
-
-import org.apache.commons.lang.SerializationUtils;
-import org.jacp.jee.messages.ChatMessage;
-import org.jacp.jee.messages.Message;
-import org.jacp.jee.messages.MessageType;
-
-import javax.websocket.DecodeException;
-import javax.websocket.Decoder;
-import java.nio.ByteBuffer;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 27.02.13
- * Time: 15:32
- * To change this template use File | Settings | File Templates.
- */
-public class ChatMessageDecoder implements Decoder.Binary<ChatMessage> {
-    @Override
-    public ChatMessage decode(ByteBuffer byteBuffer) throws DecodeException {
-        return (ChatMessage) SerializationUtils.deserialize(byteBuffer.array());  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    @Override
-    public boolean willDecode(ByteBuffer byteBuffer) {
-        Message message = (Message) SerializationUtils.deserialize(byteBuffer.array());
-        if (message == null) return false;
-        if (message.getType().equals(MessageType.MESSAGE)) return true;
-        return false;
-    }
-}
-
-

JavaClient/src/main/java/org/jacp/chat/ChatMessageEncoder.java

-package org.jacp.chat;
-
-import org.apache.commons.lang.SerializationUtils;
-import org.jacp.jee.messages.ChatMessage;
-import org.jacp.jee.messages.LoginMessage;
-
-import javax.websocket.EncodeException;
-import javax.websocket.Encoder;
-import java.nio.ByteBuffer;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 06.03.13
- * Time: 10:14
- * To change this template use File | Settings | File Templates.
- */
-public class ChatMessageEncoder implements Encoder.Binary<ChatMessage> {
-    @Override
-    public ByteBuffer encode(ChatMessage message) throws EncodeException {
-        return ByteBuffer.wrap(SerializationUtils.serialize(message));
-    }
-}

JavaClient/src/main/java/org/jacp/chat/ClientAddUserDecoder.java

-package org.jacp.chat;
-
-import org.apache.commons.lang.SerializationUtils;
-import org.jacp.jee.messages.Message;
-import org.jacp.jee.messages.MessageType;
-import org.jacp.jee.messages.UserAddMessage;
-
-import javax.websocket.DecodeException;
-import javax.websocket.Decoder;
-import java.nio.ByteBuffer;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 05.03.13
- * Time: 22:11
- * To change this template use File | Settings | File Templates.
- */
-public class ClientAddUserDecoder implements Decoder.Binary<UserAddMessage> {
-    @Override
-    public UserAddMessage decode(ByteBuffer byteBuffer) throws DecodeException {
-        return (UserAddMessage) SerializationUtils.deserialize(byteBuffer.array());  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    @Override
-    public boolean willDecode(ByteBuffer byteBuffer) {
-        Message message = (Message) SerializationUtils.deserialize(byteBuffer.array());
-        if (message == null) return false;
-        if (message.getType().equals(MessageType.ADD_USER)) return true;
-        return false;
-    }
-}
-
-
-
-

JavaClient/src/main/java/org/jacp/chat/ClientLoginEncoder.java

-package org.jacp.chat;
-
-import org.apache.commons.lang.SerializationUtils;
-import org.jacp.jee.messages.LoginMessage;
-
-import javax.websocket.EncodeException;
-import javax.websocket.Encoder;
-import java.nio.ByteBuffer;
-
-/**
- * Created with IntelliJ IDEA.
- * User: ady
- * Date: 28.02.13
- * Time: 09:50
- * To change this template use File | Settings | File Templates.
- */
-public class ClientLoginEncoder implements Encoder.Binary<LoginMessage> {
-    @Override
-    public ByteBuffer encode(LoginMessage loginMessage) throws EncodeException {
-        return ByteBuffer.wrap(SerializationUtils.serialize(loginMessage));
-    }
-}

JavaClient/src/main/java/org/jacp/twitter/ChatClientEndpoit.java

+package org.jacp.twitter;
+
+
+import org.jacp.jee.messages.ChatMessage;
+import org.jacp.jee.messages.LoginMessage;
+import org.jacp.jee.messages.UserAddMessage;
+
+import javax.websocket.*;
+import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 28.02.13
+ * Time: 09:49
+ * To change this template use File | Settings | File Templates.
+ */
+@ClientEndpoint(encoders = {ClientLoginEncoder.class, ChatMessageEncoder.class}, decoders = {ClientAddUserDecoder.class, ChatMessageDecoder.class})
+public class ChatClientEndpoit {
+    private Session session;
+    CountDownLatch messageLatch;
+
+    public ChatClientEndpoit(CountDownLatch messageLatch) {
+        this.messageLatch = messageLatch;
+    }
+
+    public ChatClientEndpoit() {
+
+    }
+
+    @OnOpen
+    public void onOpen(Session session) {
+        this.session = session;
+        System.out.println("Connected to endpoint: " + session.getBasicRemote());
+        messageLatch.countDown();
+    }
+
+    public void login() throws IOException, EncodeException {
+        System.out.println("myLogin" + session);
+        session.getBasicRemote().sendObject(new LoginMessage("anni"));
+
+    }
+
+    public void sendMessage(String message) throws IOException, EncodeException {
+        session.getBasicRemote().sendObject(new ChatMessage("anni", message));
+
+    }
+//    @OnMessage
+//    public void onRest(String test) {
+//            System.out.println("TEST:  "+test);
+//    }
+
+    @OnMessage
+    public void onUserAdd(UserAddMessage userAdd) {
+        System.out.println("user add: " + userAdd.getUserName());
+    }
+
+    @OnMessage
+    public void onChatMessage(ChatMessage chatMessage) {
+        System.out.println("twitter message: " + chatMessage.getMessage());
+    }
+
+}

JavaClient/src/main/java/org/jacp/twitter/ChatMessageDecoder.java

+package org.jacp.twitter;
+
+import org.apache.commons.lang.SerializationUtils;
+import org.jacp.jee.messages.ChatMessage;
+import org.jacp.jee.messages.Message;
+import org.jacp.jee.messages.MessageType;
+
+import javax.websocket.DecodeException;
+import javax.websocket.Decoder;
+import java.nio.ByteBuffer;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 27.02.13
+ * Time: 15:32
+ * To change this template use File | Settings | File Templates.
+ */
+public class ChatMessageDecoder extends Decoder.Adapter implements Decoder.Binary<ChatMessage> {
+    @Override
+    public ChatMessage decode(ByteBuffer byteBuffer) throws DecodeException {
+        return (ChatMessage) SerializationUtils.deserialize(byteBuffer.array());  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean willDecode(ByteBuffer byteBuffer) {
+        Message message = (Message) SerializationUtils.deserialize(byteBuffer.array());
+        if (message == null) return false;
+        return message.getType().equals(MessageType.MESSAGE);
+    }
+}
+
+

JavaClient/src/main/java/org/jacp/twitter/ChatMessageEncoder.java

+package org.jacp.twitter;
+
+import org.apache.commons.lang.SerializationUtils;
+import org.jacp.jee.messages.ChatMessage;
+
+import javax.websocket.EncodeException;
+import javax.websocket.Encoder;
+import java.nio.ByteBuffer;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 06.03.13
+ * Time: 10:14
+ * To change this template use File | Settings | File Templates.
+ */
+public class ChatMessageEncoder extends Encoder.Adapter implements Encoder.Binary<ChatMessage> {
+    @Override
+    public ByteBuffer encode(ChatMessage message) throws EncodeException {
+        return ByteBuffer.wrap(SerializationUtils.serialize(message));
+    }
+}

JavaClient/src/main/java/org/jacp/twitter/ClientAddUserDecoder.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jacp.twitter;
+
+import org.apache.commons.lang.SerializationUtils;
+import org.jacp.jee.messages.Message;
+import org.jacp.jee.messages.MessageType;
+import org.jacp.jee.messages.UserAddMessage;
+
+import javax.websocket.DecodeException;
+import javax.websocket.Decoder;
+import java.nio.ByteBuffer;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: Andy Moncsek
+ * Date: 05.03.13
+ * Time: 22:11
+ * To change this template use File | Settings | File Templates.
+ */
+public class ClientAddUserDecoder extends Decoder.Adapter implements Decoder.Binary<UserAddMessage> {
+    @Override
+    public UserAddMessage decode(ByteBuffer byteBuffer) throws DecodeException {
+        return (UserAddMessage) SerializationUtils.deserialize(byteBuffer.array());  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean willDecode(ByteBuffer byteBuffer) {
+        Message message = (Message) SerializationUtils.deserialize(byteBuffer.array());
+        if (message == null) return false;
+        return message.getType().equals(MessageType.ADD_USER);
+    }
+}
+
+
+
+

JavaClient/src/main/java/org/jacp/twitter/ClientLoginEncoder.java

+package org.jacp.twitter;
+
+import org.apache.commons.lang.SerializationUtils;
+import org.jacp.jee.messages.LoginMessage;
+
+import javax.websocket.EncodeException;
+import javax.websocket.Encoder;
+import java.nio.ByteBuffer;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: ady
+ * Date: 28.02.13
+ * Time: 09:50
+ * To change this template use File | Settings | File Templates.
+ */
+public class ClientLoginEncoder  extends Encoder.Adapter implements Encoder.Binary<LoginMessage> {
+    @Override
+    public ByteBuffer encode(LoginMessage loginMessage) throws EncodeException {
+        return ByteBuffer.wrap(SerializationUtils.serialize(loginMessage));
+    }
+}

JavaClient/src/test/java/test/ChatTest.java

 package test;
 
 import org.glassfish.tyrus.client.ClientManager;
-import org.jacp.chat.ChatClientEndpoit;
+import org.jacp.twitter.ChatClientEndpoit;
 import org.junit.Test;
 
-import javax.websocket.*;
+import javax.websocket.ClientEndpointConfig;
+import javax.websocket.DeploymentException;
+import javax.websocket.EncodeException;
+import javax.websocket.Session;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
     public void connectToEcho() throws DeploymentException, IOException, InterruptedException {
         final CountDownLatch messageLatch = new CountDownLatch(1);
         ClientManager client = ClientManager.createClient();
-        Session session = client.connectToServer(new ChatClientEndpoit(messageLatch), ClientEndpointConfigurationBuilder.create().build(), getURI());
+        Session session = client.connectToServer(new ChatClientEndpoit(messageLatch), ClientEndpointConfig.Builder.create().build(), getURI());
         System.out.println(session.isOpen());
         messageLatch.await(100, TimeUnit.SECONDS);
     }
                     try {
                         final CountDownLatch messageLatch = new CountDownLatch(1);
                         ClientManager client = ClientManager.createClient();
-                        Session session = client.connectToServer(new ChatClientEndpoit(messageLatch), ClientEndpointConfigurationBuilder.create().build(), getURI());
+                        Session session = client.connectToServer(new ChatClientEndpoit(messageLatch), ClientEndpointConfig.Builder.create().build(), getURI());
                         System.out.println(session.isOpen());
 
                         messageLatch.await(100, TimeUnit.SECONDS);
         final CountDownLatch messageLatch = new CountDownLatch(1);
         ClientManager client = ClientManager.createClient();
         ChatClientEndpoit endpoint = new ChatClientEndpoit(messageLatch);
-        Session session = client.connectToServer(endpoint, ClientEndpointConfigurationBuilder.create().build(), getURI());
+        Session session = client.connectToServer(endpoint, ClientEndpointConfig.Builder.create().build(), getURI());
         System.out.println(session.isOpen());
         messageLatch.await(100, TimeUnit.SECONDS);
         endpoint.login();
                         final CountDownLatch messageLatch = new CountDownLatch(1);
 
                         ChatClientEndpoit endpoint = new ChatClientEndpoit(messageLatch);
-                        Session session = client.connectToServer(endpoint, ClientEndpointConfigurationBuilder.create().build(), getURI());
+                        Session session = client.connectToServer(endpoint, ClientEndpointConfig.Builder.create().build(), getURI());
                         System.out.println(session.isOpen());
                         messageLatch.await(100, TimeUnit.SECONDS);
                         endpoint.login();
 
     private URI getURI() {
         try {
-            return new URI("ws", null, "localhost", 8080, "/WebClient/chat", null, null);
+            return new URI("ws", null, "localhost", 8080, "/WebClient/twitter", null, null);
         } catch (URISyntaxException e) {
             e.printStackTrace();
             return null;

JavaClient/src/test/java/test/ConnectToEchoWebsocket.java

         final CountDownLatch messageLatch = new CountDownLatch(1);
         client.connectToServer(new Endpoint() {
             @Override
-            public void onOpen(Session session, EndpointConfiguration endpointConfiguration) {
+            public void onOpen(Session session, EndpointConfig endpointConfiguration) {
                 try {
-                    session.addMessageHandler(new MessageHandler.Basic<String>() {
+                    session.addMessageHandler(new MessageHandler.Whole<String>() {
                         @Override
                         public void onMessage(String message) {
                             System.out.println("### Received: " + message);
                     // do nothing
                 }
             }
-        }, ClientEndpointConfigurationBuilder.create().build(), getURI());
+        },ClientEndpointConfig.Builder.create().build(), getURI());
         messageLatch.await(100, TimeUnit.SECONDS);
     }
 
     public void connectToEcho() throws DeploymentException, IOException, InterruptedException {
 
         ClientManager client = ClientManager.createClient();
-        Session session = client.connectToServer(new MyClientEndpoint(), ClientEndpointConfigurationBuilder.create().build(), getURI());
+        Session session = client.connectToServer(new MyClientEndpoint(), ClientEndpointConfig.Builder.create().build(), getURI());
         System.out.println(session.isOpen());
         messageLatch1.await(100, TimeUnit.SECONDS);
     }

JavaClient/src/test/java/test/TwitterJsonTest.java

 import org.jacp.jee.entity.TwitterResult;
 import org.junit.Test;
 
-import javax.ws.rs.core.MediaType;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;

WebClient-SSE/src/main/java/org/jacp/sse/QueryRessource.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jacp.sse;
+
+import org.jacp.sse.beans.TwitterTimerBean;
+
+import javax.ejb.EJB;
+import javax.ejb.Singleton;
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: Andy Moncsek
+ * Date: 13.03.13
+ * Time: 13:41
+ * Set a twitter query to bean
+ */
+@Path("query")
+@Singleton
+@Named
+public class QueryRessource {
+
+    @EJB
+    TwitterTimerBean bean;
+
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    public void setQuery(String message) throws IOException {
+        bean.setQuery(message);
+    }
+}

WebClient-SSE/src/main/java/org/jacp/sse/SSEResource.java

 
 import org.glassfish.jersey.media.sse.EventOutput;
 import org.glassfish.jersey.media.sse.OutboundEvent;
+import org.glassfish.jersey.media.sse.SseBroadcaster;
 import org.glassfish.jersey.media.sse.SseFeature;
 
 import javax.ejb.Singleton;
 @Singleton
 @Named
 public class SSEResource {
-    private EventOutput eventOutput = new EventOutput();
+    private final SseBroadcaster BROADCASTER = new SseBroadcaster();
+
 
     @GET
     @Produces(SseFeature.SERVER_SENT_EVENTS)
     public EventOutput getMessage() {
+        final EventOutput eventOutput = new EventOutput();
+        BROADCASTER.add(eventOutput);
         return eventOutput;
     }
 
     @POST
     @Consumes(MediaType.TEXT_PLAIN)
     public void sendMessage(String message) throws IOException {
-        eventOutput.write(new OutboundEvent.Builder().name("custom-message").data(String.class, message).build());
+        BROADCASTER.broadcast(new OutboundEvent.Builder().name("custom-message").data(String.class, message).build());
     }
 
     @POST
     @Consumes(MediaType.APPLICATION_JSON)
     public void sendJsonMessage(String message) throws IOException {
-        eventOutput.write(new OutboundEvent.Builder().name("custom-message").data(String.class, message).build());
+        BROADCASTER.broadcast(new OutboundEvent.Builder().name("custom-message").data(String.class, message).build());
     }
 }

WebClient-SSE/src/main/java/org/jacp/sse/application/JerseyApplication.java

 package org.jacp.sse.application;
 
 import org.glassfish.jersey.media.sse.SseFeature;
+import org.jacp.sse.QueryRessource;
 import org.jacp.sse.SSEResource;
 
 import javax.ws.rs.core.Application;
         {
             add(SSEResource.class);
             add(SseFeature.class);
+            add(QueryRessource.class);
         }
     };
 

WebClient-SSE/src/main/java/org/jacp/sse/beans/TwitterTimerBean.java

+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 package org.jacp.sse.beans;
 
-import javax.ejb.Schedule;
-import javax.ejb.Stateless;
+import org.glassfish.jersey.SslConfigurator;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.ejb.*;
+import javax.ejb.Timer;
 import javax.inject.Named;
 import javax.ws.rs.client.Client;
 import javax.ws.rs.client.ClientBuilder;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 
 /**
  * Created with IntelliJ IDEA.
- * User: ady
+ * User: Andy Moncsek
  * Date: 07.03.13
  * Time: 16:06
  * To change this template use File | Settings | File Templates.
  */
-@Stateless
+@Singleton(mappedName = "TwitterTimerBean")
+@Startup
+@Local
 @Named
 public class TwitterTimerBean {
 
     private final static String TARGET_URI = "http://localhost:8080/WebClient-SSE";
+    List<String> list = new ArrayList<>(Arrays.asList("glassfish","gf_jersey","websockets","java"));
+    @Resource
+    TimerService timerService;
+
+    @PostConstruct
+    public void init(){
+        ScheduleExpression schedule = new ScheduleExpression();
+        schedule.minute("*");
+        schedule.hour("*");
+        schedule.second("*/10");
+        timerService.createCalendarTimer(schedule);
+    }
 
-    @Schedule(hour = "*", minute = "*", second = "*/10")
+    //@Schedule(hour = "*", minute = "*", second = "*/10")
+    @Timeout
     public void sendTweets() {
+        SslConfigurator sslConfig = SslConfigurator.newInstance()
+                .trustStoreFile("NONE")
+                .keyStoreFile("NONE");
 
-        Client client = ClientBuilder.newClient();
+        Client client = ClientBuilder.newBuilder().sslContext(sslConfig.createSSLContext()).build();
         try {
             WebTarget webTarget = client.target(new URI(TARGET_URI));
-            List<String> list = new ArrayList<String>();
-            list.add("glassfish");
-            list.add("gf_jersey");
-            list.add("websockets");
-            list.add("java");
-            list.add("MasoudKalali");
             Random rg = new Random();
             String randomElement;
             int listSize = list.size();
         }
     }
 
+    public void setQuery(String query) {
+        Collection<Timer> timers = timerService.getAllTimers();
+        for(Timer t : timers) {
+             t.cancel();
+        }
+        list.clear();
+        list.add(query);
+        init();
+    }
+
 
     private String getFeedData(String input) {
         StringBuilder sb = new StringBuilder();
                 "&with_twitter_user_id=true&result_type=mixed";
         try {
             URL twitter = new URL(searchURL);
-            URLConnection yc = null;
+            URLConnection yc;
 
             yc = twitter.openConnection();
 
         } catch (IOException e) {
             e.printStackTrace();
         }
-        return new String("Error in getting data from the feeds ");
+        return "Error in getting data from the feeds ";
     }
 
 

WebClient-Websocket/src/main/java/org/jacp/beans/ejb/ChatUserBean.java

 
 package org.jacp.beans.ejb;
 
-import org.jacp.jee.api.ChatUserBeanInterface;
 import org.jacp.jee.entity.ChatUser;
 
 import javax.annotation.PostConstruct;
-import javax.ejb.Local;
-import javax.ejb.Remote;
 import javax.ejb.Stateless;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.context.Dependent;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Named;
 import javax.persistence.EntityManager;
 import javax.persistence.PersistenceContext;
 import javax.persistence.Query;
-import java.io.Serializable;
 import java.util.List;
 
 /**
  */
 
 @Stateless(mappedName = "ChatUserBean")
-public class ChatUserBean implements Serializable {
+public class ChatUserBean  {
     @PersistenceContext(unitName = "messagePU")
     private EntityManager em;
 

WebClient-Websocket/src/main/java/org/jacp/beans/websocket/chat/ChatUserProxyBean.java

-/*
- * Copyright (c) 2013, Andy Moncsek, inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided
- * that the following conditions are met:
- *
- *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
- *    following disclaimer.
- *
- *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
- *    the following disclaimer in the documentation and/or other materials provided with the distribution.
- *
- *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
- *    promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.jacp.beans.websocket.chat;
-
-import org.jacp.beans.ejb.ChatUserBean;
-import org.jacp.jee.entity.ChatUser;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: Andy Moncsek
- * Date: 12.03.13
- * Time: 08:46
- * This is simply a workaround to access ejb's in a websocket endpoint
- */
-@Named
-public class ChatUserProxyBean {
-    @Inject
-    private ChatUserBean bean;
-
-    public void saveNewUser(ChatUser user){
-            bean.saveNewUser(user);
-
-    }
-
-    public List<ChatUser> getAllUsers() {
-        return bean.getAllUsers();
-    }
-
-}
     </modules>
     <properties>
         <javax.persistence.version>2.0.0</javax.persistence.version>
-        <jee.version>7.0-b79</jee.version>
-        <glassfish.version>4.0-b79</glassfish.version>
-        <jersey.version>2.0-m13-1</jersey.version>
+        <jee.version>7.0-b80</jee.version>
+        <glassfish.version>4.0-b80</glassfish.version>
+        <jersey.version>2.0-m13-2</jersey.version>
         <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
         <junit.version>4.11</junit.version>
-        <tyrusWebsocket.version>1.0-b12</tyrusWebsocket.version>
+        <tyrusWebsocket.version>1.0-b13</tyrusWebsocket.version>
         <!-- <tyrusWebsocket.version>1.0-SNAPSHOT</tyrusWebsocket.version> -->
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <javafx.version>2.2</javafx.version>