Skip to main content
11 events
when toggle format what by license comment
Apr 5, 2017 at 2:14 comment added mancini0 Check out Spring-Data-JPA though! Annotate a pojo into an entity, implement an interface and define method signatures using reasonable names, such as findHammerByWeight(), and spring implements the methods for you, giving you an injectable repository you can use in all of your other business service or controller classes.
Jul 2, 2015 at 7:26 comment added user2727195 +1 for this answer, to address the above comment, man use your own light weight design patterns (GOF), singleton for connection pooling, a proxy class that provides sql (string) and values (array) to the Database Object (which method, depends on http method), the dbobject handles connection pooling, transactions etc. executing query followed by release. One object use in all modules, no one needs excessive boiler plate code. bonus point with setting unit tests on proxy class and dbobject.
Oct 21, 2012 at 13:18 comment added NimChimpsky that code is simple, but where is your transcation handling defined and how do you test it ? Both things are made simpler by spring. Also, you java code is directly tied to a db connection, unless you store connection urls and passwords externally,this is also made simpler by spring.
Oct 20, 2012 at 18:54 history edited ChrisF CC BY-SA 3.0
formatting
Oct 19, 2012 at 20:47 review Late answers
Oct 20, 2012 at 18:54
Jun 26, 2012 at 16:39 history edited Uma CC BY-SA 3.0
added 351 characters in body
Jun 15, 2012 at 11:37 history edited gnat CC BY-SA 3.0
spelling, formatting, personal stuff cleanup
Jun 15, 2012 at 11:12 history edited Uma CC BY-SA 3.0
added 389 characters in body
Jun 15, 2012 at 11:06 history edited Uma CC BY-SA 3.0
added 389 characters in body
Jun 15, 2012 at 9:20 history edited Uma CC BY-SA 3.0
added 68 characters in body
Jun 15, 2012 at 9:04 history answered Uma CC BY-SA 3.0