• Post Reply Bookmark Topic Watch Topic
  • New Topic

XDoclet & Session beans  RSS feed

 
Jason Kiefer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I am having trouble generating Session bean interfaces (local/home/DD) using xdoclet when reliant classes (Classes required for compilation) are not on the classpath.
Session bean interfaces are created as advertised whenever I add reliant classes to the classpath in ant.
I am though able to create CMP bean interfaces (local, home, DD) successfully without the reliant classes on the classpath, just not with session beans (even in the same run!).
Am I missing something? Any Ideas?
xdoclet: 1.23b
ant: 1.5.3
java: 1.4.1_03
 
Jason Kiefer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, so I went the the xdoclet source code, and found the answer to my own question.
It seems that Xdoclet figures out which output source files to create (localhome, local, etc) by looking at the superclass/interface of the input file. ie, if your bean implements the SessionBean interface, it knows not to create a primary key, but will create local, local home, home, etc . . .
Anyway, my Session beans do not implement SessionBean. They instead extend another class, which implements SessionBean. When my other class was not on my classpath, xdoclet couldn't resolve that it truely was a session bean, and therefore did not process it.
The soloution? Well, you could always add the type of the superclass to the subtask classes in the xdoclet code (not sure if it's configurable outside the source?), but I just implemented SessionBean in my child class.
-Jason
 
Jason Kiefer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a better solution. Just use the ofType attribute in the *Interface nested elements to add your own types.
-Jason
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!