Tuesday April 25, 2006
Today we had some problems related to the JavaBeans spec: We’ve created
JavaBeans from a SAP data schema, which led to not-very-descriptive property names, like “D_BLA_DOO”. We use the beans in our Java code, and we use Jakarta Beanutils to do the conversion between JavaBeans and proprietary adapter classes.
Unfortunately, the JavaBean Inspector of the JDK doesn’t recognize those properties starting with a letter and an underscore, so we decided to go with a clumsy workaround, i.e. renaming the bean properties.
Of course, there is a proper solution and I just found out about it. Just implement BeanInfo (or inherit from SimpleBeanInfo) and create the property info yourself for your non standard JavaBean. Got to tell my colleague about it…
Posted on Apr 25, 2006 at 22:06 (MET) |
Permalink |
Tuesday April 18, 2006
Matt has written about how to get things done. One thing he mentions is to stay away from reading and writing emails/blogs. So did I. Just a short wrap up what I’ve done the past few days:
- I wrote some code to leverage Spring beans in webMethods (wM). Unfortunately I did that partly at Bosch, so I won’t be able to opensource it. However, it isn’t hard to do: I registered an ApplicationContext for each wM package - the beans within the application context contain reusable logic. To access the beans there is a Java service for each method, all of which contain a input parameter for the ID of the bean.
The goodie: To make it easier for our developers, I used XBean to define the application context. That way Spring’s verbose XML code gets much more explicit. Craig has put together a very good write-up.
- I upgraded Flowfuse to Maven 2 (and XDoclet 2). Major benefit: The Jetty Plugin. It lets you develop webapps without building and deploying every time you change something. More information in Brett’s Developing with Jetty: Where Have You Been All My Life. Btw: I’ve also managed to get JNDI resources working, this Jetty config file seems to do the trick:
<New id="flowfuse" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/flowfuse</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="serverName">localhost</Set>
<Set name="port">3306</Set>
<Set name="databaseName">flowfuse</Set>
<Set name="user">root</Set>
<Set name="password">root</Set>
<Set name="autoReconnect">true</Set>
</New>
</Arg>
</New>
(The whole Jetty 6 config file can be found here.)
Also, I went free-climbing with Robert, visited Petra’s parents on Sunday and had an all-in-all very relaxing Easter weekend.
Posted on Apr 18, 2006 at 22:42 (MET) |
Permalink |
Monday April 10, 2006
Remote debugging of server applications is certainly one of the most useful features for Java developers - regardless if you develop on Tomcat, JBoss, Weblogic or even webMethods’ IntegrationServer.
Its as easy that:
- Add the following to the JAVA_OPTS variable (usually you do that somewhere in the startup script of your server app):
-Xdebug -Xrunjdwp:transport=dt_socket,
server=y,suspend=n,address=1234
- In Eclipse go to Run | Debug and setup a new Remote debugging configuration. You make sure to enter the correct hostname and port.
- Set some break-points and access your server app. The Eclipse debugger will automatically halt the application, if one of your breakpoints is reached.
Too easy, mate!
Btw: Levent has posted an excellent post about this.
Posted on Apr 10, 2006 at 20:58 (MET) |
Permalink |
Saturday April 8, 2006
After reviewing Mevenide for the last issue of German Eclipse Magazine, I have had a look at the “Maven 2 Plugin for Eclipse“. There is only an development release available, but the Plugin already contains some great features and the UI design feels just right.
My favourite feature is the dependency browser, which also includes a repository browser. So if you need to add a dependency, you can search for it within Eclipse and let the plugin download it.
The next release will even provide the dependency download as a “quick fix” (when you hit Ctrl-1). Eugene (the plugin’s lead developer) provides more info about upcoming features.
Posted on Apr 8, 2006 at 13:35 (MET) |
Permalink |
Thursday April 6, 2006
This week I attended the Business Integration Forum 2006 in Frankfurt, Germany. The forum was packed with presentation around SOA and EDA (Event-Driven Architecture), which basically describe an architectural system based on asynchronous interaction patterns.
The interesting thing about asynchronous interactions (and hence event-driven architectures) is that they have more in common with reality than synchronous interactions. For example, if you send an event, e.g. an email to someone else, you wouldn’t wait until the other person responds. On the other hand, the other person decides how to react on your email, or whether another email may be more important than yours. That way both sides of the communication can better balance their their load. Gernot Starke’s interesting session went into detail about comparing system interactions and human interactions based on Greg Hohpe’s EAI patterns and articles (highly recommended read: Starbucks Does Not Use Two-Phase Commit).
David Luckham, Professor Emeritus from Stanford University held a very interesting keynote about complex event processing (CEP) and so-called event-clouds. To analyze them to detect beneficial as well as disadvantageous (or even harmful) situations for IT systems and businesses, he assigns events to three layers in the IT infrastructure (cf. Figure 2).
The events on each layer are related to each other, and the relationship needs to be well understood, but different people in the enterprise will have different views on the events. Example: An CFO will focus on process layer events to see how the business is doing, while IT operators will more focus on the middleware layer events to check the load on the systems. More details in this article and on Mr. Luckhams website.
Other interesting topics: (the emerging) Eclipse’s SOA toolset and the organizational changes in todays IT departments required by the introduction of SOAs.
Update: Added Mr. Luckhams typical layers in an enterprise IT infrastructure.
Posted on Apr 6, 2006 at 22:31 (MET) |
Permalink |
Sunday April 2, 2006
My old Dell-Laptop has just turned three, and its time for a new laptop. Many people in the community are happily using Apple laptops, so I thought about buying one, too. It just looks cooler, the underlying OS is Unix, and it even ships with Intel chips. On the other side it has only one mouse button, it still seems to get hot like the G4 Powerbooks did and it seems quite expensive still.
In the end my Swabian* heritage succeeded and I decided its not time yet: Instead I’m going to order a Dell D620, which costs € 700 less than the comparable MacBook. Sorry Steve, maybe next time…
*) For non-German readers: Swabia is located in the south-west of Germany. Its inhabitants are considered to be a stingy, which may be true sometimes. (They are building great cars, however.)
Posted on Apr 2, 2006 at 22:42 (MET) |
Permalink |