Links

  • 1. Sogeti
  • 2. JBoss
  • 3. IBM
  • 4. Oracle
  • 5. SpringSource
  • 6. NL-JUG
  • 7. Java

Archives

Syndication  RSS 2.0

RSS 1.0
RSS 2.0

Bookmark this site

Add 'JCN Blog' site to delicious  Add 'JCN Blog' site to technorati  Add 'JCN Blog' site to digg  Add 'JCN Blog' site to dzone

Posted by Jan-Hendrik Kuperus at 14:51 on Sunday 30 May    Add 'Integrating a JavaFX UI with regular Java – Part 1' site to delicious  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to technorati  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to digg  Add 'Integrating a JavaFX UI with regular Java – Part 1' site to dzone

When JavaFX was first released, I didn’t give it much attention, as it felt like yet another visualization platform. With the latest release of JavaFX 1.3 and a project requiring a ‘fancy’ user interface, it was time to give it a try. The surprise came quickly: after downloading NetBeans and the JavaFX runtime, I was able to quickly build user interfaces that actually look cool.

After some tutorials and many bogus screens with crazy animations, it was time to put JavaFX to work on a real project. We had an application that receives a lot of data, processes this and stores it in a database. The data reception and processing were already fully developed in ‘regular’ Java using the Spring framework. The goal was to somehow try and integrate this existing code with a fancy JavaFX interface to visualize the data.

Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 10:45 on Thursday 22 April    Add 'Spring hand in hand with Swing Application Framework' site to delicious  Add 'Spring hand in hand with Swing Application Framework' site to technorati  Add 'Spring hand in hand with Swing Application Framework' site to digg  Add 'Spring hand in hand with Swing Application Framework' site to dzone

Starting work on a new application is always a fun period. You get to choose all your frameworks from scratch and you are not limited by any previous mistakes (or decisions, as some call them). A few months ago I had to come up with an architecture that would support a graphical interface, easy configuration and potentially swapping components in and out.

The configuration requirement and the need to be able to swap components naturally made me choose Spring. Using dependency injection and Spring’s easy PropertyPlaceholderConfigurer, these requirements are easily met.

For the interface, I decided to give the Swing Application Framework (JSR 296) a go. The Swing Application Framework (SWAF from now on) is an attempt at making life with Swing a lot easier. Read the rest of this entry »

Posted by Jaap Coomans at 15:01 on Thursday 1 April    Add 'Spring 3.0: Spring Expression Language' site to delicious  Add 'Spring 3.0: Spring Expression Language' site to technorati  Add 'Spring 3.0: Spring Expression Language' site to digg  Add 'Spring 3.0: Spring Expression Language' site to dzone

Last December Spring 3.0 was announced, but I haven’t had a good change to look at it until recently. In this blog I want to share with you what I think is one of the more interesting new features in Spring 3.0: The Spring Expression Language (or SpEL, as SpringSource likes to call it).

My first thought when I heard about the Spring Expression Language was “just another expression language”. Confused as I was I saw some code snippets that lead me to think that SpringSource just revisited the property placeholders. It wasn’t until I really dove into Spring 3.0 that I discovered that it really is a major new feature of Spring. In fact it even got its own chapter in the reference manual, as opposed to REST support, which is the most commonly mentioned new feature of Spring 3.0. That was a sign that it’s not just a small change.
Read the rest of this entry »

Posted by Jaap Coomans at 10:52 on Thursday 5 November    Add 'Don’t blame Hibernate, blame Spring!' site to delicious  Add 'Don’t blame Hibernate, blame Spring!' site to technorati  Add 'Don’t blame Hibernate, blame Spring!' site to digg  Add 'Don’t blame Hibernate, blame Spring!' site to dzone

A few months back I encountered a problem concerning hibernate.connection.release_mode. After my problem was solved by setting this property to 'after_statement' a colleague encountered the same problem and I advised him to use the same solution, which solved the problem again.

Today however, another colleague noticed this line in the logfile: "Overriding release mode as connection provider does not support 'after_statement'". A little investigation showed that this line is accompanied by a change from 'after_statement' to 'after_transaction'. So why is there apparently no change in the configuration at runtime, even though we noticed a difference in behaviour?

Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 6:18 on Thursday 5 November    Add 'Easy Event-Driven Application With Spring!' site to delicious  Add 'Easy Event-Driven Application With Spring!' site to technorati  Add 'Easy Event-Driven Application With Spring!' site to digg  Add 'Easy Event-Driven Application With Spring!' site to dzone

Suppose you are making an event-driven application. You have your listener interfaces and your event-generating objects. What is the most annoying part of getting this all to work?

Connecting your listeners to the event-generating objects. Every time you want some object to receive certain events, you have to register your listener with the correct producer object. This has some nasty effects on your code:

  • Either your listeners know to which object they are subscribing, or your event generators know who should be listening to their events
  • Due to this coupling, listeners and producers are difficult to test
  • Adding a new listener to your project requires some boilerplate code to get it working

Spring has a feature that can take care of all of this hassle: autowiring. For normal dependency injection, autowiring feels icky. It’s just too magical and leaves me with a feeling I am not in control. The great thing about autowiring is that it can be used on a per-method base.

Read the rest of this entry »

Posted by Jan-Hendrik Kuperus at 14:14 on Thursday 28 May    Add 'SpringSource Tool Suite now for free!' site to delicious  Add 'SpringSource Tool Suite now for free!' site to technorati  Add 'SpringSource Tool Suite now for free!' site to digg  Add 'SpringSource Tool Suite now for free!' site to dzone

A few weeks back, SpringSource announced it would make its own IDE completely free. Until now it had only been available freely for personal use, but now they have made it available to everyone for all purposes. So it has become possible to use the SpringSource Tool Suite (STS) for commercial purposes without paying a subscription fee to SpringSource. Check it out, it is a great tool for developing OSGi bundles.

Read the original announcement at the SpringSource Blogs.

Download the STS at the SpringSource website.

–JH

Posted by Martijn Schlief at 20:00 on Tuesday 7 April    Add 'Process an xml file using Spring Batch' site to delicious  Add 'Process an xml file using Spring Batch' site to technorati  Add 'Process an xml file using Spring Batch' site to digg  Add 'Process an xml file using Spring Batch' site to dzone

With Spring Batch, once you configured the basics, can help you to easily create an xml reader.

Take this exampe code:

	<bean id="importJob" parent="simpleJob">
		<property name="steps">
			<bean id="step1" parent="simpleStep">
				<property name="itemReader">
					<bean class="org.springframework.batch.item.xml.StaxEventItemReader">
						<property name="fragmentRootElementName" value="myObject" />
						<property name="resource"
							value="file:${import.location}/${input.filename}" />
						<property name="fragmentDeserializer">
							<bean
                                                          class="org.springframework.batch.item.xml.oxm.UnmarshallingEventReaderDeserializer">
								<constructor-arg>
									<bean class="org.springframework.oxm.castor.CastorMarshaller">
										<property name="mappingLocation"
                                                                                    value="classpath:${object.mapping.classpath}" />
									</bean>
								</constructor-arg>
							</bean>
						</property>
					</bean>
				</property>
				<property name="itemWriter" ref="objectWriter" />
			</bean>
		</property>
	</bean>

It is all you need to read and proces an xml file.

Read the rest of this entry »

Posted by Hans-Jürgen Jacobs at 7:34 on Tuesday 31 March    Add 'Build and deploy OSGi bundles using Apache Felix' site to delicious  Add 'Build and deploy OSGi bundles using Apache Felix' site to technorati  Add 'Build and deploy OSGi bundles using Apache Felix' site to digg  Add 'Build and deploy OSGi bundles using Apache Felix' site to dzone

Gevonden op IBM developerworks een reeks voor OSGi en Spring: Build and deploy OSGi bundles using Apache Felix.

Develop, build, and package Java™ class components as Open Services Gateway initiative (OSGi) bundles and deploy them in the Apache Felix runtime environment. Then use Felix shell commands to start and stop the bundles and dynamically update them.

Beschikbare delen in deze reeks: Part1, Part2

Posted by Martijn Schlief at 12:28 on Monday 30 March    Add 'Multiple Quartz SchedulerFactoryBean instances' site to delicious  Add 'Multiple Quartz SchedulerFactoryBean instances' site to technorati  Add 'Multiple Quartz SchedulerFactoryBean instances' site to digg  Add 'Multiple Quartz SchedulerFactoryBean instances' site to dzone

I had a problem where multiple quartz SchedulerFactoryBeans (Spring)  in separate deployments interfered; only one of the instances would execute. This spring forum  link helped me: remember to set the property ‘schedulerName’.

We use the SchedulerFactoryBeans to run Spring Batch applications in a JBoss environment.

Posted by Martijn Schlief at 22:29 on Thursday 26 March    Add 'Spring batch brengt structuur en flexibiliteit' site to delicious  Add 'Spring batch brengt structuur en flexibiliteit' site to technorati  Add 'Spring batch brengt structuur en flexibiliteit' site to digg  Add 'Spring batch brengt structuur en flexibiliteit' site to dzone

Spring Source

Afgelopen jaar heb ik kennis gemaakt met Spring Batch. Ik was al fan van het Spring framework en naast de nieuwe batchgerichte componenten is een van de voordelen van Spring Batch dat het Spring brengt in je batchjobs. Hierdoor heb je toegang tot alle componenten van de inmiddels uitgebreide collectie van Spring framework componenten.

Groot voordeel uit Spring is de herbruikbaarheid van diverse componenten, en in Spring Batch is dat aspect nog groter, want veel batches zijn vaak een herhaling van zetten op diverse bronnen en doelsystemen. Doordat de stappen in je batch spring beans zijn, en ook de batch job zelf wordt geconfigureerd als een spring bean, kun je de volgorde van de stappen eenvoudig aanpassen en hele stukken generieke code mixen met enkele specifieke componenten.

Read the rest of this entry »


© 2019 Java Competence Network. All Rights Reserved.