Hi
I'm relatively new to Java & maven, and so to get to know my way around, I decided to do a project as a means for learning.
I picked a pretty common stack :
Java 1.6
Hibernate (with annotations)
Spring (with annotations)
JUnit 4
Tomcat
Oracle XE / In-mem hsqldb
By far one of the biggest problems I've experienced is getting the ...
What if you don't want to start a separate project for grails but instead sneak it into an existing webapp?
I have to build an admin interface/crud for some new entities and thought it would be a perfect way to learn grails.
...
Is it possible to use Java FutureTask with a Spring TaskExecutor to get a Future object?
I'm looking for a TaskExecutor that implements the Java ExecutorService interface, in particular the submit() method. Looking through the Spring Javadocs doesn't reveal any classes like this. Is there some alternate method to handle futures through...
How to make a logging list of Users' IP addresses, should this be done via tomcat or grails or a combination of both
...
We are using freemarker for templates in our web application. We are using spring's FreeMarkerViewResolver for this.
Is there a way in freemarker to change the content type on the response to
text/xml
is there a way to do this in the template?
...
I have a rather large project involving spring and hibernate. Right now, I'm backing certain objects out of hibernate and into memory, and I've hit a sort of snag. I have the following setup.
Class A contains a number of primitives and a class B. B contains primitives and a class C, which was previously lazy-loaded.
Now I have this
...
Consider this Spring MVC Controller:
@Controller
@RequestMapping("/test*")
public class TestController {
@RequestMapping(method = RequestMethod.GET)
public void doStuff(Model model){
...
}
@RequestMapping(params = "myParam")
public void doStuff(@RequestParam("myParam") int myParam, Model model){
...
}
}
When I p...
When using aspectj, why use @Component over @Configurable.
I've got spring and aspectj setup for @Transactional support, aspects on self-invocation, and injection into JPA entities. This works great.
I'm using @Component for most classes that need injection, and thus either having them injected into their dependencies. Or, when I can'...
Hello,
I am currently developing my project using Spring, Sutruts2 & Hibernate. Now i want to apply acegi security for authentication & authrization purpose.
But, i m totally new with acegi, so i want to use acegisecurity framework with spring configuration.
If anyone have link for an simple example of acegi with spring, struts2 & hi...
Situation is pretty serious, we have a table in DB2 on AS400 which has defined foreign key to another table, so we are entering record which have regular ID of referenced table so when we enter SQL insert through front end tool everything went fine.
Problem arises when this insert is to be done through java application which uses Sprin...
I have this code:
run big query: Select all unprocessed objects from table A
for each result
create or update an output object in table B
update input object: Set it to "processed"
I'd like to have a transaction over the loop body, that is after one row of input is processed, the updated objects should be committed, so when th...
I am trying to use Spring for the first time in an application. The general issue that comes up again and again is that I have no idea how to debug Spring. The framework is so configuration heavy that traditional code debugging seems fruitless. Short of turning on the debugging level logs (which are lacking) and scanning through I have n...
I am getting an Out of Memory exception sometimes during or after the validation of component happens. I was trying to profile a large validation result <= 20000, and it worked, so I went bigger. The exception occurs at values > 20000, does anyone know of any inherent jgoodies memory leaks, with the validation framework, the component ...
In the following code I am trouble with my injected EnitityManager, which always shows up as null;
public class GenericController extends AbstractController {
@PersistenceContext(unitName = "GenericPU")
private EntityManager em;
protected ModelAndView handleRequestInternal(
HttpServletRequest request,
...
Hello,
I need to store some configuration parameters for a web application that uses spring framework.
Typically I'll use a configurationfile.properties file but i wonder if i can store that values in the applicationContext.xml file.
One workaround could be to create a JavaBean class to store the values, and build that class using spr...
I have a database table consisting of countries. In my DAO which extends HibernateDAOSupport the following method...
public List<Country> getCountries() {
return getHibernateTemplate().loadAll(Country.class);
}
...generates the following activity:
Hibernate: update countries set name=?, iso_alpha_2=?, iso_alpha_3=? where id=?
Hiber...
I would like a class analogous to spring's ContextLoader/ContextLoaderListener/ContextLoadServlet. These classes are invoked when the application server initializes and puts your configured context into memory.
What is the analogy of this for an application that does not have a container wrappering it?
This would preclude multiple ins...
What I wonder is if there's a easier/better way to handle dynamic forms (adding form items to the dom via js) when using SpringMVC and Spring forms?
Imaging having an Invoice object that have many LineItems.
public class Invocie {
private List LineItems;
public Invoice() {
lineItems = ListUtils.lazyList(new ArrayList<LineItem>(), ...
is springdoclet use to generate bean defination xml files? servlet-config.xml..etc ?
i trying to find out what is the different springdoclet compared to spring roo
...
Hi,
I'm wondering that if there is a way for binding a spring bean's property to another bean's property so if any change on binded property occurs in runtime, what i expect is referencing bean's property also changes. I'll explain more with a little code snippet.
<bean id="johnHome" class="example.Contact">
<property name="phone...