Java Bean Mapper Framework in Spring - javabeans

I am planning to use MapStruct as Java Bean Mapper Library into my project. But before choosing this, I would like to see any such library is there in the Spring framework. I could not able to find such, Can anyone confirm do we have any such library? If not, is MapStruct is the good option to use along with other Spring Framework libraries?

Related

Is there a maven plugin to do wsdl to java with xstream mappings?

At present i know that there is a plugin called cxf-codegen plugin which converts wsdl to java with jaxb bindings .At present I just give the wsdl file and xsd file , the maven cxf-codegen plugin takes care of conversion fron wsdl to java with default jaxb bindings. I am searching for a solution as simple as that .
The system I am going to work with uses xstream.So I need to find a maven plugin to do wsdl to java with xstream bindings . The system uses restlet as rest framework .
Is there anything available as such ?
Thanks

How to generate DAO classes in IntelliJ IDEA

is there any possibilities how to generate DAO classes in IntelliJ IDEA? I found many articles about generating entities but none of how to generate DAO.
I am using 11.1.2 version.
It should be noted that Intellij does now support this. Follow the guide here:
New Intellij Functionality
IntelliJ IDEA doesn't support it, you can consider using Hibernate Tools instead via Ant:
Ant task: The Hibernate3 tools include a unified Ant task that allows you to run schema generation, mapping generation, or Java code generation as part of your build.
The tools for Hibernate provides various tools to use with Hibernate.
The primary tools can be used for generating source artifacts such as
mapping files, java entities, DAO and other scaffolding code. The
source of this generation can be JDBC database, classes or even just
existing mappings.
It uses Hibernate core metamodel to generate from and to the source
artifacts. Allowing it to support both top-down, bottom-up and
middle-out development.
Hibernate Tools is used in JBoss Tools Hibernate plugins to provide
parts of the Eclipse plugins for Hibernate.

Does play2 framework uses ehcache wrapper on avaje ebeans bean cache?

Does play2 framework uses ehcache wrapper on avaje ebeans bean cache ?
It seems to me that ehcache have to be more efficient, and it's not hard to implement wrapper around standart bean cache. But I don't know how play2 working with the bean cache itself.
According to the Ebean/Play integration, it does not seem that Play set any L2 cache for Ebean.
So Ebean must be using its default cache mechanism (com.avaje.ebeaninternal.server.cache.DefaultServerCache).

Mocking framework for osgi/eclipse applications?

I am looking for mocking framework to use in my osgi/eclipse test fragments. I have looked at:
http://www.jmock.org/download.html
but since its not osgi I need to convert it manually. I have tried to google for some mocking frameworks that works with osgi out of the box but have not been able to find any, does osgi developers not use mocking?
One solution will be to create mock objects of OSGi objects (like BundleContext and ServiceReference). You can use any mocking framework for this and of course you don't have to run the test in an OSGi container. This will be OK for simple scenarios.
If you want to test inside a container, you have the following options:
Pax-Exam
Spring DM Testing facilities
Actually Mockito works quite good with OSGI applications, since it has OSGI manifest. You can simply add it to your target platform from the latest orbit repository. I managed to make Powermock also working for Eclipse Plugins and it is available as well as update site at https://code.google.com/p/powermock-osgi/

Using Enunciate with Grails

I am creating Web APIs, in a RESTful manner. Grails of course has good support for creating REST web services. Enunciate claims to help in the API part, where things like documentation, client libraries, etc are important.
The purpose of this post is to invite experiences on using Enunciate with Grails, or ideas on how that can be done.
There are two main issues using them together:
Enunciate works with JAX-RS, not the native implementation of REST by Grails. Thankfully there's a JAX-RS plugin available, but am not sure if Enunciate will be able to work with it.
Grails domain classes are in Groovy while Enunciate works with Java
source code (example).
Enunciate works with both Java source code and Java compiled bytecode to do its work. But if you don't have Java source code, Enunciate won't be able to pull stuff out of your JavaDocs to enhance its generated documentation. Given that, there should (theoretically) be a way to apply Enunciate to compiled Groovy bytecode, but your docs won't be as rich because Enunciate won't be able to see your JavaDoc documentation. I say theoretically because I don't have any personal experience with it nor do I know how painful it is to pull off.
There is an open issue at ENUNCIATE-356 to investigate this complexity. Note that ENUNCIATE-356 depends on ENUNCIATE-584, which might get some more traction soon, being driven by ENUNCIATE-585 as we move from using APT (introduced in Java 5, deprecated in Java 7) to the Javac tool (introduced in Java 6). It would be interesting to know whether the Javac tool supports languages other than Java, in which case we'd get Groovy support for free.