JPA2 Metamodel – how to manage that.
Comments: 2JPA2 added new typesafe Criteria API. This allows us to build query in strongly-typed manner instead of string based. To provide such functionality JPA2 use Metamodel API described in JSR-317: Chapter 5. When entity manager factory is bootstrapping for persistence unit, then persistence provider have to initialize metamodel classes so this classes have to be […]
Categories
Tags
Spring Template Objects Testing
Comments: 2My friend asked me, how we should test this piece of code public void fire(final NotificationMessage message) { jmsTemplate.send(new MessageCreator() { @Override public Message createMessage(Session session) throws JMSException { return session.createObjectMessage(message); } }); } Mock, stubs, arguments matchers are not successful here. Of course we can mock jmsTemplate, verify if send method was executed, but […]
Categories
Guava – Google Collections
Comments: 2Guava Guava is Google Core Libraries for Java 1.5, it include extension libraries which provides many common pieces of code. Long long time ago apache starts with commons-* libraries, but unfortunately most of them lack java 5 support. Currently Google Collection is included into Guava and on 30 Dec google released Google Collection 1.0-fianal version. […]
Categories
Tags
Long Time
I’m back. Probably you think that I’m dead but it far from that. Rather I’ve got so many activities that I can’t manage writing about it on my blog. What’s a shame. First at all in November I must finalize training. It was a lot of work to do, and preparing labs is very difficult […]