• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

How to build all POJOs in one action

 
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Javaranch..

I have 5 POJOs and i want to build them in one execution.
What tool must i have?

Thanks
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All you need is a Java compiler and programming skill.
 
Fandy Akhmad
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean that 5 POJOs is automatically build and become a tables in database.
May be need some tool for build that POJOs
 
Ranch Hand
Posts: 110
Google Web Toolkit Java Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is: what you meant with "action"?

Is this a struts action? If so, which struts feature are you using (or any other library you're using) to serialize objects in requests and responses?

If you're going to take your application to this level, I would advise you move to other framework: http://vraptor.caelum.com.br/ with @Consumes( "application/json"). But if you have a lot of code already written using struts, try to find something that allow you serialize JSON objects into the action context and you'll be able to get them already serialized. Something like this http://code.google.com/p/jsonplugin/.

Anyway, consider frameworks like these: VRaptor, RESTEasy, etc, they are more evolved in the "Java web development way of thinking," nothing against Struts but I've been seeing extremely good changes while using http-based technologies! REST with some powerful IoC container behind.

I hope this helps!
 
Bartender
Posts: 4101
63
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Fandy Akhmad wrote:I mean that 5 POJOs is automatically build and become a tables in database.


You need to automate the schema creation? And you may need to provide clear information about what you are trying to accomplish. Please read TellTheDetails.
 
Jayr Motta
Ranch Hand
Posts: 110
Google Web Toolkit Java Google App Engine
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For DDL automatic generation you may use JPA annotations and some persistence provider with this feature enabled.
 
Fandy Akhmad
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for my unclear post.

I want to generate table use Apache Ant. I know it must use build.xml file.
How the structure of build.xml file?
 
Vijitha Kumara
Bartender
Posts: 4101
63
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Fandy Akhmad wrote:...How the structure of build.xml file?


I suggest you start with the simple Ant guide provided in the manual itself here.
 
Fandy Akhmad
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your suggestion.
 
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!