Jon Strayer

Ranch Hand
+ Follow
since Dec 04, 2002
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 Jon Strayer

Mark Spritzler wrote:

Jon Strayer wrote:Is there a way to generate the mapping elements of hibernate.cfg.xml from the annotated classes? I could probably write something, but I don't believe I'm the first person to think of this.

Um, they would be unrelated. What can you get from the annotated class that goes into the hibernate.cfg.xml

The hibernate.cfg.xml is for SessionFactory and Hibernate configuration like show_sql and also to say that you are going to use a second level cache.

In the Annotated classes are specific to the class like its mapping to the database and named queries, nothing about the configuration of Hibernate or a SessionFactory.


The mapping elements contain the class names. The classes with the hibernate annotations would be the ones that go in the mapping elements.
Is there a way to generate the mapping elements of hibernate.cfg.xml from the annotated classes? I could probably write something, but I don't believe I'm the first person to think of this.
Why would I want to read your book?

Originally posted by Chris Shepherd:
I'm just now digging into the threading stuff introduced in java 1.5 (Executors and such). Is there a way to tell an executor that a runnable you pass it is more or less important than another?

Up till now I have been using the setPriority() method on my threads as I create them to allow more important threads to execute quicker when they are run by holding back on running the less important ones.

Thanks for your input.

I realize this thread is old, but I was looking for an answer and Google found it, so I thought I'd put my solution here.

To set the thread priority for an Executor you write a ThreadFactory and set the priority of the threads there.
I am a very happy user of both MyEclipse (mostly the database tools) and Maven. I've recently started a series of web applications and discovered that the two tools disagree on where the web.xml, struts-config.xml, etc. should go.

Is there a way to change where MyEclipse looks for configuration files?
What Map? There is no Map in your example.
15 years ago
We use

src -->
main --> com.companyname.packagetotest
test --> com.companyname.packagetotest
16 years ago
All of my current applications are batch applications. Is there anything in Spring that could make them easier to write/maintan?
17 years ago

Originally posted by Mike Clark:

Thanks for letting me know. It's something I'm considering writing.

Honestly, I don't have good resources for learning Maven. I'm not saying they're not available, but good documentation for Maven seems to be lacking. I learned what I know about Maven by trial and error. Perhaps I can help change that.


If you write a Maven book I guarantee at least one sale. :-)
17 years ago

Originally posted by Paul Connolly:
Is it possible to pass in command line arguments to Maven?

In my build process, I call my goal overnightBuild which performs the entire process. I want to change the process that you can pass in an argument that specifies which branch the build is to be run off. So is it possible to pass in something like
"maven overnightBuild betaBranch" or an equivalent? Looking at their documentation and don't see anything about it or anything similar...

You would have to do some work on overnightBuild to have it use some property (for example buildBranch) and then call it like this:

maven overnightBuild -DbuildBranch=betaBranch
17 years ago

Originally posted by Mary Cole:
I have 2 folders where in I wantto copy specific files from folder A to foldr B...The pattern matching something like common* want to copy only files starting with "common" to folder B
How do i do this

This should work
18 years ago
Post your junit task.
18 years ago
See Runtime.exec in the Javadocs.
[ December 29, 2003: Message edited by: Jon Strayer ]
18 years ago
I thought about that, but it seemd like way too much complexity when I didn't really know if I needed it or not.
I just switched to plain old Statements. So far it seems to be fast enough.
A co-worker is having a problem with eclise where when he tries to trigger code completion he gets the error message "no completions available". I can't find anything about this error message on the net. I have no idea what could be wrong.
Does anyone here have clue to offer?