Skip to main content

Posts

Showing posts from November, 2005

deployment of ejb under jboss

Jboss deployment of HelloWorld EJB example Deployment under jboss is relatively simple: pack classes and deployment descriptors in jar create ear copy ear into deploy directory of jboss Then to run the client: create client java file that calls util class of HelloWorld ejb example create client jar with proper jndi.properties call client To create the jar/ear we need to add the following to our build.xml file: <!-- =================================================================== --> <!-- Deployment --> <!-- =================================================================== --> <target name="jar" depends="compile">     <mkdir dir="${samples.jar.dir}" />     <jar jarfile="${samples.jar.dir}/ejb-hello.jar">     <fileset dir="${samples.classes.dir}" includes="**" excludes="**/client/*

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

Testing jms client connections to sun8

Here I had the problem that I did not know whether my jms on sun8 application server was properly configured. This is what to do to call a queue defined in sun8, send a message and receive a message. I used an example from sun java tutorial SimpleProducer.java and SimpleSynchConsumer. import javax.jms.*; import javax.naming.*; import java.util.Properties; public class SimpleProducer { /** * Main method. * * @param args the destination used by the example * and, optionally, the number of * messages to send */ public static void main(String[] args) { final int NUM_MSGS; if ((args.length <> 2)) { System.out.println("Program takes one or two arguments: " + " [ ]"); System.exit(1); } String destName = new String(args[0]); System.out.println("Destination name is " + destName); if (args.length == 2) { NUM_MSGS = (new Int

Compiling with jdk1.3.1

Recently I tried to build a project under Suse 9.3 with jdk1.3.1. Normally I use 1.4.2, and all went well. However when I set my java to jdk1.3.1 and start up the compile, I get the following error: [javac] Compiling 1634 source files to /home/jan/workspace/release/build.bak/xxxx/build/classes [javac] error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null, null, null I found out that it was while the original charset of the files was different as the locale of my current shell. The command locale shows: LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" .. When I made an explicit `export LANG=en_US.ISO-8859-1` I could run my compile again. Strangely, jdk1.4 does not suffer from this problem. To change my environment to jdk1.3.1 and another ant, I use a source script change-java-ant-1_3_1.source: export JAVA_HOME=/usr/local/jdk1.3.1_16 export ANT_HOME=/usr/local/apache-ant-1.6.3 export PATH=$JAVA_HOME/bin:$PATH ex

Websphere 6 on Linux

Yesterday I started with the installation of websphere on Linux, Suse 9.3. I downloaded was.cd.6000.trial.base.linux.ia32.tar.gz from the ibm website, and unpacked it. As logged in user, I issued a xhost + command. Then as root, I ran WAS/install to start the installation. I chose defaults, and a full installation, which installs under /opt/IBM/WebSphere/AppServer/. At the end of the installation, the install program asks to run firststeps. I started that, and asked to check the installation. This check succeeded, amongst it also started the AppServer. The links of Sample Gallery and AdminConsole however did not work. Probably it is not capable of starting up a webbrowser by itself. So, I just stopped the AppServer again from the firststeps, and finished the installation. The server can be started now as root from /opt/IBM/WebSphere/AppServer/ : bin/startServer.sh server1 and stopped again with bin/stopServer.sh server1 You can see that the server is running with the command