a smartphone as a jee server: glassfish 4 on ubuntu touch
DESCRIPTION
http://blog.c2b2.co.uk/2013/03/a-smartphone-as-jee-server-glassfish-on.htmlTRANSCRIPT
![Page 1: A Smartphone as a JEE Server: Glassfish 4 on Ubuntu Touch](https://reader035.vdocuments.us/reader035/viewer/2022071921/55cf9d23550346d033ac63d2/html5/thumbnails/1.jpg)
pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
The Leading Independent Middleware Experts
Home About C2B2 Consulting
19 March 2013
A Smartphone as a JEE Server: Glassfish 4 on Ubuntu TouchLast year, following the release of the much anticipated Raspberry Pi, Steve couldn’t resist getting JBoss EAP 6 to run on it, which hemanaged with minimal effort!
Not to be outdone, I’ve been inspired by the recent release of Ubuntu Touch – Canonical’s offering for mobile devices. MarkShuttleworth’s trailer videos for the upcoming OS gave me a lot to be excited about; I’ve long been wondering what could be possible ifonly I could unlock the power of the computer I have in my pocket.
Android is (at the moment) my favourite mobile OS, but it’s always disappointed me a little that there was no way to get Java running onit since it lacks necessary packages so when Ubuntu Touch was announced, it finally seemed that there was a New Hope!
Surprisingly easily, once you know the correct steps.
Installing Ubuntu on the Galaxy Nexus is as easy as a single command, provided you’ve already unlocked the bootloader. Theinstallation process took a while – around 30 minutes I think. In any case, it was far too long for a keen early adopter to just sit aroundwaiting! To fill my time, I downloaded the latest Java SE embedded from Oracle (a painful mistake) and the latest promoted build ofGlassfish 4. (If you’re going to be an early adopter, you may as well do it right.)
Ubuntu installs itself very differently to how I expected and, being unfamiliar with Android administration, there was a bit of a learningcurve! Using the Ubuntu SDK’s QT creator IDE, you can easily start an SSH session to your phone, once you have wifi configured. Iexpected the terminal to be limited to some degree, but what I didn’t expect was for it to lie to me!
After connecting, a quick pwd tells me I’m in the /home/phablet directory (phablet being the default user in Ubuntu Touch). The “phablet”user has limited permissions and I quickly found I was unable to switch to the root user. I’m an impatient man at the best of times, sorather than try to spend time fixing that, I simply used the Android Developer Bridge (adb) that QT uses to connect to the device. Acouple of further pwds in various directories told me that Ubuntu actually creates /data/ubuntu and uses that directory as root, soalthough the “phablet” user couldn’t see outside of it to the Android files, the root ADB user could!
How is it done?
Subscribe To Our Blog
Posts
Comments
java (31) jboss (22)middleware (20) JEE (19) oracle(17) data grids (16) glassfish (16)weblogic (14) Infinispan (9) Apache(8) JBoss EAP 6 (8) coherence (8) bigdata (6) Application server (5) Tomcat(5)
View Related Posts
HornetQ (4) Active MQ (3) Camel (3)WildFly (3) Drools (2) EAP 6 (2)
JBoss EAP 6 as lightas Raspberry PI?JBoss EAP 6 JEE !=Heavy! There hasbeen a lot of debateabout JEE application
servers being "heavy-weight" .However I&#...
Configuring andTesting a WebLogicClusterConfiguring andTesting a WebLogicCluster: This article
describes how to configure and test acluster of servers using WebLogic10.3 and A...
The DifferencesBetween JBoss EAP 5
Popular Posts
9Share More Next Blog» Create Blog Sign In
![Page 2: A Smartphone as a JEE Server: Glassfish 4 on Ubuntu Touch](https://reader035.vdocuments.us/reader035/viewer/2022071921/55cf9d23550346d033ac63d2/html5/thumbnails/2.jpg)
pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Installing Java was not a fun task. I tried various ways of transferring the downloaded file over to the phone using any method I could thinkof which would work on a full terminal. Finally, I resorted to ADB once more, using the push command. I then quickly found out that theterminal was powered by BusyBox and it simply refused to run certain packages. (At this point, I suspected a full conspiracy towards myfailure by my phone and Ubuntu desktop.)
I am nothing if not stubborn, however, and, remembering that OpenJDK 7 is certified for ARM chipsets, I just tried to run apt-get on theright package from QT which, to my surprise, worked first time!
phablet@localhost:~$ java -version
java -version
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1ubuntu1)
OpenJDK Zero VM (build 22.0-b10, mixed mode)
I wasn’t expecting much success after the trials of getting Java to run in an environment that was so foreign to me, but I had a goanyway. After getting the latest promoted build of Glassfish 4 from the Aquarium, I pushed the .zip over to the device with ADB again.After unzipping, I tried to start the domain: bin/asadmin start-domain domain1
Nothing.
BusyBox refused to execute asadmin (I ran chmod 755 just to be sure). Since I’d spent the best part of the afternoon on trying to get thisto work, in desperation, I thought I would move the installation directory to /home/phablet and try to run the command over SSH, ratherthan as root over ADB.
I ran the same command and, to my surprise, Glassfish started to load. Surprise quickly turned to horror when I realised that I wasrunning full Glassfish on full Java 7 without changing any heap settings!
After about 2 minutes of waiting with bated breath, the command returned that it had started successfully. I could hardly believe it, so Iwent to the admin console to check:
Installing Java
Installing Glassfish 4
Between JBoss EAP 5and EAP 6Introduction This ispart four in a series ofblogs looking at
JBoss EAP 5 and 6. In Part One ofthis series on JBoss (available here :h...
A Smartphone as aJEE Server: Glassfish4 on Ubuntu TouchLast year, followingthe release of themuch anticipated
Raspberry Pi, Steve couldn’t resistgetting JBoss EAP 6 to run on it,which he mana...
Basic clustering withWeblogic 12c andApache Web ServerThe aim of this post isto demonstrateWeblogic’s clustering
capabilities and to use the WeblogicApache plugin to use the ApacheWeb Server...
Tweets by @c2b2consulting
C2B2 Twitter
▼ 2013 ( 36 )► July ( 3 )
► June ( 10 )
► May ( 3 )
► April ( 5 )
▼ March ( 7 )Creating a Simple Cluster with
Glassfish
JBoss community and EAP arethings changing?
C2B2 is exhibiting at Europe'sNo.1 Information Se...
A Smartphone as a JEE Server:Glassfish 4 on Ubunt...
Detecting, Diagnosing and FixingPerformance Issue...
The Differences Between JBoss
Blog Archive
![Page 3: A Smartphone as a JEE Server: Glassfish 4 on Ubuntu Touch](https://reader035.vdocuments.us/reader035/viewer/2022071921/55cf9d23550346d033ac63d2/html5/thumbnails/3.jpg)
pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Posted by Mike Croft at 21:43
Labels: Android , Galaxy Nexus , glassfish , Glassfish 4. JEE , java , Ubuntu Touch
Not bad for an afternoon’s work! Now all that’s left is to configure it!
All in all, Ubuntu Touch is certainly not ready for the public, but I’m very impressed with Unity as a smartphone interface and the power ofhaving a full linux distribution in your pocket.
Mike Croft@croft
+9 Recommend this on Google
3 comments :
Özkan Pakdil 12 April 2013 03:34
in near future people will serve their sites via their phones(pocket servers) =)
Reply
iocean X7 14 May 2013 09:23
Smartphone as a server, perhaps in the future be able to get new development
Reply
Anonymous 29 June 2013 11:20
Hello,
Thanks a lot !
I try to use the adb push to send a .jar to my Nexus 4. It's seems ok but on the Nexus4 I don't find the file. Do you have an idea where ismy mistake ?
EAP 5 and EAP 6
MIDDLEWARE INSIGHT - C2B2Newsletter Issue 5
► February ( 5 )
► January ( 3 )
► 2012 ( 58 )
► 2011 ( 17 )
► 2010 ( 1 )
► 2009 ( 3 )
► 2008 ( 1 )
![Page 4: A Smartphone as a JEE Server: Glassfish 4 on Ubuntu Touch](https://reader035.vdocuments.us/reader035/viewer/2022071921/55cf9d23550346d033ac63d2/html5/thumbnails/4.jpg)
pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Newer Post Older PostHome
Subscribe to: Post Comments ( Atom )
Enter your comment...
Comment as: Select profile...
Publish Preview
Maybe do I chose a specific folder ?
Kind regards
Jeremy.
Reply
Get your ow n Widget
www.c2b2.co.uk
DisclaimerThe views and opinions expressed onthis b log are those of the authors and donot necessarily represent the views andopinions of C2B2 Consulting Ltd.
VISIT OUR WEBSITE
In Your Network powered by
Login with LinkedIn12 C2B2 Consulting Limited employees on LinkedIn
See how your LinkedIn network connects you to C2B2 Consulting Limited.
C2B2 on LinkedIn
![Page 5: A Smartphone as a JEE Server: Glassfish 4 on Ubuntu Touch](https://reader035.vdocuments.us/reader035/viewer/2022071921/55cf9d23550346d033ac63d2/html5/thumbnails/5.jpg)
pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API
Template images by merrymoonmary. Powered by Blogger.