Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes Can anyone advice some good tool that auto-generates EJBs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can anyone advice some good tool that auto-generates EJBs?" Watch "Can anyone advice some good tool that auto-generates EJBs?" New topic
Author

Can anyone advice some good tool that auto-generates EJBs?

Maxim Suponya
Greenhorn

Joined: Apr 26, 2003
Posts: 7
subj?
Thanks!
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
You need to give some more information, there are many tools the generate or help generate EJBs (with various degrees of automation). What exactly are you looking for?
Maxim Suponya
Greenhorn

Joined: Apr 26, 2003
Posts: 7
I need some magic tool that will create CMP bean 2.0 with all interfaces and descriptors according to specified database and table, and may be even session bean that will wrap entity bean! i can't beleive people are ready to write up to 10 different interfaces and classes, plus huge amount of XML just to access a database. Well, very probably i ask stupid questions, i'm new to EJB, only made 2 session and 1 entity beans in my life
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Well.. I think you have to write at least the bean class, because it is different for every application, and where your business logic resides. But, you are right, writing descriptors, interfaces is a pain.
I've been using XDocletand it's great. Again, just write the bean implementation and with some javadoc-like comments XDoclet will generate all the other files for you (ejb-jar.xml,web-xml,interfaces -remote,local,localhome, home,and more! -) etc...
HTH


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Middlegen, which is based off XDoclet, will do essentially what you are asking for. Basically, you point Middlegen to your database schema and it creates the persistance layer (including relationships) for you. Currently Middlegen supports CMP 2.0 and JDO as persistance layers.
Middlegen does a pretty good job. However, you will find yourself fighting the tool when you want to support complex object models.
Maxim Suponya
Greenhorn

Joined: Apr 26, 2003
Posts: 7
Thank you Andres and Chris!
XDoclet and Middlegen are really good tools! That's exacly what i need!
Parsuram panigrahi
Greenhorn

Joined: Feb 18, 2003
Posts: 17
You can use SUN ONE studio for the same.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can anyone advice some good tool that auto-generates EJBs?