Welcome!

Java IoT Authors: Elizabeth White, Pat Romanski, Liz McMillan, Shelly Palmer, Karthick Viswanathan

Related Topics: Java IoT, Microservices Expo, Adobe Flex

Java IoT: Blog Feed Post

Installing and Setting up BlazeDS in JBoss AS 5

Answers to all your questions

In this article I will illustrate how you could install and setup BlazeDS in a JBoss AS 5 application server instance. A number of new developers have difficulty installing and setting up BlazeDS in JBoss. I hope this article will provide answers to their questions and also help all those others who are seeking similar help.

First lets download and install JBoss AS 5. If you already have an instance installed then you can skip this step. If you have a prior version of JBoss (a 4.x version) installed then you could possibly avoid upgrading the installation, unless you need one of the newer features in version 5. You can read “What’s new in JBoss AS 5” to understand the new features in JBoss AS 5.

To download JBoss AS 5.1.0.GA (which is the latest stable release at the time of this writing), go to http://jboss.org/jbossas/downloads/. Once you have downloaded the distribution expand the archive file to a folder in your file system. JBoss AS is distributed in .zip and .tar.gz archive formats. If you are on windows, use the .zip distribution. Whereas, if you are on Mac OS X or Linux then get the .tar.gz version.

JBoss AS needs JDK 6. If you don’t have JDK 6 on your machine please download and install it from http://java.sun.com/javase/6/.

Once you expand the JBoss distribution and you have the correct version of Java running on your machine, you are ready to start using JBoss. One of the toughest things for a JBoss newbie is to understand the following:

  • the JBoss directory structure
  • the deployment model
  • the application server configuration
  • the startup and shutdown process

Therefore, in this write-up I will atttempt to explain each of the topics in the list above and see how it applies to BlazeDS.

The JBoss AS 5.x directory structure

First look at the Figure 1 below.

Figure 1: JBoss main directory structure

Figure 1: JBoss main directory structure

The “bin” and “server” folders are what you will need most. The “bin” folder has all the executables, including those to start and stop a server. The “server” is the core of the appplication server. This is where all the application server modules are and this where you deploy your application. The BlazeDS application, that you will download shortly will be deployed in sub-folder of this folder.

The “lib”, “client” and “common” folders have all the jar files that JBoss server and client applications may need. I will dig a bit into it only later in this post. The “docs” folder has the documentation.

Within the “server” folder you will find the following sub-folders:

all
default
minimal
standard
web
  • all
  • default
  • minimal
  • standard
  • web

Each of these are built-in server profiles that you could use to deploy your application to. In most likelihood going with “default” will suffice. If none of these available server profiles are sufficient or suitable, you can also create your own custom server profile. For example I created a custom server profile called “sandbox” and started out by copying over all the contents of the “default” folder into it.

I will stick to the “default” server profile for the rest of this post and will not talk about custom server profiles for now. Within the “default” folder is a folder called “deploy”. The “deploy” folder is where you deploy an application within JBoss AS. This is a good time to download and deploy BlazeDS to show what deployment of a application in JBoss involves.

Downloading and deploying BlazeDS

Go to http://opensource.adobe.com/wiki/display/blazeds/Downloads and download the latest BlazeDS release build (which as of now is a 3.x version). BlazeDS can be downloaded either in source or binary formats. In addition, you have the option to download a BlazeDS turnkey distribution, which includes an Apache Tomcat instance and a set of sample applications that leverage BlazeDS, as a part of the distribution. I would recommend downloading the turnkey distribution to get hold of the sample applications. At the time of this writing the latest BlazeDS tunrkey release is “blazeds-turnkey-3.2.0.3978″.

Once downloaded, unzip the zipped up distribution. Once you expand the archive you will find the following “war” files in the root of the distribution:

  • blazeds.war
  • ds-console.war
  • samples.war

Next, copy over all the three “war” files to the server/default/deploy folder.  Now, you are ready to start the JBoss application server.

Starting and stopping JBoss AS

The JBoss AS “bin” folder has start and stop scripts. Scripts are available for multiple platforms, sepcially windows and the linux/unix/mac os x platforms. To start and stop a JBoss instance use “run.bat” and “shutdown.bat” on windows and “run.sh” and “shutdown.sh” on the linux/unix/mac os x platform. When using “run.bat” on Vista you may encouter problems with scripts ability to locate findstr. Read more about this problem: Findstr Command Not Found.

Once the server starts, open up a browser instance and go to http://localhost:8080/samples to access the sample applications that come with the BlazeDS turnkey distribution. In addition, you could point your browser to http://localhost:8080/ds-console and access the administration console that helps to monitor the state of your BlazeDS instance.

At this stage if you peek into your JBoss server logs you are likely to see a trace that says its unable to connect to the sampledb. The error output on the command line is as shown in Figure 2.

Picture 2

Figure 2 : JBoss server log snippet

To correct this problem, go to the place where you unzipped your blazeds turnkey distribution and run the startdb script within the sampledb folder.

BlazeDS is now installed and ready for use with a JBoss AS instance. More accurately you have taken the first few steps to start with more configuration and serious development. In later posts I will explain numerous configuration options around JMS, clustering, remoting and more. For now, I hope the write-up helps those who have had trouble with getting started with BlazeDS on JBoss.

Read the original blog entry...

More Stories By Shashank Tiwari

I am a technology entrepreneur, innovator, author and, as some say, a “thought leader”. I like to solve challenging computing problems, especially those that drive innovation. Being a polyglot programmer, I can program fluently in many languages, including Java, Python, C++, C, Ruby, ActionScript, JavaScript, Objective-C, Haskell, Scala, Clojure, PHP, Groovy, Lisp and Perl. I must admit that I like to learn programming languages and if there is a new interesting one coming, I wouldn’t be far behind getting to grips with it. Over the last many years I have built some cutting edge enterprise and consumer software applications, many of which have leveraged large data sets and the web based programming paradigms. This means I also know a lot about data bases and persistence. I am very conversant with relational databases, embedded databases, object databases, text based data and XML. Having leveraged web based programming paradigms, I have first hand experience with a lot of web development frameworks, including but not limited to Adobe Flex, Spring MVC, Rails, Grails and Django. Not to forget, I obviously have worked a lot with HTML, JS and CSS. My experience and interest are varied and diverse and range a wide spectrum of application development realms that include the server, the client and the middleware. Besides, programming, I am also deeply interested in mathematics and theoretical computer science. This motivates me to bring my knowledge of applied mathematics, statistical modeling, artificial intelligence and sometimes simply data structures, to good use, when I build applications. A couple of domains like financial mathematics and scientific computing seem to have been good fit for such expertise. I am an ardent supporter of open source software and try and contribute to open source code bases and causes. I like the plurality and variety that software development offers; the choice of programming languages, the abundant availability of tools and libraries, the existence of multiple operating systems and the possibility of varied software development methodologies. As a member of the technology community, I am an active contributor to the ever evolving software development languages, methodologies and standards. I am an expert group member on a number of JCP (Java Community Process) specifications, for example JSRs 274, 283, 299, 301 & 312, and have been recognized as an Adobe Flex Champion.I run and organize a few community events like Flex Camp Wall Street, Show Ramp and Polyglot World. I bring together all my expertise in terms of services and products via my primary venture, Treasury of Ideas LLC, in which I play the role of a Managing Partner. Treasury of Ideas LLC, through its focus on innovation and value optimization, offers many best of the breed services and products and has incubated many ideas to help translate them to reality. Our clients range from large enterprises, government agencies, not-for-profit organizations to promising new startups. I write regularly in many technical journals and magazines, present in seminars and mentor developers and architects. I have authored a few books, including Advanced Flex 3 (friends of Ed/APress, 2008) and Professional BlazeDS (Wrox/Wiley, 2009) , and am in the process of authoring a few more. You can learn all about my books and public talks by browsing through the Publish & Present page at www.shanky.org.

@ThingsExpo Stories
SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/.
SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc.
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
While some developers care passionately about how data centers and clouds are architected, for most, it is only the end result that matters. To the majority of companies, technology exists to solve a business problem, and only delivers value when it is solving that problem. 2017 brings the mainstream adoption of containers for production workloads. In his session at 21st Cloud Expo, Ben McCormack, VP of Operations at Evernote, will discuss how data centers of the future will be managed, how th...
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em...
SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
SYS-CON Events announced today that Suzuki Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Suzuki Inc. is a semiconductor-related business, including sales of consuming parts, parts repair, and maintenance for semiconductor manufacturing machines, etc. It is also a health care business providing experimental research for...
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...
In his session at @ThingsExpo, Greg Gorman is the Director, IoT Developer Ecosystem, Watson IoT, will provide a short tutorial on Node-RED, a Node.js-based programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette that can be deployed to its runtime in a single-click. There is a large library of contributed nodes that help so...
SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...
SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
Elon Musk is among the notable industry figures who worries about the power of AI to destroy rather than help society. Mark Zuckerberg, on the other hand, embraces all that is going on. AI is most powerful when deployed across the vast networks being built for Internets of Things in the manufacturing, transportation and logistics, retail, healthcare, government and other sectors. Is AI transforming IoT for the good or the bad? Do we need to worry about its potential destructive power? Or will we...
What is the best strategy for selecting the right offshore company for your business? In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers. Before you start your search, clearly understand your business needs and how that impacts software choices.
There is huge complexity in implementing a successful digital business that requires efficient on-premise and cloud back-end infrastructure, IT and Internet of Things (IoT) data, analytics, Machine Learning, Artificial Intelligence (AI) and Digital Applications. In the data center alone, there are physical and virtual infrastructures, multiple operating systems, multiple applications and new and emerging business and technological paradigms such as cloud computing and XaaS. And then there are pe...
Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...