Sabado, Mayo 30, 2015

How to set up Eclipse IDE (Mars)

Download The Installer

Go to  http://www.eclipse.org/downloads/index-developer-default.php to download the latest version of Eclipse IDE. Depending on your O/S, there are versions for 32-bit or 64-bit Windows and Linux.




 










After downloading, extract the .zip file to a desidered folder






Double click on 'eclipse.exe'




The Eclipse full IDE

How To Install JBoss AS EJB Container



I first encountered EJB (Enterprise Java Bean) way back 1999. The EJB specification was originally developed in 1997 by IBM and later adopted by Sun Microsystems (EJB 1.0 and 1.1) in 1999 and enhanced under the Java Community Process as JSR 19 (EJB 2.0), JSR 153 (EJB 2.1), JSR 220 (EJB 3.0), JSR 318 (EJB 3.1) and JSR 345 (EJB 3.2).

The EJB specification intends to provide a standard way to implement the server-side (also called "back-end") 'business' software typically found in enterprise applications (as opposed to 'front-end' user interface software). Such machine code addresses the same types of problems, and solutions to these problems are often repeatedly re-implemented by programmers. Enterprise Java Beans is intended to handle such common concerns as persistence, transactional integrity, and security in a standard way, leaving programmers free to concentrate on the particular parts of the enterprise software at hand. Since then, I fell in love with this technology. Whatever critics might say, I am fascinated with EJB since it's very much that "complicated".

But before BLOGGING (or bragging ?), about this EJB thing, let me start by installing the EJB container. We used to practice with EJBs using NetBeans, but it's very much like a "College project", so I prefer JBoss instead.
Red Hat® JBoss® Web Server is a fully-integrated and certified set of components for hosting of Java™ web applications. It combines the world’s most deployed web server (Apache™ HTTP Server), the top servlet engine (Apache™ Tomcat), load balancers (mod_jk and mod_cluster), and the Tomcat Native library, with the best support in middleware. JBoss Web Server simplifies the use of popular open source software by providing stable, enterprise-class versions of Apache software that is backed with long-term enterprise product life-cycles.

JBoss AS 7, was released on July 12, 2011, only six months after the last major release, JBoss AS 6. Unlike previous increments of the major versioning number, JBoss AS 7 supports the same Java EE specification as the last major release, namely Java EE 6. The Java EE profile is only partially implemented in JBoss AS 7, e.g. it includes MDBs, but listening to JMS destinations (which is mandated by the full spec) is not supported. It is, however, certified for the Web Profile. The software code has been completely rewritten for JBoss AS 7. Major changes visible to the user are the inability to define resources like JMS destinations and datasources inside archives (war/ear), the way datasources are defined, a much smaller size (less than half of JBoss AS 6) and a 10-fold reduction in startup time. JBoss AS 7.1, was released in February 2012. The remaining parts of the EE spec were implemented, and this version was certified for the EE full profile.

Download The Version You Want (I'm Using JBoss AS7.1.1.Final) 

Go to http://jbossas.jboss.org/downloads/ 


Expand the .zip file to a director, say C:\ and you should see the file hierarchy similar to the one shown below:

But before anything alse, go to Control Panel -> System and Security -> System -> Advanced system settings, then click on Environment Variables. On User variables area, click on New.. then add a variable named JBOSS_HOME with your installation folder as 'Variable value'. If you're running LINUX, you don't have to do any stupid configuration thing. Everything's done for you automatically

























Running JBoss

Run cmd and go to your installation folder\bin:

The JBoss AS v. 7 upward runs on profile modes, by default, it uses the standalone.xml profile mode. The difference are the following:
  • standalone.xml: Support of Java EE Web-Profile plus some extensions like RESTFul Web Services and support for EJB3 remote invocations
  • standalone-full.xml: Support of Java EE Full-Profile and all server capabilities without clustering
  • standalone-ha.xml: Default profile with clustering capabilities
  • standalone-full-ha.xml: Full profile with clustering capabilities

Let us try to run the JBoss Server using the standalone-full.xml profile, issue the following command on the CLI 'standalone --server-config=standalone-full.xml':





The AS Server will start and in the end, you should see the following:





To check if your Server is working properly, open a browser and go to 'http://localhost:8080' and you should see the welcome page for the JBoss AS 7 Server. CONGRATS !!


How to setup Eclipse IDE