Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Daniel Matthews

Greenhorn
+ Follow
since Aug 17, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Daniel Matthews

Could anyone tell me if it is possible to avoid mapping application roles to users/groups at deployment time and possibly map them within a login module.

For example I have a requirement to authenticate against a db which I am using a custom user registry for. However I do not want to have to map every role in the system to a user or group within the container as this information is contained within the db.

Is there any way to define this mapping at login perhaps by adding principals representing the roles?

Any help would be much appreciated
11 years ago
I think you have just answered your own question "Object oriented real world model every chapter will have a test..." This is composition. Your "getTest" method is simply encapsulating your "test" member
12 years ago
static members belong to the class whereas non-static members belong to the object instance.
12 years ago
Why dont you run the command from the directory above spinner. E.g. jar -cvf myjar.jar spinner/.

Surely if this is your package structure then you would need the spinner directory included anyway. Anyway if not try jar -cvf myjar.jar ./
12 years ago
This is not really an option the session/entity manager is container managed (or has the semantics of) via Springs orm stuff. Anyhow I have changed my transaction boundaries now to get around this.

Thanks
Hi,

I do not get any error messages as the entity manager is flushed when the transaction commits. In short here is my code

all within a single transaction:



I would have thought that when an Invoice is persisted the subsequent call to findExistingInvoice for the next charge would flush the entity manager as it does in my unit test.

I can work around this problem by changing my transaction boundaries, i.e. each iteration is separate unit of work but i would like to know what hibernate is doing.
Hi,

I am experiencing a strange problem when using Hibernate EntityManager 3.3.2 where insert queries are not flushed to the db before attempting a select query within the same transaction.

I am using container-managed JTA transactions (Weblogic) and Oracle 9i.

This is quite confusing as i have a unit test that exercises this code but it auto flushes prior to executing the select. This is also running in JTA transaction (JOTM) against HSQLDB.

I would appreciate it if any one could clarify what is supposed to happen in this scenario?