Co2 Tax calculator 2012 APP

On February 12, 2012, in iOS, iphpne, new, by Axel

Vandaag werd onze ‘VAA tax calculator’ gereleased in de apple APP-store. Met deze app krijgt u in een oogopslag zicht op de te betalen voordeel alle aard op uw bedrijfswagen.   U krijgt ook dadelijk het verschil te zien met 2011 alsook de kost voor werkgever en werknemer worden duidelijk weergegeven. Deze app wordt u [...]

Vandaag werd onze ‘VAA tax calculator’ gereleased in de apple APP-store.

Met deze app krijgt u in een oogopslag zicht op de te betalen voordeel alle aard op uw bedrijfswagen.   U krijgt ook dadelijk het verschil te zien met 2011 alsook de kost voor werkgever en werknemer worden duidelijk weergegeven.

Deze app wordt u gratis aangeboden door JArchitects en is nu beschikbaar voor iPhone en iPad

Nieuw in versie 1.1

Er wordt nu ook rekening gehouden met de leeftijd van de wagen voor de berekening van het voordeel alle aard. Volgens een recent wetsvoorstel zal de aankoopprijs met 6 procent per jaar dalen tot de bodemgrens van 70% bereikt is.

 

Did you like this? Share it:
Tagged with:  

Xcode Tips and Tricks – Tips 1 to 10

On January 12, 2012, in iphone, new, by Axel

Tip #1 – Split Editor View Vertically If you like to have multiple code windows open at once, the Split Editor option is your friend (see the little square grid icon shown below). By default, the windows are split horizontally. If you prefer to view your code side-by-side (nice for comparing), here’s how to tell [...]

Tip #1 – Split Editor View Vertically

If you like to have multiple code windows open at once, the Split Editor option is your friend (see the little square grid icon shown below).

By default, the windows are split horizontally. If you prefer to view your code side-by-side (nice for comparing), here’s how to tell the split to be vertical

Hold down Option key when clicking the Split Window icon
Tip #2 – Comment Out a Block of Code
You can quickly comment out a block of code as follows:

  1. Select one or more lines of code to comment
  2. Command-/

To uncomment a block of code, repeat the steps above.
Tip #3 – Toggle Between .h and .m Files (aka Switch to Counterpart)
Within your current code window, you can swap between the .h and .m file as follows:

  1. Command-Option Up-Arrow

Tip #4 – Map Keys to Actions (Key Bindings)
The Switch to Counterpart tip above is a real time saver. However, I often find that if I map logical key-strokes to actions I’m much more likely to get into the habit of using them. For example, I mapped the Switch to Counterpart to Option-S, as in Swap or Switch.

Here’s how to set key bindings in Xcode

  1. From the Xcode menu choose Prefereces
  2. Select Key Bindings
  3. Click on one of the Actions in the list
  4. Tap on the Keys column on the right
  5. Enter the keystroke you want to map to the action
  6. Click Ok to save your change

 

Tip #5 – Jump to API Documentation

Showing relevant API documentation for anything within the SDK(s) is as simple as:

Option Double-Click on relevant code
Tip #6 – Traverse File History
As you open and edit various files, Xcode keeps a history list of your actions, not unlike when using a web-browser. You can move through the list using the directional arrows as shown below:

The keystoke equivalent for the above is:

  1. Option-Command Left-Arrow goto to previous file
  2. Option-Command Right-Arrow goto to next file

 

Tip #7 – Set a Bookmark

I can’t imagine coding without having the option to set a bookmark as a placeholder for what I’m working on. I do this regularly when I need to segue to another file to find a snippet or otherwise poke around outside the current file I’m working on.

Setting a bookmark is as simple as:

Control-D
Enter a name for the bookmark
Tip #8 – Jump to Bookmark
There are two options to jump to a bookmark. First, you can select the bookmark icon in the upper right corner of the Editor window.

You can bring up the same menu as shown in the above figure using this keystoke:

  1. Control-4

 

 

Tip #9 – Indent / Un-indent Code

You can indent a line of code or a selected block of code as follows:

Command-[ move code left
Command-] move code right

The above works regardless of where you are in a line of code, in other words, you don’t have to be at the beginning of the line.
Tip #10 – Zoom Editor

You can toggle between Detail view and Editor view by clicking the Editor button as shown here:

The keystroke equivalent of the above is:

  1. Shift-Command-E
Did you like this? Share it:
Tagged with:  

Identifying blocking sessions in Oracle

On November 26, 2011, in new, by Pieter

As a developer, you probably already experienced the situation where database sessions are blocking each other. To give you an example: at my current client we are using Hudson for continuous integration. There are many (DbUnit) unit tests which are run during this build, and these are connecting against an Oracle XE machine. It happens [...]

As a developer, you probably already experienced the situation where database sessions are blocking each other.
To give you an example: at my current client we are using Hudson for continuous integration.
There are many (DbUnit) unit tests which are run during this build, and these are connecting against an Oracle XE machine.
It happens that developers are also running tests (e.g. for debugging purposes) against this database, sometimes causing a delay in the Hudson job because their session(s) is holding a lock on the database.
In these kind of situations, it can be extremely useful to quickly find out who is blocking who.
The Oracle v$lock table provides such information, but can be hard to read (you need to start comparing session id’s and so on…)
To make life easier, you can combine the results with the v$session table, and get user-friendly results:

SELECT s1.username || '@' || s1.machine || ' ( SID=' || s1.sid || ' )  is blocking ' || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
FROM v$lock l1, v$session s1, v$lock l2, v$session s2
WHERE s1.sid=l1.sid
AND s2.sid=l2.sid
AND l1.BLOCK=1 AND l2.request > 0
AND l1.id1 = l2.id1
AND l2.id2 = l2.id2 ;

This will give you something highly readable like this:

Developer1@machine1 (SID=143) is blocking oracleUser@hudson (SID=153)

Please note that for selecting data from the v$-tables in Oracle, you need to have DBA rights (e.g. connect as ‘SYS’ or ‘SYSTEM’ user).

In order to avoid writing the query every single time you need to find out who is blocking who, you can create a view based upon this.
You can also give developers select rights on this view, so anyone can access the valuable information.

This post was based on a post from Natalka Roshak’s blog, and has been very helpful to me.

Did you like this? Share it:
Tagged with:  

JArchitects @ Devoxx 2011

On November 17, 2011, in new, by Axel

Also this year our JArchitects team was present at the Devoxx conference in Antwerp. Some of my notes: New in Java 7 The diamond operator facilitates usage of generics (project coin) new try-with-resources syntax (project coin) Usage of String in switch statement (project coin) Simplified Varargs Method Invocation (project coin) Language support for Collections (project [...]

Also this year our JArchitects team was present at the Devoxx conference in Antwerp.

Some of my notes:

New in Java 7

  • The diamond operator facilitates usage of generics (project coin)
  • new try-with-resources syntax (project coin)
  • Usage of String in switch statement (project coin)
  • Simplified Varargs Method Invocation (project coin)
  • Language support for Collections (project coin)
  • underscores in numeric literals (project coin)
  • Project Lambda
  • Modularization (Project Jigsaw)

 

Language support for Collections

List list = ["item"];
String item = list[0];

Set set = {"item"};

Map map = {"key" : 1};
int value = map["key"];

 

 

Automatic resource management

Annoyed to have verbose code because of try / catch statement. i love this one.

try (BufferedReader br = new BufferedReader(new FileReader(path)) {
   return br.readLine();
}

 

 

Underscores in numeric literals

int billion = 1_000_000_000;

 

 

String in switch

Nothing to explain about this:

String availability = "available";
switch(availability) {
 case "available":
    //code
    break;

  case "unavailable":
    //code
    break;

  case "merged":
    //code

  default:
    //code
    break;
}

 

 

Project Lambda

aims to support programming in a multicore environment by adding closures and related features to the Java language. more info about closures can be found here http://blogs.oracle.com/mr/entry/closures

 

 

Project Jigsaw

The original goal of this Project was to design and implement a module system focused narrowly upon the goal of modularizing the JDK, and to apply that system to the JDK itself.
More info can be found here http://openjdk.java.net/projects/jigsaw/



Some impressions of devoxx:

A nice presentation was the performance comparison of most commonly used Java web frameworks.

They compared performance and memory usage of GWT, Spring MVC, JSF and Vaadin.

GWT was the big winner followed nearly by Spring MVC. JSF was the worst of all … Vaadin ended on the third position.  Also in memory footprint GWT and Spring MVC were ahead of their pursuers Vaadin and JSF.

Here are some pictures showing the results

 

This will result in the following scaling (infrastructure) costs

Choosing the right technology for your project really can make the difference !

 

 

 

Did you like this? Share it:
Tagged with:  

KBC Android and iOS apps

On September 17, 2011, in new, by Axel

Today the KBC Banking Android and iOS apps are released successfully to the apple app store and the android market. Our company JArchitects was involved in the development process of those apps and we are really proud about the results. Supported devices -Apple Iphone 3G, 3GS, 4 -Apple iPad 1 & 2 -Android phones with [...]

Today the KBC Banking Android and iOS apps are released successfully to the apple app store and the android market.

Our company JArchitects was involved in the development process of those apps and we are really proud about the results.

Supported devices

-Apple Iphone 3G, 3GS, 4

-Apple iPad 1 & 2

-Android phones with android 1.6 or higher

More on http://www.kbc.be/mobile

Did you like this? Share it:
 

Using camera and geolocation on Android

On September 12, 2011, in new, by Axel

Begin september we organized an android workshop in the center of Brussels.  During this workshop we had an overview to the basic principles of android development and an exercise to build a simple birdspotter app. We covered the following topics: Overview of the android platform Activities and Intents GeoLocation to add a location of a [...]

Begin september we organized an android workshop in the center of Brussels.  During this workshop we had an overview to the basic principles of android development and an exercise to build a simple birdspotter app. We covered the following topics:

  • Overview of the android platform
  • Activities and Intents
  • GeoLocation to add a location of a spotted bird
  • Camera, to add a picture of a spotted bird
  • Form input widgets
  • Layout managers

Downloads:

slides: AndroidWorkshop_JArchitects
code:  DemoWorkspace

Did you like this? Share it:
Tagged with:  

How to create an iPhone in-app web browser?

On March 4, 2011, in iphone, new, by Axel

have been looking for a while for an in-app browser without finding exactly what I wanted. I eventually figure that the in-app browser from the three20 library had exactly the features that I wanted : 1) basic navigation, 2)ability to add the browser to my navigation controller and 3) option to open web links in [...]

have been looking for a while for an in-app browser without finding exactly what I wanted. I eventually figure that the in-app browser from the three20 library had exactly the features that I wanted : 1) basic navigation, 2)ability to add the browser to my navigation controller and 3) option to open web links in Safari for better surf if needed.

I slightly changed the code so no need to add the three20 library to your project. I also added a source that you can find HERE. The webview is now called from a UIButton from the Favorite screen.

URL is passed to the webView controller using the – (id)initWithURLPassed:(NSString *)initURL method.

//
//  webView.h
//  Created by Pierre Addoum on 2/17/10.
//   myFirstiPhoneapplication.com
 
@interface webViewController : UIViewController {
 
	UIWebView* _webView;
	UIToolbar* _toolbar;
	UIBarButtonItem* _backButton;
	UIBarButtonItem* _forwardButton;
	UIBarButtonItem* _refreshButton;
	UIBarButtonItem* _stopButton;
	UIBarButtonItem* _activityItem;
	NSURL* _loadingURL;
	NSString *stringURL;
 
}
 
@property(nonatomic,readonly) NSURL* URL;
//@property(nonatomic,retain) UIView* headerView;
@property(nonatomic,retain) NSString *stringURL;
 
- (id)initWithURLPassed:(NSString *)initURL;
- (void)openURL:(NSURL*)URL;
- (void)openRequest:(NSURLRequest*)request;
 
@end
//  webView.m
//  Created by Pierre Addoum on 2/17/10.
//   myFirstiPhoneapplication.com
 
#import "webViewController.h"
 
#define RELEASE_SAFELY(__POINTER) { [__POINTER release]; __POINTER = nil; }
 
@implementation webViewController
@synthesize stringURL;
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (id)initWithURLPassed:(NSString *)initURL {
	if (self = [super init]) {
		NSLog(@"string URL %@ ",initURL);
		if([initURL isEqualToString:@""]){
			[self openURL:[NSURL URLWithString:@"http://www.agwine.com"]];
			self.hidesBottomBarWhenPushed = YES;
		} else{
		[self openURL:[NSURL URLWithString:initURL]];
		self.hidesBottomBarWhenPushed = YES;
		}
 
	}
	return self;
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)backAction {
	[_webView goBack];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)forwardAction {
	[_webView goForward];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)refreshAction {
	[_webView reload];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)stopAction {
	[_webView stopLoading];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)shareAction {
	UIActionSheet* sheet = [[[UIActionSheet alloc] initWithTitle:@"" delegate:self
											   cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil
											   otherButtonTitles:@"Open in Safari", nil] autorelease];
	[sheet showInView:self.view];
}
 
- (void)dealloc {
 
	RELEASE_SAFELY(_loadingURL);
	RELEASE_SAFELY(_webView);
	RELEASE_SAFELY(_toolbar);
	RELEASE_SAFELY(_backButton);
	RELEASE_SAFELY(_forwardButton);
	RELEASE_SAFELY(_refreshButton);
	RELEASE_SAFELY(_stopButton);
	RELEASE_SAFELY(_activityItem);
	RELEASE_SAFELY(stringURL);
 [super dealloc];
}
 
- (void)loadView {
	[super loadView];
	////WEBVIEW////////////////////
	_webView = [[UIWebView alloc] initWithFrame:CGRectMake(0,0,320,460)];
	_webView.delegate = self;
	_webView.autoresizingMask = UIViewAutoresizingFlexibleWidth
	| UIViewAutoresizingFlexibleHeight;
	_webView.scalesPageToFit = YES;
	[self.view addSubview:_webView];
 
	////SPINNER///////////////////
 
	UIActivityIndicatorView* spinner = [[[UIActivityIndicatorView alloc]
										 initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease];
	[spinner startAnimating];
 
	////Button///////////////////
	_activityItem = [[UIBarButtonItem alloc] initWithCustomView:spinner];
 
	_backButton = [[UIBarButtonItem alloc] initWithImage:
[UIImage imageNamed:@"backIcon.png"]
												   style:UIBarButtonItemStylePlain target:self action:@selector(backAction)];
	_backButton.tag = 2;
	_backButton.enabled = NO;
	_forwardButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"forwardIcon.png"] style:UIBarButtonItemStylePlain target:self action:@selector(forwardAction)];
	_forwardButton.tag = 1;
	_forwardButton.enabled = NO;
	_refreshButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:
					  UIBarButtonSystemItemRefresh target:self action:@selector(refreshAction)];
	_refreshButton.tag = 3;
	_stopButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:
				   UIBarButtonSystemItemStop target:self action:@selector(stopAction)];
	_stopButton.tag = 3;
	UIBarButtonItem* actionButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
									  UIBarButtonSystemItemAction target:self action:@selector(shareAction)] autorelease];
 
	UIBarItem* space = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
						 UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease];
 
	_toolbar = [[UIToolbar alloc] initWithFrame:
				CGRectMake(0, 460 - 44, 320, 44)];
	_toolbar.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
	_toolbar.tintColor = [UIColor blackColor];
	_toolbar.items = [NSArray arrayWithObjects:
					  _backButton, space, _forwardButton, space, _refreshButton, space, actionButton, nil];
 
	[self.view addSubview:_toolbar];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)viewDidUnload {
	[super viewDidUnload];
 
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];
 
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)viewWillDisappear:(BOOL)animated {
	// If the browser launched the media player, it steals the key window and never gives it
	// back, so this is a way to try and fix that
	[self.view.window makeKeyWindow];
 
	[super viewWillDisappear:animated];
	_webView.delegate = nil;
 
}
 
#pragma mark -
#pragma mark UIWebViewDelegate
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType {
	RELEASE_SAFELY(_loadingURL);
	_loadingURL = [request.URL retain];
	_backButton.enabled = [_webView canGoBack];
	_forwardButton.enabled = [_webView canGoForward];
	return YES;
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)webViewDidStartLoad:(UIWebView*)webView {
	self.title = @"Loading...";
	if (!self.navigationItem.rightBarButtonItem) {
		[self.navigationItem setRightBarButtonItem:_activityItem animated:YES];
	}
 
	UIBarButtonItem* actionButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
									  UIBarButtonSystemItemAction target:self action:@selector(shareAction)] autorelease];
 
	UIBarItem* space = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
						 UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease];
	_toolbar.items = [NSArray arrayWithObjects:
					  _backButton, space, _forwardButton, space, _stopButton, space, actionButton, nil];
 
	_backButton.enabled = [_webView canGoBack];
	_forwardButton.enabled = [_webView canGoForward];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)webViewDidFinishLoad:(UIWebView*)webView {
	RELEASE_SAFELY(_loadingURL);
 
	self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"];
	if (self.navigationItem.rightBarButtonItem == _activityItem) {
		[self.navigationItem setRightBarButtonItem:nil animated:YES];
	}
	UIBarButtonItem* actionButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
									  UIBarButtonSystemItemAction target:self action:@selector(shareAction)] autorelease];
 
	UIBarItem* space = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:
						 UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease];
	_toolbar.items = [NSArray arrayWithObjects:
					  _backButton, space, _forwardButton, space, _refreshButton, space, actionButton, nil];
 
	_backButton.enabled = [_webView canGoBack];
	_forwardButton.enabled = [_webView canGoForward];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error {
	RELEASE_SAFELY(_loadingURL);
	[self webViewDidFinishLoad:webView];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark -
#pragma mark UIActionSheetDelegate
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
	if (buttonIndex == 0) {
		[[UIApplication sharedApplication] openURL:self.URL];
	}
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (NSURL*)URL {
	return _loadingURL ? _loadingURL : _webView.request.URL;
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)openURL:(NSURL*)URL {
	NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL];
	[self openRequest:request];
}
 
///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)openRequest:(NSURLRequest*)request {
	self.view;
	[_webView loadRequest:request];
}
 
@end
Did you like this? Share it:
Tagged with:  

Initializing system properties using spring IOC

On January 23, 2011, in new, spring, by Axel

This example shows how system properties can be set dynamically using spring IOC Since spring does not support this functionality out-of-the box , the solution shown in this article may help you. In this example system properties can be added dynamically by the developer or administrator without impacting the underlying code. This example can be [...]

This example shows how system properties can be set dynamically using spring IOC
Since spring does not support this functionality out-of-the box , the solution shown in this article may help you.
In this example system properties can be added dynamically by the developer or administrator without impacting the underlying code.
This example can be extended to check if the property was set successfully since the java security policy file should allow setting systems properties

<bean id="systemproperty_initializer" 
   class="com.rolfje.SystemPropertyInitiliazingBean">
   <property name="systemProperties">
      <map>
 
         <entry key="mySystemProperty" value="true"/>
     </map>
   </property>
</bean>

The code for the SystemPropertyInitilizingBean is really a simple list iterator which walks though the map and sets everything as a system property:

public class SystemPropertyInitializingBean 
       implements InitializingBean {
 
        /** Properties to be set */
        private Map systemProperties;
 
        /** Sets the system properties */
        public void afterPropertiesSet() 
               throws Exception {
                if (systemProperties == null || 
                       systemProperties.isEmpty()) {
                        // No properties to initialize
                        return;
                }
 
                Iterator i = systemProperties.keySet().iterator();
                while (i.hasNext()) {
                        String key = (String) i.next();
                        String value = (String) systemProperties.get(key);
 
                        System.setProperty(key, value);
                }
        }
 
        public void setSystemProperties(Map systemProperties) {
                this.systemProperties = systemProperties;
        }
}
Did you like this? Share it:
Tagged with:  

Hidding setter-methods for Spring configuration from the API

On January 12, 2011, in new, spring, by Axel

From the book “Applying Practical API Design” n chapter 5, Do Not Expose More Than You Want section Give the Creator of an Object More Rights, an example is given on how you can avoid that the public setter methods needed for Spring injection become part of the API of the exposed bean. It shows [...]

From the book “Applying Practical API Design”

n chapter 5, Do Not Expose More Than You Want section Give the Creator of an Object More Rights, an example is given on how you can avoid that the public setter methods needed for Spring injection become part of the API of the exposed bean. It shows a technique on how to prevent that anybody else but Spring can call these setter methods! The trick, here demonstrated on the MyConfig class and also applied like that (but more elaborated) on the actual MyConfig, is to define a static final inner class in the bean you expose, holding the setters, and using this inner class to initialize the exposed bean. This way you have separated accessibility control over the bean for the creator (here Spring) and for the client of the bean.

public class MyConfig {
 
private final MyConfig.Configuration configuration;
 
public final static class Configuration {
      private EscapeStrategy escapeStrategy;
 
 
      public final void setEscapeStrategy(EscapeStrategy escapeStrategy) {
         this.escapeStrategy = escapeStrategy;
      }
}
 
 
private MyConfig(Configuration configuration) {
   this.configuration = configuration;
}
 
public final EscapeStrategy getEscapeStrategy() {
  return configuration.escapeStrategy;
}
 
}

Important here to notice is that:

  • The Configuration is final static inner class whose sole purpose is to be used in the constructor by Spring for configuring the bean. Final since that way it cannot be subclassed and you can always extend it in a later release of your API (read about this in the book!). We choose to use the same naming convention for this idiom, i.e. someExposedBeanClass.Configuration.
  • The constructor of the exposed bean is private, Spring can handle this and still create the object
  • Only the Creator, Spring, can configure the bean.
  • Clients of the exposed bean can’t even create an instance of the bean. (Well if Spring can they can too but at least it is very in the face they shouldn’t.)
  • Clients of the exposed bean no longer have access to the setters, so they can not accidently nor incidently call a setter to change a configured bean.

As you can see the actual exposed bean doesn’t expose the setters needed by Spring anymore.

The Spring configuration becomes:

<bean id="myConfig" class="be.jarchitects.config.MyConfig">
  <constructor-arg>
     <bean class="be.jarchitects.config.MyConfig.Configuration">
         <property name="escapeStrategy" ref="defaultEscapeStrategy" />
     </bean>
   </constructor-arg>
</bean>
Did you like this? Share it:
Tagged with:  

Scaffolding Spring MVC, Flex, GWT, Spring Web Flow and iPhone Web Apps

On December 27, 2010, in new, by Axel

Did you like this? Share it:

Did you like this? Share it: