newbean [beanName] [beanType] [package] [primkey]
The newbean utility helps the bean writer to start developing a bean by generating skeletons for all the necessary files to make a bean. Note that this tool only create templates of the files. You need anyway to customize them and to write your business logic. However, the files should be compilable.You can just type newbean or supply 1, 2, 3, or all parameters. In case of missing parameters, an interactive mode helps to supply them.
After running newbean on each bean of your package, you must make a Makefile by joining all the ".mk" generated files.
The beanName is a name that must start with a capital letter. Avoid the reserved names: Home, EJB, Session, Entity. It will be used as prefix for all filenames relative to the bean.
The beanType must be one of the following:
The package is a dot separated string representing the package to which the bean belongs. Usually this looks like the current directory.
- ec Entity with container managed persistence
- eb Entity with bean managed persistence
- sl Session bean Stateless
- sf Session bean Stateful
The primkey is the class representing the primary key. Only needed for entity beans. Possible values are:
- s java.lang.String
- i java.lang.Integer
- o Object (Will be chosen later)
newbean Person ec tests.beans.tel s
GenIC [Options] <InputFileName>
The GenIC utility generates the container classes that implementfrom the given Enterprise JavaBean(s) for JOnAS.
- the Enterprise JavaBean Home Interface and,
- the Enterprise JavaBean Remote Interface
The InputFileName is either the file name of a serialized deployment descriptor of a bean, or the file name of a ejb-jar file.
The GenIC utility :
- - firstly, generates the sources of the container classes,
- - secondly, compiles these classes by way of the java compiler, and
- - lastly , generates stubs and skeletons for those remote objects by way of the rmi compiler.
-d directory-keepgenerated
- Specifies the root directory of the class hierarchy.
- You can use this option to specify a destination directory for the generated files.
- If the -d option is not used, the package hierarchy of the target class is ignored, and the generated files are placed in the current directory.
-javacopts options
- Do not delete intermediate generated files.
-rmiopts options
- Specifies the options to pass to the java compiler.
-verbose
- Specifies the options to pass to the rmi compiler.
- Displays additional information about command execution.
GenIC -d . sb.jar
generates container classes of all the Entreprise JavaBeans included in the sb.jar file.
All the files of the sb.jar file are extracted to the current directory.
The container classes are saved in the root directory ./<package_dir>.
CLASSPATH
- must include the paths of the directories where the Enterprise Bean's classes may be found.