Welcome!

Java IoT Authors: Stackify Blog, Nitin Donde, Elizabeth White, Liz McMillan, Kevin Benedict

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
"We are focused on SAP running in the clouds, to make this super easy because we believe in the tremendous value of those powerful worlds - SAP and the cloud," explained Frank Stienhans, CTO of Ocean9, Inc., in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We've been engaging with a lot of customers including Panasonic, we've been involved with Cisco and now we're working with the U.S. government - the Department of Homeland Security," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution and join Akvelon expert and IoT industry leader, Sergey Grebnov, in his session at @ThingsExpo, for an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.
The financial services market is one of the most data-driven industries in the world, yet it’s bogged down by legacy CPU technologies that simply can’t keep up with the task of querying and visualizing billions of records. In his session at 20th Cloud Expo, Karthik Lalithraj, a Principal Solutions Architect at Kinetica, discussed how the advent of advanced in-database analytics on the GPU makes it possible to run sophisticated data science workloads on the same database that is housing the rich...
IoT is at the core or many Digital Transformation initiatives with the goal of re-inventing a company's business model. We all agree that collecting relevant IoT data will result in massive amounts of data needing to be stored. However, with the rapid development of IoT devices and ongoing business model transformation, we are not able to predict the volume and growth of IoT data. And with the lack of IoT history, traditional methods of IT and infrastructure planning based on the past do not app...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, will examine the regulations and provide insight on how it affects technology, challenges the established rules and will usher in new levels of diligence...
DX World EXPO, LLC., a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
In the enterprise today, connected IoT devices are everywhere – both inside and outside corporate environments. The need to identify, manage, control and secure a quickly growing web of connections and outside devices is making the already challenging task of security even more important, and onerous. In his session at @ThingsExpo, Rich Boyer, CISO and Chief Architect for Security at NTT i3, discussed new ways of thinking and the approaches needed to address the emerging challenges of security i...
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...
What sort of WebRTC based applications can we expect to see over the next year and beyond? One way to predict development trends is to see what sorts of applications startups are building. In his session at @ThingsExpo, Arin Sime, founder of WebRTC.ventures, discussed the current and likely future trends in WebRTC application development based on real requests for custom applications from real customers, as well as other public sources of information.
"The Striim platform is a full end-to-end streaming integration and analytics platform that is middleware that covers a lot of different use cases," explained Steve Wilkes, Founder and CTO at Striim, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
SYS-CON Events announced today that Calligo, an innovative cloud service provider offering mid-sized companies the highest levels of data privacy and security, 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. Calligo offers unparalleled application performance guarantees, commercial flexibility and a personalised support service from its globally located cloud plat...
SYS-CON Events announced today that Massive Networks 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. Massive Networks mission is simple. To help your business operate seamlessly with fast, reliable, and secure internet and network solutions. Improve your customer's experience with outstanding connections to your cloud.
SYS-CON Events announced today that DXWorldExpo has been named “Global 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. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, 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. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
While the focus and objectives of IoT initiatives are many and diverse, they all share a few common attributes, and one of those is the network. Commonly, that network includes the Internet, over which there isn't any real control for performance and availability. Or is there? The current state of the art for Big Data analytics, as applied to network telemetry, offers new opportunities for improving and assuring operational integrity. In his session at @ThingsExpo, Jim Frey, Vice President of S...
"DX encompasses the continuing technology revolution, and is addressing society's most important issues throughout the entire $78 trillion 21st-century global economy," said Roger Strukhoff, Conference Chair. "DX World Expo has organized these issues along 10 tracks with more than 150 of the world's top speakers coming to Istanbul to help change the world."
"We provide IoT solutions. We provide the most compatible solutions for many applications. Our solutions are industry agnostic and also protocol agnostic," explained Richard Han, Head of Sales and Marketing and Engineering at Systena America, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"MobiDev is a Ukraine-based software development company. We do mobile development, and we're specialists in that. But we do full stack software development for entrepreneurs, for emerging companies, and for enterprise ventures," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
SYS-CON Events announced today that DXWorldExpo has been named “Global 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. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.