• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does EJB like a folder that contains many class files?

 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some questions about EJB
1: Does EJB like a folder that contains many class files?
2: What is the different between a JavaBean and EJB? (for major points)
thanks
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB is not a folder but is finally deployed as jar file. The jar file contians the EJB home,remote interfaces , the bean class and the deployment descriptor.
fOR DIFFERENCE between java bean and EJB
http://www.coderanch.com/t/307693/EJB-JEE/java/JavaBeans-vs-EJB
[Fixed URL link. CM]

Originally posted by siu chung man:
I have some questions about EJB
1: Does EJB like a folder that contains many class files?
2: What is the different between a JavaBean and EJB? (for major points)
thanks

[ August 12, 2003: Message edited by: Chris Mathews ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
 
Sergio Hui
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For you first question:
1: Does EJB like a folder that contains many class files?
Maybe you are new to Java World. The "folder" you see is the package name
i.e. You have a Java Bean called Hello.java
package com.hello;
public class Hello {
.....
}
Note package name "com.hello" your source file (Hello.java) should be located under /com/hello/Hello.java. The same apply for EJBs. Usually, you'll be only working with a "Bean" class. The others class/interface home, Remote, locateHome.... will be generated by an IDE tool. And they are all in the "folder"/package that you specified in your source code.
2: What is the different between a JavaBean and EJB? (for major points)
  • You can involve javabean instance directly, ie apple, JFC, or command line
  • You have to use JNDI service to look up for an EJB home object then work for them
  • You cannot directly involve, initiate a EJB instance. The EJB container (server) is required to manage, maintain the life cycle of Bean instances
  • You can directly involve, initiate java bean instance

  •  
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!