PersonalJava as a client to J2EE, is it possible?
Hi,
I am very new to small device programming. I have managed to get the PJ platform running on my Ipaq (StrongARM) device. I have managed to write and deploy small AWT apps to the device. But for a recently proposed project I have to create a app that run on the PJ platform, which can use remote EJBs. I know it is possible to connect to Eg. a servlet using HTTP from the device. But can I do things like JNDI lookups for a remote middleware bean, and use one through RMI from the device?
I have done J2SE (clients) to J2EE middlware programming in the past, but I am just worried that I will not have the same set of tools to complete the job with PersonalJava on the small device.
Any help appreciated
[737 byte] By [
ph0b05] at [2007-9-26 12:56:49]

java.rmi is an optional package according to the PJava specification -- so if you want your application to run on -any- PJava device, then you can't rely on RMI being present to do your lookups. If you're using Jeode on your iPAQ, then rmi is probably available -- otherwise, it's a bit of a ****-shoot as to whether it'll be there or not.
These easiest (and most portable) way would be, as you say, to connect to a servlet and then have the servlet connect to the EJB. If you want the added overhead (network and processing) of XML, then you could possibly do something with SOAP on that front... (I guess that has the advantage of being 'standards-compliant'). However, for performance reasons you'll probably want to restrict the amount of network traffic, so you might want to define your own 'meta' language for communicating with the servlet.
just my 2c worth
I think Sun is missing an opportunity. They have all but abandoned full fledged Java clients on devices and this is where they could really shine over MS technologies. Java client applications (the same one) executing across a multitude of devices.
All the "device talk" is about J2ME MIDP, despite the fact that the discussion is rarely clarified with MIDP (but that is another complaint regarding Sun's marketing of J2ME). Other than the J2ME/MIDP marketing, J2EE is continuing it's successful development and deployment. However J2EE Blueprints and best practice documents unfortunately gloss over Java clients, in favour of web interfaces. The majority of problems with Java client applications have been addressed by JNLP, and capable VM's are appearing on capable devices. I think Java clients should make there way back into J2EE Blueprints as a preferred method in a case where offline functionality is required, or network bandwidth would result in better performance with the application, or some components thereof, being local.
Despite all the talk of web services I believe many wireless devices would benefit greatly from "intelligent network aware" client side Java to provide functionality when the network is not accessible. In the country, in the subway, dead spots, airplanes, etc. etc. are all examples. Of course these client side applications will also utilize web based services when appropriate and available, but technologies like SyncML and messaging could be used to keep multiple data stores in sync - making the same data available to numerous devices.
Just some thoughts.
P.S. Jeode implements Personal Java 1.2 including:
java.applet (PersonalJava only)
java.awt and sub-packages
java.beans
java.io
java.lang and sub-packages
java.lang.reflect
java.math
java.net
java.rmi and sub-packages
java.security
java.sql
java.text
java.util and sub-packages
> Very much possible. Could you give some pointers on how to do this?To access directly a J2EE server, one would need to use the server's client libraries, which may not run on personal java.