Beginner: some questions
Hello all,
I am just a beginner for EJB, and writing a simple example of EJB. Some questions confuse me.
1.about server
I just use JDK1.3.1 and JSDKEE1.3, is it all right? Do I need another things, for instance, weblogic ( what is this?)?
2.about deployment
I wrote some code( CMP) include: home interface, remote interface, implement class, and primary key. Now , deploy it? Use C:\j2sdkee1.3\bin\deploytool command, is it?
I thought every EJB need a XML deployment descriptor, my question is: I write this by myself or use deploytool?
3.about datebase
I notice some example use Cloudscape, is this database? Whether can I use another database, for instance, MS Access? If I can, how to access it in CMP, and what is the Database JNDI Name ( if I use MS Access) when I deploy using deploytool?
4.about direction
if I finish coding, then compile, and deploy, now, is it OK? I mean, I should move some file to special direction? (I remember the .class file is placed in special direction when I use servlets. )(suppose: I work in C:\mybean. Every file in it)
5.I use JDK1.3.1 and JSDKEE1.3 to write a simple example, do I need anything else in order to achieve EJB?
Thanks
[1272 byte] By [
huimu] at [2007-9-26 4:01:05]

1. No you do not need anything other than J2SE 1.3.1 and J2EE SDK 1.3J2EE SDK 1.3 includes a reference implementation that you can use to do pretty much everything that is J2EE platform standard.
Products such as WebLogic, WebSphere are comercial implementations of J2EE platform specifications. And you would use them for commercial/production quality applications.
See http://java.sun.com/j2ee/faq.html Especially the questions about using reference implementation.
2. You as a developer write the deployment descriptor and the deployment engineer customizes it if required at deployment time.
3. You can use JDBC-ODB driver to work with Microsoft Access databse.
See http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html#996747
4. No. The files go to the right place at deploy time.
5. No. If you have J2SE 1.3.1 and J2EE SDK 1.3, you arealready on your way to achieving EJBs.
On the topic of building the descriptor, use the deploytool for that. It builds the deployment descriptor for you. I have used the tool a lot in courses I teach and it works just fine. The only thing I would suggest is if you are getting errors and you fix them and the tool still finds them, restart the tool. It does not seem to clean itself up real well.
I also use the deploy option from the tool to deploy out to my reference implementation server. There is also a Verify tool that checks your work for you before you attempt to deploy. The messages that come back at deployment time are not that helpful, but the messages from the verifier give better descriptions.
A suggestion...when I got started I was in the same boat as yourself. I used the tutorial that comes with the documentation. I didn't specifically do the tutorial, but I used it to be my guide on the say type of topics you are asking about.
Good luck