Chris Miles

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

Recent posts by Chris Miles

Good Afternoon,

I am using Hibernate behing JPA and have the following problem.

My application pulls an entity out using the find operation of the
EntityManager, and then somewhere else in my application I want to pull
the same Entity out again cleanly with the current database state rather
than the dirty version but any time I try I get the same dirty data.

I have tried to detach the dirty version and then fetch the Entity again
but it is still same.

I have also tried the CacheRetrieveMode.BYPASS hint on the fetch in case
it is a caching problem.

How can I fetch a clean instance of my Entity side by side with the dirty



Got it working. At last! I can sleep now!

Thank you very much.
12 years ago
Thanks again.

Maybe your right and it is my GridLayout that is the problem.

Using your example. What if I wanted to add three colours filling one column, and three colours filling the next column?

My code is identical to yours, except I am creating GridManager with 2 columns.

12 years ago


I am now using.

Thank you, It now honours the X and Y values as expected, however, it does not seem to honour the widths in the grid layout.

I do


I would expect it to add a red rectangle into the first column, and then a blue rectangle into the second column.

However it is just adding 1 red rectangle taking up the full width of the frame, and then a blue underneath taking up the full width of the frame.

12 years ago

I have created a JComponent which I just want to fill with a colour. Very simple.

I have a JFrame with a GridLayout with 1 column and 5 rows.

My JComponent code is very simple, and just calls fillRect.

I add 5 of these components to the JFrame's content panel.

When I run the code the above method is invoked for all 5 components. Debugging shows that X, Width and Height are all the same which is what I expect, and the Y value is changing each time, which again is expected as there is only one column of fixed rows.

When painting is done however, I can only see one rectangle drawn.


12 years ago

I have upgraded using the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor with maven.

I get the error from maven (mvn package)

[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not found

I have the following directory structure


I build this with the following with maven

The javax.annotation.processing.Processor file contains

Any my

And my CodeAnnotation is as follows

Thank you.
12 years ago
My application is built as an EAR containing a WAR and a EJB JAR.

The JAR is deployed with ejb-jar.xml and each of my EJBs are deployed with:


My WAR has a web.xml with the following for each EJB:


Within my web application I can only lookup the bean with


Now, I want to be able to lookup this bean from another bean.

java:comp/env/BlahEJB - does not work
BlahEJB - does not work

And about 20 other combinations does not work either.

I have tried an orion-ejb-xml configuration

with the following


and tried every combination as well with no luck.

What am I missing here?

thanks very much

13 years ago
I have just started using JBoss as I was having probs with Sun app server.

I just deployed one ten minutes ago successfully.

Jar file with the stucture

which I simply drag and dropped into JBoss's deployment directory. Bingo.
still no joy with this.... It all seems to deploy fine... why cant I use the bean in my client.. I have trawled the docs for hours with no joy
just to expand... I have changed something (not sure what)

and I am now getting the following error.

Important thing I see is "AccountBean not found"
I have created a test EJB and deployed it to Sun AppServer 8.2 with the name "AccountBean" - It was confirmed as deployed.

I have set JBuilder 6 to use the JDK in the AppServer directory and created a test application which failed with the error following message:

Here are the EJB files.

And finally tghe client code.

any help greatly apreciated...

TIA Chris

Hi thanks for the response... I do have academic qualifications but im
finding it hard to find a job (just finishing my masters just now)
After numerous job interviews it has dawned on me that industry just
doesnt hold a high regard for academic qualifications (without experience)
Yeah it may show that I am commited to studying but the actual qualifications
themself dont seem to mean squat except another stepping stone up the great
ladder. So i have took it upon myself to get my Java certification in a bid
to have something industry recognised as my friend could not get a job
for over a year with his masters degree until he gained his MCP/MSCE and
he then got a jon straight away.

What sort of recognition to the qualifications have in industry (particulary
in the UK if anyone has any experience of it)

Im just getting ready for the Java 2 1.4 exam (CX-310-035)

many thanks

Chris, Glasgow