John Grath

Greenhorn
+ Follow
since Sep 18, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by John Grath

I have used annotation as markers for my own pointcuts at method level. I would recommend declaring methods as point cut expressions instead as it is easy to forget to
annotate methods while developing.
12 years ago
Hi. This looks like an old post. Spring 2.5+ handles this rather well.
Like everything in Spring you need to learn it before it becomes easy. I think Aspects are very useful in Spring and worth learning.
Hi. I would recommend the Hibernate in Action by Christian Bauer and Gavin King. I refer to it all the time as it has the correct level of detail without going into too much detail.
Flush should write to the database. However, if your code is running in a transaction nothing will be committed to the database until the transaction performs a commit. This is correct behaviour.
On previous projects I have created a Spring managed JDBC service to execute stored procedures and run more complicated bespoke SQL. I find that this approach works best on larger projects.
Hi,

You should limit the size of what is being returned from the database. Try appending a "where clause" to the SQL and see if that works. You should not be reading 4m records!!

Regards,

John
Hey there,

You don�t need any experience at all of EJB. Although version 3.0 would be beneficial as it will shorten the learning curve.

John
Hey,

Most architectures which require changes from different data sources must either refresh the specific object from the database or turn the entire caching mechanism off. This is a common problem with both Toplink and Hibernate. Simple answer is to reload object you expect to be updated from external systems. Most enterprise systems require this.

John
Try using Eclipse. It's free, easy to use and the most commonly used editor in enterprise development.
I disagree with the DBA's decision. With modern database technologies, you should be able to maintain large data sets in a better way. Instead of shoe horning in a Hibernate solution I would just use JDBC. As simple as that. If you're not going to be able to persist using Hiberate in this case; why use it to read the data? In conjunction with Spring, transactions can be shared across Jdbc and other database tools.
If I understand your question correctly, you most certainly can. In Hibernate you must map the domains using an association. This will enable you to use the session.find or better still the Query object to return the values, i.e session.get(..) and that the objects will be contain references to each other.

An association can be performed using a idbag, set, map, bag for example. Toplink works differently though, where the 'container' maintains the references between objects.

Hope this helps.
No is the answer but the abstract class can have implemented static methods.
17 years ago
Remember, finally code is always executed regardless if an exception was throw n or not.
17 years ago
If a method only performs operations on non-instance field values it can and should be a static field candidate. Think about how many of the math methods are implemented.
17 years ago
There aren't really any books on just java collections, but have a look at www.java.sun.com where there is a good section on the collections framework and the new 1.5 language specific additions and updates.
17 years ago