No clue on how to deploy a simple EJB

Dear experts,

I finished installing J2EE 1.5 with JDK ,compiled three classes.

Calculator.java

CalculatorHome.java

CalculatorEJB.java

Calculator.java

coding is as under:

import javax.ejb.EJBObject;

import java.rmi.RemoteException;

publicinterface Calculatorextends EJBObject

{

publicdouble dollarToRs(double dollars)throws RemoteException;

}

CalculatorHome.java

[CODE]

import java.io.Serializable;

import java.rmi.RemoteException;

import javax.ejb.CreateException;

import javax.ejb.EJBHome;

public interface CalculatorHome extends EJBHome

{

Calculator create() throws RemoteException,CreateException;

}

[/CODE]

CalculatorEJB.java

import java.rmi.RemoteException;

import javax.ejb.SessionBean;

import javax.ejb.SessionContext;

publicclass CalculatorEJBimplements SessionBean

{

publicdouble dollarToRs(double dollars)

{

return dollars*47.20;

}

public CalculatorEJB()

{

}

publicvoid ejbCreate(){}

publicvoid ejbRemove(){}

publicvoid ejbActivate(){}

publicvoid ejbPassivate(){}

publicvoid setSessionContext(SessionContext ct){}

}

I compiled all to respective classes.Now i am stuck how to create .ear

file or how to deploy using asant or any means.Previously i used

J2EE 1.3.Plz guide.

[2938 byte] By [Adi1000a] at [2007-11-27 11:06:14]
# 1

> Plz guide.

RTFM. If you've RTFM, please post the part of TFM that describes how to deploy an EJB that you didn't understand.

~

yawmarka at 2007-7-29 13:13:57 > top of Java-index,Java Essentials,Java Programming...
# 2

I clicked on link Packaging and deploying application and i get this

Before applications can be deployed, they must be packaged into Java ARchive (JAR), Web ARchive (WAR), or Enterprise ARchive (EAR) files. The packaged application includes deployment descriptors, which give the Application Server software the information it needs to load the application, map a URL to it, and connect it to the resources it uses. This section describes the following techniques for packaging and deploying applications

Now if i dont know the guidelines to generate jar.If i assume .war is with me then how ?,Same with .ear.What about deployment descriptor.

No mechanisms explained.

Adi1000a at 2007-7-29 13:13:57 > top of Java-index,Java Essentials,Java Programming...
# 3

No uniformity with previous versions has been maintained.A person who learnt java 3 yrs ago should better forsake if he looks a particular subject after say 2 yrs.Why Sun microsystems cant give a perfect product once and for all rather than giving updates or changing new versionsor provding things like NetBeans.No body knows what to study and what to ignore to achieve a task.

Rather to achieve a tasks 10 methods are placed forward.Which one is optimum,we have to dig and explore and then there are 10 different opinions to create further chaos and confusions.

Adi1000a at 2007-7-29 13:13:57 > top of Java-index,Java Essentials,Java Programming...
# 4

1. You have to have the appropriate configuration files to create an enterprise application for your application server. Information on this can be found in the documentation for your application server. It will most likely be mostly identical to every other application server.

You will likely need [ejb-jar.xml and (your application server)-ejb-jar.xml] at a minimum.

These and the code need to be built into an enterprise archive (ear)

The created ear file needs to be deployed to your application server.

My recommendation is to use ANT to do the build because it makes the process repeatable.

PS.

puckstopper31a at 2007-7-29 13:13:57 > top of Java-index,Java Essentials,Java Programming...