Blog Archives

Cayenne-Modeler with Netbeans 6.9

It is possible to start the Cayenne modeler within Netbeans. Go to your Maven project and right-click on the project name. Choose Custom->Goals… and put “cayenne-modeler:run” (without quotes) into the first line. Click on “Remember as” and choose a name for the goal (like Cayenne-Modeler). Now you have a new menu item, which can start the modeler. But you need the associated plugin within the pom-file of the project. Go to “Project Files” and open the “pom.xml”. Add

<build>
<plugins>
<plugin>
<groupId>org.apache.cayenne.plugins</groupId>
<artifactId>maven-cayenne-modeler-plugin</artifactId>
</plugin>
</plugins>
</build>

Now you can open the modeler.

Proximity

I use Proximity as Maven mirror. If you need a new repository to use the artifacts for your project, you have to change three XML files to add it, which is a not easy and every time you have to copy and paste some parts of the configuration and have to change them manually. Because I’m a lazy developer I have written a script to create the necessary XML tags. You can download it from the server. Check the path of the Proximity installation within the script, per default it is set to $CATALINA_HOME/webapps/proximity. The script contains only a basic logic, you can enhance it with more complex things. The new repository will be added to the “public” repository group, which is set as the mirror within the Maven configuration file.

JPA and then?

Some tests with JPA (EclipseLink as implementation) were not successful. I need a persistence.xml file to define different persistence contexts, but what is if I need a new context at runtime? I have to provide such an xml file, but how I can merge the new one with the already existing file without restarting the core system? It’s not nice to define all classes within the xml too, so I have closed this chapter.

I have found another interesting approach: Apache Cayenne. It seems to meet the requirements, especially the use of events during insert/update/commits etc. would allow me to integrate the ACS component of PhOSCo. So I’m thinking about a migration to this framework. Maybe I only can get some ideas from there or the complete framework. I will see.

The current status of PhOSCo.NG

In the last 6 month I hadn’t enough time to going forward with PhOSCo.NG. The birth of my daughter has stopped my excessive programming thread and pushed the priority of the daddy-thread on a high level. The most important task on PhOSCo.NG is always the design and the implementation of the access control system. I have read some articles about Spring Security, but it’s not flexible enough to model the requirements. Till now I have tested some versions of my own system, but no-one was really nice. I hope I can finish it in July.

Database abstraction

Today I’m working again on the database abstraction layer of PhOSCo.NG. It should be possible to recognize a lost database connection to provide information about this event to the user. It isn’t a trivial problem, because every JDBC operation can stop with such an error. Every database management system implements that as a special error code, so the implementation must be datastore-specific. Damn!