This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stub and Skeleton

 
Renata fonseca
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Component Interface, a bean class and a home interface for Session Bean.
I read that it's necessary to generate stub and skeleton. How can I generate these? The EJB Container automatically generates these for me?
 
Moorthi Ramasamy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run the following command to generate the stub & skeleton.
java weblogic.ejbc [options] <source directory or jar file><target directory or jar file>
 
Ryan Fernandes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Renata,
Yes, the contract with an EJB container is that it creates the stubs, skeletons and the concrete implementations of your classes.
Mr. Moorthy has given you an example of how you can do this manually, but for most EJB containers, this gets done when you deploy the bean.
Hope that helped,
Ryan
 
Renata fonseca
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks...
I've noticed that WSAD generates the STUBs and SKELETONs...
Maybe WSAD put some otimization inside these classes.
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Renata fonseca:
thanks...
I've noticed that WSAD generates the STUBs and SKELETONs...
Maybe WSAD put some otimization inside these classes.

There is the step ejbc which "compiles" the EJBs. By compile I don't mean the compilation that javac does. You still need to compile your home, remote & implementation classes of the EJB via javac. ejbc builds the stubs/skeletons and also validates the deployment descriptors. Each application server that provides the EJB container provides its ejbc (each app server has its own enhancements to the deployment descriptors: for example, for session beans weblogic requires weblogic-ejb-jar.xml in addition to ejb-jar.xml).
If you use an IDE, then it may do the ejbc for you. If not, then you will need to add this to the build script.
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WorldCitizen,
First, welcome to JavaRanch!
Second, unfortunately your name doesn't comply with our naming policy. Please change your display name to comply with it. Thanks in advance, and we look forward to seeing you around the Ranch.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic