If have a Java class with some fields I want to validate using Hibernate Validator.
Now I want my users to be able to configure at runtime which validations take place.
For example:
public class MyPojo {
...
@NotEmpty
String void getMyField() {
...
}
...
}
Let's say I want to remove the NotEmpty check o...
Does anyone know of a simple Web MVC framework and Web Server for Java that is open source?
This is intended as a simple web server and framework for students in a tutorial class.
It's important these both the web server and MVC framework are simple, OSS so students can easily peer under the hood and the tutors can easily support it, l...
Tomcat has an option to use APR for handling connections. What are the benefits of using that? Does anyone have firsthand experience with it?
...
I'm using jdi interfaces to create a debugger and when I use MethodEntryRequests to enable method entry tracing the debugged program slows down by factor of tens. I have set filter for main thread and suspend policy to SUSPEND_EVENT_THREAD. Classfilter is limited and if I print any received events it doesn't show more than couple of doze...
I'm writing java application that is using both SQLite and MySQL using JDBC.
Are there any differences in SQL for those databases? Can I use same queries for both SQLite and MySQL, or is there any db specific stuff, that doesn't work on the other one?
As far I've worked only with MySQL, so I don't really know much about SQLite.
...
i have looked for and compreensive article on this and have yet to find one good enough.
Can some one explain to me the workings of the transaction types?
(Required, RequiresNew, Mandatory, Never...) and mainly how these affect service calls between services with diferent types?
...
I would like a program that logs every call I made to a class folder like com.mycompany.mylibrary and outputs a valid java program, much like http://linux.die.net/man/1/ltrace does in Linux.
Do you guys know any call interceptor like the one I am looking for?
...
Hello, I am working on a Linux Ubuntu 8.10 and I would like to install a second JVM. I am currently working with Java 1.6, but I want to install Java 1.4 and afterwards, set the 1.4 JVM as my default JVM, to work with. How could I do that? Thanks in advance!
...
Is there a way to write a Spring bean in XML so that it uses constructor injection when that constructor has a varargs parameter type? IE, is there a way to specify an array the way you can specify a list?
For instance:
class MyClass {
MyClass(String... args) {
// rest omitted
}
}
...
I have following warnings if I compile our flex project with the ant task from the flex sdk. Does anyone have an idea where this comes from and why this happens and if I can safely ignore it? (The swf file itself seems to get created without an actual error)
[mxmlc] The args attribute is deprecated. Please use nested arg elements.
[mxml...
Since today, my Eclipse fails to load JSObject. This code was previously working OK. Any ideas how to fix it? I do have simple netscape.jar in the classpath.
Here is the code that now fails to work:
import netscape.javascript.*;
...
try {
doc = (JSObject) JSObject.getWindow(app); //.getMember("document");
} catch(...
I have a <path id="..."> in my build.xml. Before invoking the compiler I want to verify that every jar/directory on the classpath exists and print a warning with the missing ones. Does anybody know an existing solution or do I need to write my own task for that?
OK, I decided to go for a custom task. Here it is, in case anybody eve...
I'm aware of the class file format change using -target 1.6 (which is required when you use -source 1.6). But does the source option specifically change anything or enable any new features?
...
What is the most efficient way to solve this problem:
I've traversed a XML file and created the following set of linked (String) lists:
a > b > c
a > b > d
a > f > [i]
and now I'm trying to rebuild the XML into its original structure:
<a>
<b>
<c/><d/>
</b>
<f>i</f>
</a>
Any help would really be appreciated!
...
Hello,
I have a simple java application and want to embed it into a jsp page. At the minute it takes a parameter at the command line, is it possible to pass the parameter from the web page, if so how?
Thanks
~ Kyle G
...
Hi,
[UPDATE: I forgot to add that this 30 sec. freezing problem only happens the first time I try to load a file from the server. Subsequent loads are very quick. Maybe some strange reverse DNS lookup? I am hosting on Google's appengine.]
I started a little project recently called http://www.chartle.net which is build around an applet....
Netbeans thoughtfully sprinkles Logger.getLogger(this.getClass().getName()).log(Level. [...]
statements into catch blocks. Now I would like to point them all to a file (and to console).
Every logging tutorial and such only me tells how to get a specific logger to output into a file, but I assume there is a better way than fixing every a...
I'm new to java and have written a small, but quite important, thrift service in java.
I've noticed that occasionally it'll stop serving without any error messages; it seems that the java process just dies, randomly, without a stack-trace or exception.
What would be the best way to ensure this process stays alive even after an error? ...
I am wanting to know if there is any way to have multiple footer rows in a h:dataTable (or t:datatable) I want to do somthing like this (which does not compile)
<h:dataTable ... var="row">
<h:column>
<f:facet name="header">
Header
</f:facet>
<h:outputText value="#{row.value}"/>
<f:facet name="footer">
FirstF...
hi all!
I'm going to advise a company on a project soon, and I'm not too sure about what programming language I should advise.
It's a fairly straightforward (desktop based) application with a central datasource on the network, for storing and editing parts that make up a machine. The machine needs to be configured in the application, a...