Developing a RMI application - java

I am trying to develop a simple database application, I wish to use RMI technology for this. What I need to know is, are there any common frameworks for developing RMI applications or do we have to develop the server and clients from beginning?

Maybe you should take a look at the: Remoting and web services using Spring. And there you have simple example of this approach.

Related

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.

Does iPad development work with interacting through Java code with Spring Framework using TomCat to host the web service on a server? How?

Here is the background of my situation:
I want to create an iPad application that interacts with a oracle SQL database. I have existing Java code from my Flex application that handles all the database requests, and modifications using the Spring Framework. The Flex Application ran as a web service through TomCat. Now I want to make that flex application into a mobile iPad version. I am having trouble figuring out what is the easiest way to use existing Java code and use it for the iPad because the iPad interacts using URL requests instead of direct with the Java.
My question is, can I use the existing Java code with the Spring framework to save time from coding all the back-end handling? Basically I want to access all the classes from my Java code by doing Requests from the iPad. Is this possible and will I need JSON or XML to interact between the iPad and the Java code?
Summary:
Can I use
iPad Objective-C <-----> Java (with spring framework) on TomCat Web Service to handle oracle SQL data handeling? If so, how and what technologies do I need? Will I need JSON or XML and how does that factor between the iPad and Java?
Thanks!
A good approach would be to design your app to communicate with RESTful services that return JSON. Once this is done your iPad app doesn't have to even know that the server code is written in Java.. it's just interacting over HTTP.
Here's a good tutorial on setting up your tomcat to host your RESTful services: http://www.vogella.com/articles/REST/article.html - I've used this for an app I'm developing. Spring isn't even necessary.
You could go XML, but JSON is just easier in my opinion. Here's a good blog outlining the good and bad of both sides. http://digitalbazaar.com/2010/11/22/json-vs-xml/
OK, I'm making the following presumptions.
Your flex application runs on a different machine from the Tomcat
server
Your flex application makes web service calls to the Tomcat server
So, the flex application doesn't know the underlying technology that provides the web services. It's just seeing/consuming the output
There's no reason why the iPad app can't do the same thing. There's no reason why it can't use the same web services that the Flex application uses. It could consume the same messages (Assuming it can handle the request/response format currently employed by the Flex application).
You can make changes if you like if you want to change the structure of the requests/responses between the clients. But the clients don't know (nor care) how the web services are implemented. They are just requesting and consuming info.

Alternatives to browser for Java EE applications?

My client wants a Java EE application server but doesn't want to access it using a web browser. They don't want to have the "web page" look but rather something like a stand-alone client.
I don't really know how to do it or even what to google.
I was considering defining a Swing client reacting to web services but I don't really know if this is the best way to do it.
I don't want something like RIA.
I guess my question is "how to build a Java EE client outside a web browser?"
GlassFish allows for having a thick "application client" started with Java WebStart which has easy access to the various things like EJBs inside the server while running on the client.
This might be what your client wants?
http://netbeans.org/kb/docs/javaee/entappclient.html
http://java.sun.com/developer/technicalArticles/J2EE/jws-glassfish/part2.html
I've found the Glassfish 3.1 server very easy to work with as a deployment platform on both Windows and Linux.
This is not so unusual. Define your service interface and expose as EJB's. Create your client (GUI) via Swing, Eclipse RCP (http://wiki.eclipse.org/index.php/Rich_Client_Platform), or other RCP technology. Your client(s), possibly running on multiple workstations, will communicate with centralized services via the EJB client interface.
See http://java.sun.com/developer/technicalArticles/J2EE/appclient/

Easy way to integrate JMS, Web Service and RMI with Java?

I need to know if there is an easy way to integrate JMS, Web Service and RMI with Java (Server Side). Then, I'd need to integrate that with another technology, such as .NET, Flex or PHP (to get consumed as a Client Side). Where should I start from? Is there any Web Site where I could find some examples about it?
If you want to use different languages I suggest to use webservices or jms, some examples are here:
http://blogs.msdn.com/b/bursteg/archive/2008/07/19/how-to-call-a-java-ee-web-service-from-a-net-client.aspx
http://www.codemesh.com/products/juggernet/examples/jms.html

Integration JS and Java

I have two systems to integrate: 1)desktop application (Java6) and 2)web-application (HTML,JS). I want first application to share some services to the second one. How could simply I do that ? I want some simple solution.
Thanks!
Expose them as standards Web Services or RESTful web-services
For an application to serve services, it should start server socket on port and listening on it. Or it should be using webservices. JDK6 comes with WebServices support. May be you can look at it.

Categories

Resources