It will scan the directiory(ies) for hbm.xml files and read them the same way as if you had explicitly listed them. I don't think performance is an issue.
Type: Posts; User: gregd; Keyword(s):
It will scan the directiory(ies) for hbm.xml files and read them the same way as if you had explicitly listed them. I don't think performance is an issue.
Whenever you declare a BigDecimal, initialize it like this:
private BigDecimal amount = new BigDecimal("0.00");
and rerun your test.
Nothing to do with the 0 you pass.
It's just that you call it with an int parameter
BigDecimal
public BigDecimal(int val)
Translates an int into a BigDecimal. The scale of the BigDecimal...
I guess the problem is in your java code and not the db columns.
Since the only code sample you give is the field declaration I only can say that the following line
initializes a BigDecimal...
Remove completely <mapping resource...> form your set-up
When you use mappingDirectoryLocations in LocalSessionFactoryBean you don't need to specify any other resources explicitly.
The...
I came across the same issue recently when upgrading Hibernate and found this problem with javassist.
Using instanceOf solves the problem, however it breaks the symmetry contract of the method: ...
MappingResources can only receive paths relative to your classpath.
MappingDirectoryLocations, MappingLocations etc (see LocalSessionFactoryBean javadoc) receive parameters of type Resource. You...
Try this :
In your session factory configuration set
<property name="mappingDirectoryLocations">
<list>
<value>/conf</value>
</list>
I think another question you should ask yourself is "why is the other process locks data? Is there a good reason for doing this, and if not can I lower the isolation level of the other transaction...
I mean conceptually, it must be unique. Even if your primary key is another field, the user authenticates with the username. This is the "key" the framework uses to decide which user is requesting...
@Luke
I checked it again and you are right, there is no side-effect.
But long ago -possibly in the Acegi years- I came accross the following issue:
In an intranet app, there was an...
I have to make a point on this.
I feel that one should use this method only for authentication purposes.
I tried some time ago to use it to check for duplicate usernames as well when registering...
You checked which jar file?
In spring 3 the whole jar structure has been re-organized. There is no all-in-one spring.jar as before. You have to pick what you need.
DataAccessException is in...
When using "select" in HQL, hibernate considers it a projection query and your find method returns a List of Object[] not of User objects. Your jsp then uses the dot notation on an array.
You need
<form:errors path="name"/> to display the error messages
see http://forum.springsource.org/showthread.php?t=85696
A simple approach is to prefix all controller-handled urls under a path element which is not related to any directory structure e.g. "services"
(instead of "oap" which part of your webapp...
Since you are a starter keep in mind that all old-style controllers are now deprecated in spring 3 in favor of the new annotated controllers. In fact BaseCommandController and all inheriting from it...
In some cases Spring can configure the underlying layer for better performance when a transaction is declared as read-only. When you use Hibernate for example, it sets the flush mode to FLUSH_NEVER...
There is an improvement request in jira regarding this -but with low priority. Seems to be added in 3.1.
http://jira.springframework.org/browse/SPR-5025
Ah, you are using JPA, so you are right, select is not optional like HQL.
Check to see what your find method returns. I guess it is a list of Object[]. In that case your get(0) returns an array...
Remove "SELECT s" from your query.
Have you considered using a manual flush in the hibernate session just after the first deletion? This overrides the write-behind behaviour that hibernate applies.
Yes and no. In fact to check your case I changed this mapping:
<prop key="manager/admin/hotel/report/users">userListController</prop>
to
<prop...
They are definitely still supported. I'm also in spring 3 and have no issue on this. Are you sure you have not misspelled something on the mappings?