JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications.
http://jsmooth.sourceforge.net/index.php
Friday, March 13, 2009
Converting Jar into Exe
Filter and Ranking attributes in OSGi
In a dynamic system we can have multiple services of same bean type. In that case a consumer of a service can specify a filter to qualify the required bean as follows:
In one bundle publish the service as:
<bean id="helloService" class="com.ivy.example.service.factory.HelloServiceFactory" factory-method="getHelloService" />
<osgi:service ref="helloService" interface="com.ivy.example.service.HelloService">
<osgi:service-properties>
<entry key="product" value="account" />
</osgi:service-properties>
</osgi:service>
To consume the service in another bundle:
<osgi:reference id="helloService" filter="(product=account)" interface="com.ivy.example.service.HelloService" />
<bean id="testData" class="com.ivy.data.TestData" init-method="start" destroy-method="stop">
<property name="helloService" ref="helloService" /> <- dependency injection of the referenced bean
</bean>
Ranking attribute can be specified while advertising a bean:
the one with the higest rank if obtained i case of two similar services
<osgi:service ref="helloService" interface="com.ivy.example.service.HelloService" ranking=”1” >
The ranking attribute is useful for determining the 'best matching' OSGi service in case multiple candidates are available.
If one needs to pin point a service then a filter should be used.
Spring in a Nutshell
Features
The Inversion of Control (IoC) container - For Dependency Injection
Xml Configuration,Java Configeration and Property File Based Configeration
Instantiation using a static factory method,Instance factory method
Injecting dependencies - Constructor Injection,Setter Injection
Dependencies and configuration -Inner beans,Collections (list, set, map, and props elements allow properties)
Other features- depends-on,Lazy-init,Autowiring
Method Injection- for Injecting prototypes into singletons objects
Bean scopes- singleton,prototype,global,session,request,Custom scopes
Lifecycle callbacks- init,destroy
Shutting down the Spring IoC container gracefully in non-web applications
Bean definition inheritance
Container extension points- BeanPostProcessors,PropertyPlaceholderConfigurer etc
Annotation-based configuration- @Required, @Autowired, @Qualifier, @Component, @Service, @Repository
Using filters to customize scanning
Registering a LoadTimeWeaver
Aspect Oriented Programming with Spring
AOP- Aspect,Joint Point,Advice,PointCut,target,Weaving,AOP Proxy
Choosing which AOP declaration style - Spring AOP or full AspectJ
Spring AOP -- @AspectJ or XML for Spring AOP
Spring AOP APIs
Support for AspectJ load-time weaving
Transaction Managemnt
ORM Data Access - Hibernate,JDO,Oracle TopLink,IBatis,JPA etc
Spring MVC
View Technology - JSp & JSTL , Tile,Velocity,FreeMarker,XSTl , Jasper Reports
Spring Remoting
Intergration with Quartz for Scheduling
MethodInvokingFactoryBean - > to call methods of instantiated beans .
Example
<bean id="RequestObject" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" ref="createdBean"/>
<property name="targetMethod" value="methodToBecalled"/>
<property name="arguments">
<map>
<entry key="xxxxxx" value-ref="yyyyyyyy" />
</map>
</property>
</bean>