A Map For Saturday, A Backpackers Documentary To me backpacking is an elusive kind of experience, one you might consider a bit like love in the sense that it runs the full gambit of emotions and when someone asks you to describe it you don't even know where to start. So usually when someone asks me about one of my trips or wants to talk about backpacking in general I play along as best I can, but what I'm really thinking inside is ... "just go on your own trip, then you'll know." Well, if you really can't go on your own trip but want to know more about what it's like to backpack, check out the dvd A Map for Saturday.
It's a cool little documentary made by a guy who quit his job as a tv producer to go on an 11 month around the world trip and documented his experience. The cool thing is that this is more of a backpackers documentary than it is a travel documentary. Sure, you'll see where he's going and what he's doing, but it's more about the backpackers themselves, what their life is like on the road, the good and back things about the lifestyle, the emotions they go through, the challenges they face, etc.
So go check it out and get at least a small glimpse into the life of a backpacker. Logical Domains (LDoms) 1.0.3 is available I skipped a post for LDoms 1.0.2 but I knew 1.0.3 was right on its heels and now its available for download here!
LDoms 1.0.3 adds a number of virtual I/O enhancements with Solaris 10 5/08 OS and supports the UltraSPARC T2 Plus, UltraSPARC T2 and UltraSPARC T1 based servers:
9. The purpose of liferay-display.xml and liferay-portlet.xml
a. liferay-portlet.xml is like a wrapper on the portlet.xml. Liferay has added certain extra functionalities and they have used their own dtd (liferay-portlet-app_5_0_0.dtd)
b. The liferay-display.xml has the following items :
The category.sample means that when we deploy this portlet and then log in as paul/paul or any other user, then click on "Add application" link, the EmployeeInfo portlet will be displayed under "sample"
2. Edit the servers file to add your respective proxy server which is under the location C:\Documents and Settings\<windows user>\Application Data\Subversion . A Sample "servers" file is available at the following location. Just replace the tag "<Add your proxy name here>" with your proxy.
3. Note, sometimes the Subversion directory wont be present under C:\Documents and Settings\<windows user>\Application Data until you restart the machine
11. Once the ant is successful, cd to the directory synergy\install\image\glassfish\bin and run asadmin.bat start-domain
12. Wait for 1 or 2 mintues for the jsps to compile and run the websynergy portal by accessing http://localhost:8585 (user : paul@example.com password : paul)
I knew that I could put Java in my car, in my cell phone, on my badge and on my 'puter. But I didn't know someone can put it into supertankers or on my belt. Why would anyone want it on my belt anyway?
Just a short conversation with CTO Joe Polastre about Java-powered devices at the JavaOne show. Sentilla was one highlight of the show. Cool stuff. Go Stevie!
Get
the latest beta of JRE
6u10, its quick,
quick, quick.
Quick
to
download,
quick to install,
quick to start
applets.
Applets that you can pull out of the web page. Applets that can live
beyond the browser and drop onto the desktop. Applets that developers
can write in Java or designers can write in JavaFX Script. See and believe
that applets are back.
VisualVM
Get
the release candidate of
THE
single cockpit for watching, diagnosing and tuning Java applications.
You've
had the NetBeans support for
nearly a
year for JavaFX Script - and Eclipse
support for that matter - but we previewed a new tool called JavaFX
Distiller (see here:
jump to minute 14). If you've ever written a GUI, and needed a
little artistic help from a visual designer, this is one you need
to know about.
Java
ME LWUIT
Making
better looking
applications easier on today's Java ME devices.
In
January, BluRay emerged as the winner of the biggest
format war for a
generation. So just in case you didn't know BD-J, the programming
model for interactive BluRay content (so its on all the BluRay
players), is based on Java
ME (Personal
Basis Profile, to be precise), and Neil Young announced he's
releasing his full catalog on BluRay, using BD-J to provide all the
interactivity.
This blog talks about creating a JDBC Connection Pool and an associated JDBC resource with MySQL as the Database vendor.
The
default database "sakila" of MySQL is used in this example. All these
could be done so easily with Netbeans 6.1 after installing the GlassFish V3 plugin.
This screencast explains how to create a JDBC Connection pool in the
administration console and its associated JDBC resource. It also shows
a HelloWorld web application that used this resource to get some values
from a table in sakila database.
Sun in Wired's Jargon Watch Congrats to Jim Mitchell and crew for getting Sun into Wired's Jargon Watch for the June 2008 issue. Perhaps a dubious honor (and a dubious definition), but fun all the same.
Macrochip n. An array of microchips connected by lasers, enabling them to communicate at the speed of light and effectively function as a single processor. Sun Microsystems secured $44 million from DARPA to build a prototype; it should extend Moore's law.
The Post-Literate age? The Economist has an interesting column today on literacy in the age of digital media. They do the usual bemoaning of how graphical user interfaces and digital media are to blame for the dumbing down of our culture and reading abilities, but do offer some interesting counterpoints. For example:
Cultural observers bemoan the way electronic media—with their demand for spectacle and brevity—have shortened our attention spans. But as a blogger on Eastgate.com noted recently, that equates brevity with debased taste, and sees patience for long stories as a mark of high culture. But if brevity is to be deplored, what should we make of haiku, sonnets, and ink-brush calligraphy?
On the other side of the coin, lengthy sagas are not the sole prerogative of the literary elite. Pop culture has its share of huge tales—witness the Harry Potter canon. Indeed, for every pared-down presentation pumped out by the electronic media, an engaging narrative can be found.
But I particularly like the following:
[T]he quest for truth has given way to the quest for making sense of the world as experienced. For anyone under the age of 20, the world being experienced is one where the internet has always existed, and where everyone who matters is only a click, speed dial or text message away. “Tomorrow’s adults,” says Mr Federman, “live in a world of ubiquitous connectivity and pervasive proximity.” Their direct experience of the world is wholly different from yours or mine. ... [T]eenagers of today ... are skilled in making sense not of a body of known content, but of contexts that are continually changing.
Teachers must recognise that our pedagogical tools are inconsistent
with the skills needed to survive in a world where people are always
connected to everyone and everything. In such a world, learning to
think for oneself could well be more important than simply learning to
read and write.
I couldn't agree more with the assessment of how people's experience of the world is changing. I also place an extremely high value on being able to think for oneself. But I'm not quite ready to give up the ability to read and write; I still view the ability to articulately communicate as a pre-requisite for success. After all, someone has to craft the concise soundbites.
The preliminary agenda for the Sun HPC Consortium has been published on their conference site. Andy Bechtolsheim, Sun co-founder and Chief Architect, will keynote the event.
The Sun HPC Consortium is an independent, volunteer-organized, international group of member organizations that own or use Sun computer systems with emphasis on high-performance, technical computing, and visualization.
Participants represent a broad range of computing applications and environments. The meeting format is designed to give participants the opportunity to present HPC developments, discuss applications and needs with their peers, and to hear and provide feedback on Sun's engineering plans.
Who should attend:
All Sun scientific, engineering, or research computing customers or anyone interested in high-performance computing on Sun technologies. Each meeting is designed to address a wide range of intrests from application developers to CIOs and VPs of Research. Registration site
Maybe you were lucky and managed to get one of the nice
GlassFish memory sticks during JavaOne.
But, if you didn't, here is your oppty:
Jen,
who put together the content for the original memory sticks
has posted the same content in her blog.
Just follow the links from her
"Fish Stick Anyone?"
writeup.
The virtual memory stick includes GlassFish v3 TP3, GlassFish v2UR2, MySQL,
NetBeans, Hands-on Labs, WebSynergy, Screencasts, Documentation, Blogs, and more.
It looks very complete.
Charlie Babcock over at InformationWeek has a new article out today that dives into a number of issues around virtualization. It's worth a read. First, it gives a good overview of Desktop Virtualization. In particular, he goes into a case study of how Cincinnati Bell is using Sun's VDI software stack and SunRay thin clients to get rid of 3,300 desktop PCs! I sat in on a discussion with a large Wall Street customer yesterday who's just started a pilot with VDI. It solves so many problems for their trading floor applications -- a very demanding area. I can't wait to see what they do with it.
The article also goes into one interesting area of I/O virtualization, and talks about startup Xsigo. It looks like they're doing some interesting things. I recently found out my neighbor works there, so maybe I'll have to walk up the street and hear more about what they're up too.
Lastly, the article goes into the dark area of virtaulization security. That's something we've been thinking a lot about lately too in xVM-land. In fact, the other day the xVM CTO, Mike Wookey came into my office and talked to me about the new rage in virtualization security: Hyperjacking. The term itself is so cool it belongs in a William Gibson novel. I'm glad we have really smart people looking at the security of our own hypervisor offerings.
So many things to think about. Virtualization is changing the IT so rapidly. Will we even recognize a modern data center ten years from now?
OK, so I got busy yesterday and missed Critter Thursday. Fear not! I was really waiting around for just the right thing, and Huffington Post was kind enough to compile the week's five cutest animal videos. While "cats on a treadmill" is a classic (and there are plenty more where that came from on YouTube), the doberman and the waterslide is my favorite.
Happy weekend.
DefaultTreeModel -- Adding, Removing and Updating Nodes Many moons ago I had a discussion with Collin Fagan (Java Tutorial contributor and all around helpful guy) about the fact that I had seen some requests for a tutorial on how to add, remove and update nodes in a DefaultTreeModel.
Collin wasted no time creating such an example. Unfortunately, resources being what they are, I wasn't able to get engineering cycles for reviewing the example. Because we generally don't include material that hasn't been reviewed by engineering, it was backburnered.
When you compile and run the example (it will run under JDK 5) it brings up a panel containing a tree with a root node. When you open the root node you'll see three child nodes. At this point you can right-click any of the nodes (control-click on a Mac) and you can add 50 children to the current selection, remove the current selection, or modify the text on the current selection.
EJB 3.1 aims to further simplify EJB programming model, introducing a series of new features like no-interface local view, .war file packaging, singleton bean, cron-like schedule-based timer, asynchronous invocation, etc. Some of them have already been implemented by GlassFish V3. Ken's blog has more details on many proposed new features in EJB 3.1. Mahesh from GlassFish EJB container team gave a preview of EJB 3.1 container in GlassFish v3 TP2. In this post, I will share a riddles webapp to showcase the use of certain EJB 3.1 features and how they interact with web-tier components like Servlet, JSP, and JSTL.
For NetBeans 6.1 users, this can be completely automated with GlassFish V3 plugin (see ludo's blog). Eclipse plugin for GlassFish V3 TP2 is also available (see Arun's blog).
2. Install EJB container on top of V3 TP2 by running <glassfish_home>/bin/updatetool. Follow on-screen instructions, and choose to install glassfishv3-ejb from Available Add-ons.
3. Start V3 TP2 by running <glassfish_home>/bin/asadmin start-domain, or from within NetBeans or Eclipse.
4. Create a webapp named riddles. The exact steps vary depending on IDE, but it simply contains:
The stateless bean class RiddleBean is annotated with @Stateless but implements no interfaces. All public methods (only getRiddle method in this case) in the bean class and its superclasses are exposed as business methods. @PostConstruct method is invoked after the bean instance is created and before any business method invocation. It initializes riddle data in classpath with class.getResourceAsStream().
@Stateless public class RiddleBean { public Riddle getRiddle() { String data = riddleData[rand.nextInt(riddleData.length)]; return new Riddle(data); }
@PostConstruct private void postConstruct() { //read riddle data with getResourceAsStream }
RiddleServlet acts as the client of RiddleBean EJB, a reference of which is injected into RiddleServlet. With no-interface local view, the client references EJB with its bean class type. But the client must still obtain the reference either through injection or lookup, not new operator.
The servlet does not create any response; it merely sets the injected bean reference into application scope so that it is available for JSP pages. The purpose is to demonstrate the use of @EJB injection. Alternatively, this servlet can be replaced with a context listener or filter, or totally removed by declaring <ejb-ref> in web.xml.
public class RiddleServlet extends HttpServlet { @EJB private RiddleBean riddleBean;
riddle.jsp shows how easy it is to invoke EJB methods with JSP expression language (EL) , without using any java code. The expression ${riddleBean.riddle} has the same effect as calling riddleBean.getRiddle(). The return vaue, a value object of type Riddle, is stored as riddle in page scope.
In your project, EJB source files reside in the same place as servlet and other web component classes. With .war packaging, EJB classes can be packaged under WEB-INF/classes or inside a jar file under WEB-INF/lib, just like any other .war classes. It's no different than an ordinary .war, with no EJB interfaces (not even local business interface), no ejb-jar.xml, no ejb-jar, and no EAR. This is the content of the war file after building the project:
As for the riddle data file riddles.txt, you can package it inside the .war as WEB-INF/classes/riddles.txt. Or you can jar it up as riddles.jar and copy riddles.jar to $GLASSFISH_HOME/domains/domain1/lib. Any jars in this directory will be made available to all apps in domain1. In GlassFish V2, I used to directly copy classes and resources to domain1/lib/classes without the wrapper jar, but this doesn't seem to be supported yet. riddles.txt must follow certain format to be parsed properly (A: Q: %):
FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS: A: To be or not to be. Q: What is the square root of 4b^2? %
In my Ubuntu machine, I just use /usr/share/games/fortunes/riddles file. riddles.war with sample riddles can be downloaded here.
5. Deploy riddles.war using autodeploy or asadmin deploy:
VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.
Since being acquired by Sun Microsystems, VirtualBox Version 1.6 is the first major release since the acquisition.
Version 1.6, has new host platform support, for Mac and Solaris, as well as new high performance virtual devices, and improved scalability.
VirtualBox also runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.
Well let's give it a look! In this exercise, I already have VirtualBox installed, and wanted to create two local VM's (local machines). Part IOpenSolaris 2008.05, and Part IIWindows XP
Equipment Used:
Toshiba M9 laptop Intel® Core™2 Duo Processor 4gb memory
You'll first need to download VirtualBox, by clicking here.
Select the Platform and Language you desire. In my case since my Toshiba M9 laptop has a Intel dual core proccessor, and running Solaris Nevada Build 87, I selected the Platform OpenSolaris AMD64.
With VirtualBox, you can run unmodified operating systems – including all of the software that is installed on them – directly on top of your existing operating system, in a special environment that is called a “virtual machine”. Your physical computer is then usually called the “host”, while the virtual machine is often called a “guest”.
Part I
Step1: Let's start by launching Sun xVM VirtualBox.
root@sunrise8 # /opt/VirtualBox/VirtualBox
You will now see the Welcome to VirtualBox window
Click image to enlarge
Step2: Let's create a new virtual machine. Start by clicking on the New button in the VirtualBox. You now get a dialog window stating, Welcome to the New Virtual machine Wizard box! Select the Next button.
Click image to enlarge
Step3: In the VM Name and OS Type dialog window, give the name to the new Virtual Machine and the OS Type. In this case you'll notice the name I've selected is OpenSolaris2008.05 and the OS Type I've selected from the OS Type drop-down menu is Solaris. Now click the Next button.
Click image to enlarge
Step4: In the Create New Virtual Machine Memory dialog you can adjust the memory size of your virtual machine. You'll notice it gives you a recommended base memory size of 512mb. In this case I've chosen to give this virtual machine 1024mb or 1gb. You do this by moving the Base Memory Size Slide Bar or just change the number in the associated box. After making your the necessary changes click the Next button.
Click image to enlarge
Step5: In the Create New Virtual Machine Virtual Hard Disk dialog, you will select the image to be used as the boot hard disk for the virtual machine. You can either create a new hard disk using the New button or select an existing hard disk image from the drop-down list or by pressing the Existing button to invoke the Virtual Disk Manager dialog.
In this case I will choose New to create a new hard disk.
Click image to enlarge
Step6: The Welcome to the New Virtual Disk Wizard dialog will appear which will help you create a new virtual hard disks image for your virtual machine.
In this case we will using the Next button to go to the next page of the wizard.
Click image to enlarge
Step7: The Virtual Disk Image Type dialog window, you will now have two choices for your virtual disk image type. You can have either a dynamic expanding image, or a fixed-sized image. Please read the captions for each choice. Choice wisely!!!
In our case here, since I have enough disk space, we'll choose the dynamic expanding image.
Click image to enlarge
Step8: In the Virtual Disk Location and Size dialog you can press the select buttonto select the location and name of the file to store the virtual hard disk image, or type the file name in the entry field.
In our case shown here the Image File Name was pre-selected for us call OpenSolairs2008.05. Also in this dialog window you will select the size of the virtual hard disk image in megabytes. This size will be reported to the Guest OS as the size of the virtual hard disk.
By default the wizard has chosen 16.00gb for our virtual hard disk image size. I will change this to 10gb for this exercise. Then click the Next button
Note: If you selected dynamic expanding image in the previous Virtual Disk Image Type dialog window above, the size of the image that is created here will not necessarily be 10gb, but could expand if needed to the full 10gb size. Keep your disk space in mind!!!!
Click image to enlarge
Step9: The Create New Virtual Disk Summary dialog window will appear to give you a summary of the how your new virtual hard disk will be created.
The following screen shows your virtual hard disk image parameters. You can go back and change things if you'd like or in our case we will click the Finish button.
Click image to enlarge
Step10: The Virtual Hard Disk dialog showing the Boot hard Disk (Primary Master)
This dialog well show you the path to the Virtual Hard Disk Image file. Click the Next button.
Click image to enlarge
Step11: The Create New Virtual Machine Summary dialog will now show you the parameters of your new soon to be created virtual machine.
Click the Finish button
Click image to enlarge
Note: To conserve the amount of reading in this post, I repeated Step1 through Step11 for my Windows XP virtual machine.
The next screenshot of the Sun xVM VirtualBox now shows the two Virtual Machines that are ready to be created and loaded.
Click image to enlarge
Step12: From the Sun xVM VirtualBox dialog window, in our case here, we will need change some details shown on the right in the dialog window. For installing the the OpenSolaris2008.05 OS image and the WIndows XP image we will click on the CD/DVD-ROM details link and change the following parameters.
Note: I ignored the following error dialog box that appeared, warning me about the USB Proxy Service has not been ported to this host. I just clicked OK to move ahead.
In the OpenSolaris2008.05 Settings dialog window, I've selected the Mount CD/DVD-ROM checkbox, and the ISO Image File checkbox. Click the Select folder next to the drop-down box, to tell the installer the location of the OS image file. The Virtual Disk Manager dialog will open where you can added image locations. After adding the location of the image, click the Select button, then you can click the OK button, in this case the OpenSolaris2008.05 Settings dialog window.
Click image to enlarge
Step13: Now you will see the Sun xVM VirtualBox dialog window with changes you made above, showing the details of the new OpenSolaris2008.05 virtual machine.
Highlight the Virtual Machine you want to install and click the Start button.
Click image to enlarge
After clicking the Start Button you will now see the following informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard everytime the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button
Click image to enlarge
Step14: After clicking the OK button in the VirtualBox - Information dialog, you will now begin the installation of the OS for the new Virtual Machine. You will be asked several questions before the OS actually starts loading. For this first installation we will be installing OpenSolaris 2008.05 release. Select OpenSolaris 2008.05 in the Grub menu, and hit enter.
Click image to enlarge
After selecting OpenSolaris 2008.05 from the Grub menu, You'll now be prepare the live image for the new virtual machine for installation. On the new screen you will be asked to select a keyboard type. The default is 41 US English. For this exercise we'll take the default.
Click image to enlarge
Now you'll be asked to select the desktop language you'd prefer. The default is English. In this case we'll take the default!! The system will now start configuring the devices, mount local partitions/cdrom, and read ZFS configuration.
Click image to enlarge
After the virtual machine is configured you will see the following VirtualBox Informational dialog appear. Read the dialog for virtual machine optimization, and click OK to accept. After clicking the OK.
Click image to enlarge
Please read the "OpenSolaris License". When finished click the Close button
Click image to enlarge
After reading the "OpenSolaris License", your OpenSolaris 2008.05 Virtual Machine is running and ready to be installed with you Operating System. As shown below. Let's start by shutting down the virtual machine and restart it. From the Systems drop-down menu select shutdown
Click image to enlarge
To restart the new OpenSolaris 2008.05 virtual machine, from the VitualBox widow select the OpenSolaris 2008.05 virtual machine and click the Start button.
Click image to enlarge
Step15: You are now ready to install OpenSolaris 2008.05 release on the Virtual Machine. From the Virtual Machine click on the Install OpenSolaris icon to invoke the OpenSolaris 2008.05 installer.
Click image to enlarge
You will now be presented with the OpenSolaris 1008.05 Installer dialog window. Read and click the Next button
Click image to enlarge
The installer will now ask you where should OpenSolaris be install? The following dialog window is for Disk partition configuration. For this exercise we will take the default shown below. Click the Next button
Click image to enlarge
Select Time Zone & Date Information. I've select the appropriate values for the OpenSolaris Virtual machine and clicked the Next button
Click image to enlarge
You select the appropriate Locale for you OpenSolaris installation, then click the Next button
Click image to enlarge
Next the installer will ask you for the Users information. The Root users password, you will create a new user as welll as naming you system.
Click image to enlarge
A review on the installation settings before proceeding. You have the option of going back to change information. In our case we'll accept the setting and click the Install button.
Click image to enlarge
Installing OpenSolaris 2008.05 on your Virtual Machine.
Click image to enlarge
Your installation of OpenSolaris 2008.05 is now complete. As stated review the OpenSolairs install log for information. You now must reboot to start the system. However first I found you needed to quit and shutdown the virtual machine and unmount the ISO image or it will just read the mounted information and try to install again. So click on the Quit button, the install dialog window will go away.
Click image to enlarge
Now select System and shutdown your virtual machine.
Click image to enlarge
From the Sun xVM VirtualBox window, click on the CD/DVD-ROM link the following OpenSolaris2008.05 Settings dialog window will open.
Click image to enlarge
Uncheck the Mount CD/DVD-ROM drive checkbox to unmount the ISO Image.
Click image to enlarge
Step16: From the Sun xVM VirtualBox window, highlight the Virtual Machine you want to Power-on and click the Start button. In this case we'll highlight the newly installed OpenSolaris2008.05 virtual machine.
Click image to enlarge
Again by clicking the Start button, this will Power-on the new OpenSolaris2008.05 virtual machine, and you will again see the familiar VirtualBox informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard every time the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button
Click image to enlarge
Step17: After clicking the OK button above your virtual machine, will now be running and you will be presented with the Grub menu showing your new VirtualBox boot environment. Shown here. Select the OS from the Grub menu and boot OpenSolaris2008.08.
Click image to enlarge
OpenSolaris 2008.05 should now be boot as shown below here.
Click image to enlarge
Step18: Now that we have OpenSolaris 2008.05 booted, let's log in using the userID and password (or the Root User), we created when we installed the OpenSolaris2008.05 Operating System.
Click image to enlarge
This next screenshot, I've launched a terminal window showing I've successfully booted a VM running OpenSolaris on a ZFS root filesystem.
Click image to enlarge
There you go, "Basic VirtualBox in a Nutshell" Part II Running Windows XP in a VirtualBox VM next post.
In this type of AMI image use, I will send a control data in form of ZIP file to AMI on instance start which will download from S3 prepackaged and zipped application stack, this way we don't need to rebuild AMI and we can update it on boot time.
As as prepackaged and zipped application stack I select already build platform neutral Java based demo of WebSynergy, its sized around 120MB so it have size close to your real application stack.
WebSynergy is Sun's next generation web aggregration and presentation platform containing OpenPortal components.
This platform demo includes developer tooling and an enterprise grade presentation runtime based on Liferay Portal Server, GlassFish v3, and MySQL.
cat syncer.run
#!/bin/bash
# !!! You need to use full path to bins in SMF scrips !!!
# More info about composite AMI images tips see blog http://blogs.sun.com/VirtualGuru
echo "syncer.run got $1"
. /opt/ec2ify/rundata/ec2envs.run
case $1 in
'start')
echo "Downloading glassfish-synergy zip image "
/usr/bin/curl --connect-timeout 1100 --retry 5 --retry-delay 2 \
http://sun-osol-sw.s3.amazonaws.com/glassfish-synergy.zip -o /tmp/glassfish-synergy.zip
if [ $? -eq 0 ] ; then
echo "Got OK receive glassfish-synergy zip image "
curr_dir=$PWD
cd /opt
/usr/bin/unzip /tmp/glassfish-synergy.zip
if [ $? -eq 0 ] ; then
echo "Unpack OK glassfish-synergy zip image"
rm -f /tmp/glassfish-synergy.zip
/opt/glassfish/bin/asadmin start-domain
else
echo "Can't unpack glassfish-synergy zip image"
fi
cd $curr_dir
else
echo "Can't receive glassfish-synergy zip image"
fi
;;
esac
exit 0
3. Create control file zip
zip load-gf-websynergy.zip syncer.run
Second: Run JeOS AMI instance with control ZIP file to load and start app stack
ssh -i id_rsa-myec2-keypair root@ec2-67-202-55-40.compute-1.amazonaws.com
svcs -l svc:/ec2ify/me:default
fmri svc:/ec2ify/me:default
name Amazon EC2 ec2ify me script - updating Solaris image for Amazon AWS infrastruture
enabled true
state online
next_state none
state_time Fri May 16 17:19:00 2008
logfile /var/svc/log/ec2ify-me:default.log
restarter svc:/system/svc/restarter:default
dependency require_all/none svc:/system/filesystem/local (online)
dependency require_all/none svc:/network/service (online)
cat /var/svc/log/ec2ify-me:default.log | more
inflating: glassfish/bin/startserv
inflating: glassfish/bin/stopserv
Unpack OK glassfish-synergy zip image
Command start-domain executed successfully.
[ May 16 22:54:45 Method "start" exited with status 0. ]
7. Check Glassfish server is fully start
tail -f /opt/glassfish/domains/domain1/logs/server.log
You will a lot of deploy lines, start is finished when you see:
[#|2008-05-16T21:46:57.779-0500|SEVERE|GlassFish10.0|null|_ThreadID=13;
_ThreadName=Thread-5;| INFO [DefaultQuartzScheduler_Worker-5]
(PluginPackageUtil.java:1140) - Reloading repositories
^C
O JavaOne terminou na sexta-feira. Lidamos com indivíduos do mundo todo e de todos os setores: equipamentos eletrônicos domésticos, jogos, TI empresarial, exploração espacial, automação de manufatura, indústria automotiva, setor acadêmico. Assim como a própria rede, Java tem algo a oferecer para quase todos, em qualquer lugar.
O enfoque dos maiores anúncios este ano foi o papel do Java no futuro dos RIAs (Rich Internet Applications). O que é um RIA? Depende da sua perspectiva: a meu ver, é qualquer aplicativo conectado à rede que persista face ao usuário, geralmente fora do navegador, e que funcione quando desconectado da rede.
Por outro lado, eu diria que o Java sempre foi uma plataforma RIA, mesmo antes que tal coisa fosse necessária. Os primeiros applets Java proporcionavam interatividade, porém em troca de complexidade de desenvolvimento e, no início, de desempenho isso quando um navegador, e mais recentemente o Javascript, já seria suficiente.
Contudo, aplicativos baseados em navegador estão alcançando os limites de complexidade e desempenho, e os proprietários de conteúdo têm como meta obter um nível melhor de interação (por meio de vídeo de alta definição ou interatividade avançada). Desenvolvedores têm buscado algo novo o navegador é um modelo de programação altamente acessível, porém é um modelo de implementação fraco no caso de aplicativos RIA/desconectados.
Outro fomentador do RIA é a evolução do modelo de negócios muitas empresas por trás de aplicativos RIA buscam independência de navegadores e mecanismos de pesquisa, cujas configurações padrão e empresas proprietárias representam uma ameaça competitiva. Há um interesse crescente por aplicativos instalados localmente que resultem em uma interação rica, direta e permanente com os consumidores. Ninguém quer pagar pedágio para ir ao encontro de seus próprios clientes.
Tendo isso em mente, ao trabalhar para reinventar a plataforma Java, encontramos um conjunto consistente de requisitos. Vindos não somente de autores de código, mas também de franquias de esporte que buscam uma interação direta com os fãs, empresas de mídia que desejam se libertar das configurações do navegador, artistas, empresas e fabricantes de dispositivos todos buscam interagir com seus clientes de modo exclusivo via a rede. Esse público tem requisitos similares quanto à plataforma RIA eles querem uma tecnologia que:
Chegue até cada cliente na Internet, em PCs, celulares e novos dispositivos.
Forneça alto desempenho e possa atrair profissionais criativos em seu processo de design.
Tire proveito de habilidades e infra-estruturas empresariais existentes
Seja completamente gratuito e de fonte aberta.
Permita aos proprietários de conteúdo controlar e manter a propriedade de seus dados.
Semana passada, durante o JavaOne, abordamos cada uma dessas questões, do seguinte modo:
Em primeiro lugar, desenvolvedores de RIA desejam alcançar todos os consumidores do mundo, via qualquer tipo de dispositivo.
Por quê? Porque o mercado está na frente dos consumidores, qualquer que seja a tela que utilizem para visualizá-lo. Computadores, celulares, PDAs, livros digitais, qualquer coisa. O mercado está em todas as telas do seu dia a dia, não só na do PC.
Para ilustrar isso, só no caso de PCs, a popularidade de Java cresceu muito nos últimos anos, conforme foi medido pelo número de downloads do ambiente de tempo de execução geralmente, registramos o download de 40 a 50 milhões de novos ambientes de tempo de execução do Java a cada mês, e realizamos a atualização de mais de um bilhão deles por ano. A adoção da plataforma Java excede a adoção do próprio Microsoft Windows o ambiente de tempo de execução do Java (JRE) é pré-carregado em quase todos os computadores com Windows (da HP, Dell, Lenovo etc.), porém é executado também em computadores Macintosh da Apple e com Ubuntu, Fedora, SuSe, Solaris e OpenSolaris. Além disso, o JRE está presente em bilhões (sim, bilhões) de dispositivos sem fio e móveis, desde painéis de automóveis e dispositivos de navegação até o Kindle da Amazon (você sabia que o Kindle da Amazon é uma plataforma Java)?
Isso significa que a plataforma Java tem mais usuários do que qualquer outra tecnologia de software já criada no mundo.
Em segundo lugar, desenvolvedores de RIA desejam desempenho, funcionalidade E simplicidade.
Por quê? Porque proprietários de conteúdo e desenvolvedores de aplicativo querem captar o interesse dos consumidores e poder contar com artistas e profissionais criativos no fluxo de trabalho.
O histórico do Java em termos de simplicidade não é perfeito por essa razão, nossas equipes reescreveram o modelo de applet e concentraram-se em assegurar que o novo ambiente de tempo de execução de Java para o consumidor possa ser carregado com excepcional rapidez em uma página da Web, apresente um desempenho notável durante interações complexas e seja facilmente acessível aos consumidores (clique aqui para baixar uma versão beta). Além disso, simplificamos o Java por meio de uma linguagem de script, a JavaFX script, que permite que profissionais criativos interajam com autores de código para criar experiências interativas completas, ao mesmo tempo que adotam a cadeia de ferramentas criativas (desde o design da interação até a manipulação de pixels) usada por designers e artistas digitais no mundo todo.
E tenho o prazer de termos solucionado o problema de instalação em desktop ao separar os applets JavaFX da página da Web com a simples ação de arrastar e soltar (clique na imagem acima para ver uma demonstração). Agora, os desenvolvedores podem ignorar o navegador e instalar com facilidade aplicativos nos desktops: uma vez que o applet é solto na área de trabalho, os proprietários do conteúdo garantem um relacionamento direto com seus consumidores.
Você talvez já tenha visto que estamos adicionando ao Java codecs de vídeo e áudio de alta qualidade completos para todas as plataformas em que é executado solucionando outro problema dos desenvolvedores de RIA: suporte para mídia baseada em tempo (clique aqui para ver uma demonstração de vídeo de alto desempenho).
Em terceiro lugar, as empresas querem reutilizar suas habilidades e ativos de Java existentes ao migrar para RIA.
Quase todas as empresas empregam programadores com habilidades em Java ainda é a principal linguagem de Internet ensinada no mundo todo, e encontra-se presente em quase toda a infra-estrutura comercial global. Conforme as empresas se esforçam para atrair o interesse de seus clientes via plataformas RIA, reutilizar habilidades existentes e conectar aplicativos RIA a sistemas existentes proporciona à comunidade Java uma habilidade exclusiva de criar a partir da base existente em vez de tentar substituí-la.
Essa familiaridade também permite que empresas e equipes de desenvolvimento concentrem-se na interação com os consumidores em vez de irritar a equipe de TI com novos requisitos de infra-estrutura (desenvolvedores de JavaFX simplesmente conectam-se a infra-estruturas empresariais existentes em vez de exigir novos sistemas para os aplicativos RIA).
Em quarto lugar, desenvolvedores de RIA querem plataformas gratuitas e abertas.
Por que gratuitas? Porque desenvolvedores não querem complicar seus aplicativos com dependências que envolvam royalty, nem usar tecnologias que predefinam onde os consumidores podem aparecer. Você não cria comunidades de desenvolvedores em torno de fonte fechada, e sim cria comunidades de usuários e essa é uma situação em que a seleção e adoção dos desenvolvedores definirá o mercado de RIA. O JavaFX, como todas as plataformas de software da Sun, será disponibilizado gratuitamente como fonte aberta, e será lançado por meio da licença GPL (v2).
E não pense que software gratuito e de fonte aberta é atraente somente para os alternativos tatuados... estamos vendo um aumento notável de países em desenvolvimento buscando software de fonte aberta através de departamentos de compra governamentais e acadêmicos. Por quê? Para proteger o direito de escolha e criar oportunidades inerentes não há motivos para criar a dependência de software proprietário quando isso pode ser evitado.
Se você analisar o espaço de mídia social cuidadosamente como nós temos feito, entenderá o valor da instrumentação e intenção ao criar um negócio na Web. Saber o que os usuários estão fazendo com seu produto, seja ele uma liga de críquete fictícia ou um aplicativo de transação bancária, permite o surgimento de mais modelos comerciais inovadores, o fornecimento de serviços de maior valor, o posicionamento de anúncios mais eficaz dados permitem a tomada de decisões informadas e o aumento do valor de um produto (além, claro, de um CPA mais alto).
Contudo, a maioria dos aplicativos RIA é criada e então implementada cegamente. Os desenvolvedores que ultrapassam os limites do navegador perdem o acesso a informações sobre o que os usuários fazem com o produto ou têm de depender de um provedor de tecnologia que acaba se infiltrando em seu fluxo de dados. E alguns desses provedores de tecnologia são concorrentes dos desenvolvedores de conteúdo.
Através de um projeto com o codinome Project Insight, vamos aprimorar a plataforma Java para permitir que desenvolvedores coletem o fluxo de dados gerado por seu conteúdo RIA. Os desenvolvedores de JavaFX poderão se concentrar em seus modelos de negócios em vez de ter de aprimorar os dos outros.
_______________________
Com isso tudo em mente, o que representa o sucesso do JavaFX para a Sun?
Por definição, ele vale mais para a Sun do que a adoção da plataforma de terceiros (conhecido como "valor de opção positiva") - e a infra-estrutura proprietária usada para servi-la (não se esqueça de que os RIAs contam com backends de Internet avançados). E no mundo de RIA, todas as opções serão gratuitas, sempre essa não é uma corrida a ser ganha no preço.
Na minha opinião, a plataforma com maior chance de vencer é aquela que liberta os desenvolvedores para que alcancem mercados, oportunidades e experiências de usuário a seu critério, e não a critério dos fornecedores. E libertar desenvolvedores é o que fazemos melhor. É parte do DNA de tudo que criamos.
Desenvolvedores, saibam mais em JavaFX.com. E não deixem de conferir o NetBeans - assim como o próprio Java, ele começa a revolucionar o mundo livre...
15 Maggio 2008. Ho avuto il piacere partecipare al ForumPA, a rappresentare Sun Microsystems, nell'ambito della tavola rotonda sul tema dell'identità federata per le due principali iniziative che riguardano SPCoop ed ICAR. La tavola rotonda ha avuto l'obiettivo di mettere in evidenza "L'Identità federata vista dal mercato e dalle società in house" ed ha visto la partecipazione, anche, di Andrea Garmignani (IBM), di Lucio Forastieri (Sardegna IT), di Vittorio Gallinella (LAit) e di Oscar Sovani (Regione Lombardia) con il ruolo di moderatore. Il modello di federazione proposto da ICAR INF-3 è caratterizzato da una
architettura “User-centrica”. Questa caratteristica è funzionale alla
complessità della pubblica amministrazione rispetto alle modalità di
erogazione dei servizi, per cui un utente che intende accedere ad un
servizio è esso stesso parte del protocollo (in letteratura si
definisce “people in the protocol”). La condizione necessaria e
sufficiente per indirizzare un modello user-centrico sono il rispetto
delle seguenti caratteristiche:
User consent - si da all'utente l'abilità di consentire (oppure no) lo scambio di informazioni.
User control - si riferisce all'abilità di un utente di definire una policy che governa lo scambio ad un livello granulare.
User centrism - è riservata ad un particolare classe di utenti in cui lo scambio dell'informazioni è sotto l'assoluto controllo del utente.
Al link seguente trovate la presentazione relativa mio intervento, dal titolo "Approccio all'identità federata per un modello user-centrico: La soluzione Sun tra Visione ed Innovazione", in cui s'illustra il modello concettuale proposto da Sun (vedi figura sotto) che attraverso un approccio olistico mira ad indirizzare sia il tema della centralità dell'utente che gli aspetti di governance della gestione del ciclo di vita dell'identità e dei ruoli.
Come Sun, abbiamo tenuto a precisare che l'elemento fondamentale al successo dell'iniziativa (architettura federata e policentrica) è il rispetto degli standard, in particolare di SAML e che le specifiche d'interazione nel modello ICAR INF-3 devono soddisfare i profili d'interoperabilità definiti dagli standard stessi.
Ulteriormente, si è discusso della necessità di estendere il modello delle interazioni fino ad includere il processo autorizzativo in modo d'aiutare la pubblica amministrazione ad indirizzare le problemache di accesso ai servizi, in cui le policy di autorizzative sono anch'esse distribuite (almeno per quanto riguarda i ruoli ed i profili), attraverso l'implementazione di standard aperti (OASIS) come XACML (eXtensible Access Control Markup Language).
Ho evidenziato come l'estensione del modello verso device mobili (telefonini) è sicuramente uno degli aspetti più innovativi in cui l'architettura federata può evolversi per l'integrazione di una nuova generazione di servizi di mobile Government (mGovernment). Attraverso l'utilizzo d'informazioni di profilo memorizzati all'interno della SIM si consente, quindi, di sfruttare la pervasività dei device mobile con l'aggiunta alla capacità di strong authentication che questi meccanismi sono in grado di realizzare. Un possibile scenario può prevede l'interazione tra un utente con telefono cellulare (con SIM abilitata ai servizi di profilo personale) e un ente preposto all'erogazione di servizi (eGov). La richiesta da parte dell'utente di un particolare servizio scatena uno scambio di messaggi tra il device mobile e il server, mediante il quale il server è in grado di richiedere informazioni sul profilo personale (memorizzati all'interno della SIM) ed elaborare, quindi, un servizio personalizzato in base a queste informazioni [SAML PAOS].
Thanks to my colleague Terry Sigle who referred Tripit.com to me Tuesday evening. I have been delighted with its real-world features that simplified my work life.
This afternoon, I completed a travel itinerary that required three separate reservations - two through the AMEX travel website and one through a direct call from a hotel. I then simply sent the three reservation emails, untouched, to tripit.com.
Voila! As if by magic, I received an email with a link to a composite itinerary complete with day-by-day weather forecasts, maps and driving directions. I easily verifed that everything was in sync printed out a combined schedule. Plus, all the individual reservations showed up on my i-cal compatible calendar and I easily accessed the itinerary via the mobile Tripit site.
In addition to this capability, Tripit.com has a social networking capability, similar to Dopplr, that allows travellers to link to each other and share travel plans. Please email me at mgd [at] sun [dot] com if you would like to connect and keep abreast of each other's travel schedule.
Kernel code quality
Interesting artcle about the quality of the kernel source code. Diomidis Spinelli compared the FreeBSD, GNU/Linux, Solaris, and Windows kernels for his article A Tale of Four Kernels:
Despite various claims regarding the efficacy of particular open or close-source development methods, we can see from the table that there is no clear winner (or loser). The two systems with a commercial pedigree (Solaris and WRK) have slightly more positive than negative marks. However, WRK also has the largest number of negative marks, while Solaris has the second lowest number of positive marks. Therefore, the most we can read from the overall balance of marks is that open source development approaches do not produce software of markedly higher quality than proprietary software development.
Looking for one-stop shopping to find technical documentation at Sun? Check out the newly updated Documentation Center. This page not only links to product documentation on docs.sun.com, but also to other Sun sites and other open source sites. You can begin to navigate through a broad range of information products for Sun software and hardware, all from a single landing page.
This blog entry provides step-by-step instructions for creating a simple Rails application that uses the Java 2DTM API to perform server-side image processing. It also shows you how to install and use the GlassFishTM v3 Gem, which contains only the GlassFish v3 kernel, Grizzly, and other utilities, thereby giving you an application server with a smaller size and a faster start-up time.
Although Rails is intended for developing database-backed web applications, this application does not use a database. Many think that it is better to use the file system rather than a database to store binaries. I'll leave it up to you whether you use a database or not for that. In any case, this blog entry focuses on taking advantage of JRuby to access Java platform libraries from a Rails application.
Installing the Software
To get started, go through these steps to install JRuby, Rails, and the GlassFish v3 Gem if you haven't already.
Download jRuby-bin-1.1.zip from jruby.codehaus.org and unpack the zip file.
Add the path to your jRuby installation to your system path.
Install Rails on your JRuby VM by running this command:
jruby -S gem install rails
Install the GlassFish v3 gem on your JRuby VM by running this command:
jruby -S gem install glassfish
Creating the Rails Application
Now, let's set up the application like you would with any JRuby-on-Rails application.
Go to <JRUBY_INSTALL>/samples.
Generate the application's directory structure:
jruby -S rails photo
Go to the photo directory you just created.
Generate a controller and a default view:
jruby script/generate controller home index
Tell Rails that you are not using a database for this application by doing the following:
Open the <JRUBY_INSTALL>/samples/photo/config/environment.rb file in a text editor.
Remove the hash mark (#) from line 21 so that it reads:
This application has a simple UI that displays an image, a combobox, and a button. The user selects an image-filtering effect from the combobox and clicks the button. When the user clicks the button, the application performs an image processing operation on the displayed image to produce the effect and opens a new page that displays the processed image. Here's a screenshot of the first page:
To set up the UI, do the following:
Copy a JPEG image to <JRUBY_INSTALL>/samples/photo/public/images.
Open <JRUBY_INSTALL>/samples/photo/app/views/home/home.html.erb in a text editor.
Here you're using the form tag and select_tag helpers that Rails provides. It's a good idea to use the helpers rather than to write this HTML by hand because the helpers take care of a lot of extra stuff you'd have to add if you wrote the HTML yourself. When you run the application, just view the source of the page and you'll see what HTML the helpers generate for you. Check out Ruby on Rails Manual ActionView::Helpers for more information on the various helpers for views.
From the combobox on this page, the user can select from four different image effects: Grayscale, Negative, Brighten, and Sharpen. The selected name of the effect is saved into the operation variable and is passed as a request parameter to the seeimage action of the controller. The action will use this request parameter to execute the appropriate image-processing code.
Adding the Image Processing Code to the Controller
This application gives you a good overview of how to access Java libraries from a Rails application using Ruby code. It also includes a nice sampling of the image-processing operations available in the Java 2D API.
While adding the Ruby code that performs the image processing to the controller, you'll learn the following concepts involved in using Java libraries in a Rails application:
Giving your controller access to Java libraries
Referring to Java classes
Performing file input and output using the java.io and javax.imageio packages
Assigning Java objects to Ruby objects
Calling Java methods and using variables
Converting arrays from Java language arrays to Ruby arrays
Streaming files to the client
You'll also learn the following concepts associated with performing image processing with Java 2D: