Installation and Configuration
Before you start
If your updating from an older version, REMEMBER to backup any old server definitions (plugins/com.objectlearn.jdt.j2ee/servers folder) that you may have.
If you have beeen using lomboz prior to v2.1, you must prepare your workspace to load the new version. BEFORE STARTING YOU MUST REMOVE EXISTING VERSIONS.
After installing Eclipse (but before unzipping the Lomboz plugin), be sure to start up Eclipse to complete the installation process.
After you start eclipse, visit the Java preferences and edit your classpath variables, making sure that they are all correct. To do this, on the Eclipse menu bar, select Window -> Preferences, then open the "Java" node and highlight the "Classpath Variables" node in the tree on the left side of the dialog. Be sure to remove classpath variables that may appear to be incorrect.
Shut down Eclipse before starting an eclipse or Lombozinstallation.
Java Installation
A common installation problem is the lack of suitable Java Software Development Kit (JSDK). In order to develop and compile Java programs, you will need a java version 1.4 or above JDK. It is quite common for eclipse to pickup a Java Runtime Environment (JRE), before a JDK. In this case you are likely to experience problems. JRE is not a substitute for JSDK. You can download the latest JSDK from Java Web Site. After the installation of JSDK, you can verify that you have done it correctly; you should have a directory with the following contents:
Software requirements
Software | |
JDK | You will need a JDK version 1.4.x or above (tested with 1.4.0) |
Application Servers | Allmost all Java application servers that are able to run in a J2SE 1.3 or 1.4 VM. Lomboz comes with predefined configurations for various application servers. New server configurations can also be defined easily. |
Eclipse | Lomboz is supported for Eclipse 2.1.x and Eclipse 3.x SDKs or later. |
Other Eclipse Projects | Lomboz v3.0 uses models based on eclipse EMF project. If you do not have it installed already, You will need to download and install EMF runtime builds release 2.0.0 or later. EMF MUST BE INSTALLED PRIOR TO USING LOMBOZ. |
Installation
You must download Lomboz Plugin from www.objectlearn.com. Make sure that you are running eclipse for the next step. It it is open, quit eclipse.
The plugin is distributed in ZIP format, therefore, using your ZIP file utility, unzip lomboz.zip file into the <Eclipse_Home> directory. This will create a set of new plugin directories as follows.
Now you can start eclipse to complete your installation and configure Lomboz. YOU MUST COMPLETE THE CONFIGURATION STEP.
Plugin Activation
Once installed, Lomboz plugin must be activated. Lomboz currently adds actions, wizards and views to the Eclipse environments. To activate these add-ons:
Select menu ‘Window>Customize Perspective...’, in the Shortcuts tab choose 'Submenus: New'
check all Lomboz related items.
Select menu Window>Customize Perspective...', in the Shortcuts tab choose 'Submenus: Show View'
check ‘Lomboz Views', J2EE View.
Select menu Window>Customize Perspective...', in the Commands tab in the availabe commands tab, check Lomboz Actions.
Select menu Window>Preferences', in the Workbench->Label Decorations, check Lomboz J2EE Decorators.
Once you confirmed your selections, you will see the newly added Toolbar button:
and the new the new wizards will be available to you from the New project dialog and the quickly accessible New Items menu.
| |
Configuring JDT and Lomboz
You must complete the following minimum configurations before you can start using Lomboz as your J2EE development tool.
Step I – Java
First you must make sure that Java projects have separate source and binary folders. Open the preferences dialog from Workbench -Preferences menu and Expand the Java item, New Project. Make sure that the ‘Use folders for source and output location as default for newly created Java projects’ check box is ticked. Finally enter ‘src’ and ‘bin’ for the names of these folders, which are the defaults. Please do not modify these names as they are required by some of the Lomboz tasks.
Step II – Global Settings
Most application servers use the standard Java compiler (javac) to compile JSP files. Javac is found in the tools.jar distributed with standard Java JDKs (NOT JREs).
You must select the tools.jar that will be used by the application servers here. It is normally found inside the “lib” folder under the JDK installation.
Enable JSP Syntax checking enables or disables JSP compilation. This is useful if you have very large JSP files and you do not want to check the syntax everytime you save the file. By default it is enabled. If you disable it Lomboz will not perform any syntax checking and you will not get any feedback about the potential problems in JSP files.
Server restart is useful if your application server does not automatically reload a web/ejb module after it has been reployed. If this option is enabled, Lomboz will restart the server after a module is redeployed. This option maybe useful if you are working with Tomcat.
Update server classpath and deployment parameters tells Lomboz to check and fix the Project classpath and deployment properties of a selected module everytime you Launch the targeted server of an ejb or web module. This is very useful if you make a change to the server definition after you create the module. By default it is enabled. If you disable this option, you have to make sure that you fix the project classpath and deployment properties everytime you make such changes.
Select Code Generation Plugin Lomboz release 3 supports extensible code generation plugins. In this page you can choose the Plugin that will be used to generate EJB code and annotations using Lomboz. Lomboz provides a default plugin named "XDoclet", that uses xdoclet based code generation.
IMPORTANT:
Use application server classpath, tell Lomboz to use the classpath that you will define in the next step when it launches an application server. It will NOT use the classpath of the Java Projects you will create. If you do not enable this feature, Lomboz will use the classpth of the Java project to launch a server. The disadvantage of this will be that all edployde web and ejb modules will appear twice on the classpath: Once from the eclipse java project and once from the ejb jar or web .war. This can cause unexpected class loader problems. If you are experiencing these problems make sure that you enable this feature.
The reverse side of the coin is you will loose your acapability for dynamically modifying your Java code in a debugger (JDK 1.4 feature).
Some application servers are more sophisticated about how they manage class loaders and they will allow you to use the project classpath, however most will not (i.e. JBoss, Tomcat, etc.)
Step III – Server Definitions
Lomboz can work with almost all Java application servers. You will have to set these parameters so that Lomboz can create scripts which point to the right places. The parameters you set here are used for setting default values for launching the servers and finding the location for deploying Web applications (.war files) and EJB jar files.
One of the major changes in v2.1 is how Lomboz handles application server definitions. This was done in order to allow people to enter their own server definitions other than those servers that are packaged with Lomboz.
These files are stored in a folder named "servers" inside the plugin. Lomboz scans the folder everytime it needs a definition. Adding a new server type is adding one of these files into this folder.
In order to use(activate) any of these definitions you must ALWAYS visit the Lomboz preferences. This will load the files in the servers folder into eclipse.
Next task is to check and set the properties and classpaths defined for these servers.
Although there are predefined values for these properties, it is most likely that they are incorrect for your configuration.
IT IS VERY IMPORTANT THAT YOU CLICK APPLY after you make any changes. Your changes will be taken into account only after this.
If your server is not in this list:
The list of servers are obtained from the contents of a folder named server under the <Eclipse_Home> directory plugin directory named com.objectlearn.jdt.j2ee. The list of properties that you are asked to enter are defined in the files that can be found there. If you have an application server that is not listed, just add your own server definition into this folder. Existing files should provide you with plenty of examples. For more information read the section on "Adding your own server".
Properties page
To change the properties open the preferences dialog from Workbench -Preferences menu and highlight the Lomboz server definitions item in the list. You must enter the following parameters:
Classpath variables:
In order for Lomboz to find the proper application server classes without hard coding them into Java projects we use classpath variables. These class variables are automatically added into the Eclipse environment each time you apply these properties.
To verify that these variables are set, open the preferences dialog from Workbench -Preferences menu and Expand the Java item first highlight the ‘Classpath Variables’ item under the Java list. You SHOULD SEE the values such as ‘WEBLOGIC700’, ‘JBOSS300’ and ‘TOMCAT410’ etc, which will point to the application server directories.
All server definitions have these variables. You can now choose a name for the classpath variable you would like to use and set the path for this variable. These settings will be used to add a classpath variable, which you can verify by looking at the Java classpath variables page as described above. The jar files and libraries you will chose in the next few steps will be relative to this classpath variable.
Classpath variable name | The name of the classpath variable that will be used to refer to the library files |
Classpath variable | The path that will be used to store the variable above. Libraries will be relative to this path. |
BEA WebLogic Server:
Parameter | Description |
Application Server Directory | The path to the application server installation directory |
BEA Home Directory | The path to the directory where license files can be located (i.e. license.bea) |
Admin Domain Name | The name of the administrative domain |
Admin Domain Directory | The path to the administrative domain that will be used to get application server configurations (must contain the config.xml file). Used for launching and deploying (domain) |
Server Name | The server that will be launched |
User | The user id required to launch the server |
Password | The password required to launch the server |
Tomcat:
Parameter | Description |
Server Home Directory | The path to the application server installation directory |
JBOSS:
Parameter | Description |
Server Home Directory | The path to the application server installation directory |
Important: Click Apply. This will define the classpath variables before you proceed to the next stage.
Classpath page
The next step is to choose the java libraries that are required to launch this application server. Classpath variables that we have set in the previous section will be used here. Server classpath ise used to launch the application server, where the Client path is used for the client applications (i.e. Ejb Test Clients). You can add or remove libraries from these lists. At the end remember to click Apply.
Step IV – Verifying Classpath Variables
To verify that these variables are set, open the preferences dialog from Workbench -Preferences menu and Expand the Java item first highlight the ‘Classpath Variables’ item under the Java list. You SHOULD SEE the values such as ‘WEBLOGIC700’, ‘JBOSS300’ and ‘TOMCAT410’ etc, which will point to the application server directories.
Step V – XDoclet Software Configuration for EJB development
- XDoclet only runs on Java 2 JDKs, older JDKs are not supported.
- Make sure tools.jar from JDK's lib directory is in your classpath.
- Make sure JDK's bin directory is in path (needed for invoking javadoc.exe). This must be done before starting Eclipse.
The installation and configuration is now complete!