Category Archives: Coding

Gradle, Hibernate and “No Persistence provider for EntityManager named”

During the actual migration of an JEE project, consisting of several moduls (WAR, EJB ..) from Ant to Gradle I faced the following problem: In the test phase, e.g. when calling gradle test, one integration test (or should it better be called functional test? I’m not sure about this) stated out that: No Persistence provider […]

 

0
Kudos
Don't
move!

Read more

Gradle – Adding dependecy to task eclipse fails

Today I toyed a little bit around with gradle and tried to add an additional path to sourceSets.main.java for separate generated files from my own code. This works very well via srcDirs += ‘src/main/generated’. But after I cleaned up my project folder (removing IDE specific files and the generated classes) and using the eclipse task […]

 

5
Kudos
Don't
move!

Read more

Entwicklung gestartet: Clean Coder – Android-App

Heute habe ich (endlich) angefangen eine meiner Ideen in die Tat umzusetzen: Eine Clean Coder  AndroidApp. Neben der reinen Neugier “Wie funktioniert dass denn mit der Android-Entwicklung?” hat das ganze auch einen etwas ernsteren Grund: Da ich den Punkt “täglich Reflektieren”, während der Rückfahrt mit der Deutschen Bahn durcharbeite, fehlt mir ab und an noch […]

 

0
Kudos
Don't
move!

Read more

Configure JMS-AddressList property in Glassfish dynamically [Update]

When you would like to use a scenario like “Consuming JMS-Messages from a remote server” (see here), you may explore very quickly the problem, which comes with this example: The hard-coded “AddressList” property. This is a problem, because it reduces the resuability to null. Testing or deploying on other system configurations would lead to code […]

 

1
Kudos
Don't
move!

Read more

[Updated] Using JUnits-@Rule for injecting EntityManagers during testing

Hi! Today I would like to show you, how to use a JUnit-Rule for setting up and injecting a EntityManager during testing. First we need at least JUnit version 4.10 and JEE6. I will use EclipseLink as a persistence provider, but you can choose whatever your preferred persistence provider is. The next step, after creating […]

 

0
Kudos
Don't
move!

Read more

@Resource.lookup – How to solve classpath problems when compiling or testing with gradle

I’ve started this week with Gradle and tried to convert one project from maven to Gradle. Besides of some, I think beginner mistakes, I faced with the following problem. With JEE6 the @Resource annotation was extented with the “lookup” attribute. This attribute links to any resource which uses a global JNDI name. Something like this: […]

 

1
Kudos
Don't
move!

Read more