Skip to main content

generating ejb with xdoclet 1.2.3

Generating EJBs with Xdoclet

Based on xdoclet 1.3

In this example I will create a simple HelloWorld stateless entitybean and create jboss and websphere deployment descriptors.

I used the following file structure:

.
|-- build-dist.properties
|-- build.xml
|-- etc
| |-- application.xml
| |-- jboss
| | `-- jndi.properties
| |-- merge
| | |-- jboss-service.ent
| | |-- jboss-webservices.ent
| | `-- weblogic-security-role-assignment.xml
| `-- websphere
| |-- deploy_helloworld.jacl
| |-- jndi.properties
| |-- was.properties
|-- lib
| |-- xdoclet-1.2.3.jar
| `-- all other xdoclet jars
|-- lib-samples
| |-- ejb.jar
| |-- jboss-j2ee.jar
| |-- jmxri.jar
| |-- jsf-api.jar
| |-- readme.txt
| |-- servlet.jar
| |-- struts-1.1-beta-2.jar
| |-- velocity-1.4-dev.jar
| `-- webwork.jar
|-- src
| `-- com
| `-- jankester
| `-- tryout
| |-- client
| | `-- HelloWorldEjb.java
| `-- ejb
| `-- session
| `-- HelloWorldBean.java

The lib directory contains the xdoclet libs, the lib-samples directory I used for some additional libraries. Further I made use of libs that are part of the websphere 6 installat
ion.

The most important files in this listing are build.xml, and HelloWorldBean.java. The HelloWorldEjb.java file is just a client file that will call the EJB.
The HelloWorldBean.java and build.xml are just adaptions of samples that come with the xdoclet 1.2.3.

Generating EJBs with Xdoclet

Based on xdoclet 1.3

In this example I will create a simple HelloWorld stateless entitybean and create jboss and websphere deployment descriptors.

I used the following file structure:

.
|-- build-dist.properties
|-- build.xml
|-- etc
| |-- application.xml
| |-- jboss
| | `-- jndi.properties
| |-- merge
| | |-- jboss-service.ent
| | |-- jboss-webservices.ent
| | `-- weblogic-security-role-assignment.xml
| `-- websphere
| |-- deploy_helloworld.jacl
| |-- jndi.properties
| |-- was.properties
|-- lib
| |-- xdoclet-1.2.3.jar
| `-- all other xdoclet jars
|-- lib-samples
| |-- ejb.jar
| |-- jboss-j2ee.jar
| |-- jmxri.jar
| |-- jsf-api.jar
| |-- readme.txt
| |-- servlet.jar
| |-- struts-1.1-beta-2.jar
| |-- velocity-1.4-dev.jar
| `-- webwork.jar
|-- src
| `-- com
| `-- jankester
| `-- tryout
| |-- client
| | `-- HelloWorldEjb.java
| `-- ejb
| `-- session
| `-- HelloWorldBean.java

The lib directory contains the xdoclet libs, the lib-samples directory I used for some additional libraries. Further I made use of libs that are part of the websphere 6 installat
ion.

The most important files in this listing are build.xml, and HelloWorldBean.java. The HelloWorldEjb.java file is just a client file that will call the EJB.
The HelloWorldBean.java and build.xml are just adaptions of samples that come with the xdoclet 1.2.3.

Comments

Popular posts from this blog

SSL handshake failed: Secure connection truncated

Got this problem on Ubuntu 9.10 and 10.10. svn co --username=xx https:/yy zz “SSL handshake failed: Secure connection truncated” According to this link bug-ubuntu The solution is: sudo apt-get install libneon27 cd /usr/lib/ sudo rm libneon-gnutls.so.27 sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27

Junit4 running parallel junit classes

To run junit testcases parallel, you can create your own class to run junit with: Add this tag to your class declaration. @RunWith(Parallelized.class) Implementation of this class looks like: package mypackage; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.junit.runners.Parameterized; import org.junit.runners.model.RunnerScheduler; public class Parallelized extends Parameterized {         private static class ThreadPoolScheduler implements RunnerScheduler     {         private ExecutorService executor;                 public ThreadPoolScheduler()         {             String threads = System.getProperty("junit.parallel.threads", "16");    ...

Create a groovy console and bind to selenium

Required groovy files In the previous posting we defined the pom file that we need for our build environment. Now we will setup some groovy files to get selenium and groovy running interactively. ConsoleWaiter.groovy The idea of Groovy Console I found on some other sides. Honour goes for instance too: http://josefbetancourt.wordpress.com/tag/eclipse-2/ I copied some code of this, and put it under src/test/groovy/com/jankester/selenium/test/utils: package com.jankester.selenium.test.utils /** * File: ConsoleWaiter.groovy */ import groovy.lang.Binding; import groovy.ui.Console; /** * Provides a wrapper for the console. * * Based on source by John Green * Adapted from: http://www.oehive.org/files/ConsoleWaiter.groovy * Released under the Eclipse Public License * http://www.eclipse.org/legal/epl-v10.html * * I added methods to allow use from Java. * * The run() method launches the console and causes this thread * to sleep until the console's window is closed....