One to One chat application in java - java

Hi Im planning to create a one to one chat application in Spring2/hibernate without using XMPP/Jabber and need to run in websphere server.
Can someone point me some technology to use to create comunication channel between two users
Is CometD a good option?will it run on websphere?

CometD is a good option and it should run on websphere however it works best on Jetty as there are optimizations in place for it. CometD 3 will have support for jsr-356 javax.websocket so I would recommend using a websphere version that supports that since you are starting out with it...or just use Jetty. :)

Related

WAS thin client deploy

Currently, I use WAS for deploying the java builds on a remote server. I need to remove whole big WAS server since I dont host any application as it is just for deployment using wsadmin.
I just want to retain the WAS libraries which may require for deployment remove everything else.
Is it possible to deploy with WAS but using only needed libraries?
If yes, what could be the procedure to do that?
Thanks
One such solution is described in Using the latest Jython with a WebSphere Application Server wsadmin thin client.
Another one is WDR.

Developing app with web and Android client with Java

I'm going to start developing a new simple "X management" kind app, like contact management or events management. What I want to know is which tools would be the best to achieve it in the way I want.
My app needs to be a web app running on a server that has a mysql database to save and retrieve some simple information. This app must have a web client but I want it to be able to be extended to work with an Android app client.
Things I've thought:
I've worked on Java with facelets and JPA travels management app running on a GlassFish server on localhost with a JSF web view, so maybe my web client and the full app could be done with this.
I've worked with web services such as SOAP and REST with Jaxb and xml schemes to retrieve information parsing some webs into xml or json to show on a client .net app. So I've thought I can add to my app, like last topic we talked about, a REST web service layer to easily work as I want, or at least I think it would be easy. If I do this the Android app could share the same app core code but using the REST service.
My question is what could be the best way to do an app with 2 client side in different platforms that could share some code to be easy to extend it moreover to a desktop app. I've talked about these 2 options because I'm a students of computers at university and those are the tools I know, but I can easy learn more. I've also think about just a REST service and create a web and an Android client to work on same service or something like that.
This post is getting long, so here is the summary: What technologies and tools do you think are the best choice to create an java web app that needs to have web and Android client? Also what server, like tomcat, GlassFish or another, should I use? And what about persistence layer? JPA with mysql is the best I know to work with.
Thanks a lot.
P.D: I work with eclipse
From my point of view:
You can use java jersey and java spring both ( java spring as Dependency injection) for creating RESTful Web service. So, In server side you will create endpoint and you can access data from any platform through those endpoint.
Server can be anyone. It's up to you. I always try to use tomcat but tomcat is not a full JavaEE container it's only a servlet container. So if you want to use full JavaEE version then you should use Glassfish.
And yes JPA .It can be easily used in any environment supporting JPA including Java SE applications, Java EE application servers, Enterprise OSGi containers etc.
On the other hand, still choice is yours.

Deploy Java restful web service to live server

I have just learned to create java rest API using jersey and Oracle database.
I'm developing in eclipse and using weblogic server to run and test web service on localhost.
My question is what are the options of live servers to deploy this service so that I can access this API in my android application or any web application???
You can do that. But you have to make sure that all the dependent jars are packaged with the your WAR project(eg; Oracle db related things).
Some blog entries which give you an idea about what are all these servers and which one to pick for open development and common standards - http://blogs.forrester.com/mike_gualtieri/11-07-15-stop_wasting_money_on_weblogic_websphere_and_jboss_application_servers,
and this one http://zeroturnaround.com/rebellabs/the-great-java-application-server-debate-with-tomcat-jboss-glassfish-jetty-and-liberty-profile/
This will give pretty good idea about what is all these servers :)

Using WebSockets with Codename One

I am new at using Codename One. I am trying to deploy a server that will interact with my app on Amazon Web Services using OpsWorks. The server is going to run on Apache Tomcat and be a dynamic web project written in Java, and I am wondering the best way to communicate with the Codename One client. I am planning to use the Socket classes provided by Codename One, but and not sure what to use for the server-side code. Will it work to use WebSockets from Apache? I am having difficulty debugging the server code and have hit a wall here. Thanks in advance!
WebSockets aren't compatible with sockets so you will need to code a websocket implementation which is a bit of work. I suggest you use HTTP communication which is more portable and very performant on the devices.
You can also use solutions such as PubNub which allow for fast message based communications.

What do I need to realize notification using JMS?

I just need notification system. javax.jms.* - good solution I think, but I can't understand what do I need to use JMS?
I don't want to use any app. servers like GlassFish or Tomcat, I just would like to use standard jdk and myserver(very light) and myclient(very light too) and some MessageSystem to exchanging bitween myserver and myclient. As I understand to use JMS I need JMS Provider. For example: ActiveMQ. But I don't uderstand ActiveMQ needs any server?(GlassFish probably), and what kind of *.jar do I need from Java EE ?
JMS provider or more correctly a Message Broker can be a stand-alone application. Most of J2EE app servers include a broker inside them but yes we also have many very good stand alone JMS brokers, ActiveMQ is good, then there is OpenJMS and many others. And as they are stand alone they don't need another app server to run them. And they usually come with every needed jar as well :) SO you'll not need to copy any jar from other app-server to say ActiveMQ or OpenJMS.
ActiveMQ runs as a standalone server; it requires the Java VM like any Java application but nothing else beyond that.
Other stand alone JMS brokers (open source) which can be run standalone or even embedded in your Java application are Open Message Queue (OpenMQ) which is also included in GlassFish, and the new JBoss HornetQ message broker which will be the JMS implementation in JBoss application server.

Categories

Resources