Wednesday, November 4, 2009
Spring OSGi Bundle App
Posted by
Unknown
at
8:11 PM
0
comments
Thursday, October 22, 2009
Roo Karaf
Just came across Craig Wall post on Roo/OSGi Blueprint/Karaf. I've been fooling around with Roo lately and similar idea of deploying Roo code as OSGi bundle has occurred to me. In particular I like the Roo Rich-Domain-Object concept; the implementation using inter-type declaration and add hosts of functionality to the domain class ... and so on. But I don't care too much about the SpringMVC based web layer personally.
Posted by
Unknown
at
9:00 PM
0
comments
Tuesday, October 20, 2009
Wave real-time collaboration, BPM modeling
This Gravity screencast demo providing real-time, cloud-based collaborative business process modelling within Google Wave. Gravity is a BPMN modeler created with GWT.
Leveraging the collaborative features of Google Wave, all business process modelling activities get propagated in near real-time to all other participants of the Wave. In addition, participants of the Wave can use all other features provided by Google and its developer community to enrich the collaborative modelling experience.Very interesting demo and illustrates how real-time collaboration is going to change the way we do our business. This is just a gleam of the business implication of Wave as a collaboration technology.
Posted by
Unknown
at
7:50 PM
0
comments
Monday, October 19, 2009
Sling in Karaf
Sling in Karaf
There is a contributed bundle, contrib/launchpad/karaf in Sling SVN. The bundle defines a simple Karaf features for Sling.
Instruction is included in README.txt in the bundle project.
Now you can create your custom bundles, create a features definition and use the Karaf Shell to manage your bundles during development. Say you are using declarative service, you can start and stop the provider(s) and test that the consumer(s) are behaving as expected.
Posted by
Unknown
at
11:16 PM
0
comments
Wednesday, October 7, 2009
Building Servicemix 4
Has been working with the SMX4 source lately. A note about the build and run procedure; after building the project (mvn install) at the root level, the distributions (zip/tgz) can be found at ./features/assembly/target/ under the name apache-servicemix-4.1.0-SNAPSHOT.(zip|tar.gz).
Posted by
Unknown
at
8:29 PM
0
comments
Monday, September 21, 2009
Rest and Enterprise Integration
Rest and Enterprise Integration
Posted by
Unknown
at
11:56 PM
0
comments
Monday, January 21, 2008
JNDI with jetty-env.xml
JNDI with jetty-env.xml
It toke me a couple hours to figure out how to setup a JNDI datasource in jetty-env.xml. So hopefully this will save some time for others trying to do the same.
In my case I'm using maven 2 to manage my web project and maven-jetty-plugin to quickly test the application. The project use JPA for ORM and I'm using Spring JPA support for configuration.
So this is what you need to do:
- Tell jetty the location of the jetty-env.xml files in the pom
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.6</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
</configuration>
....
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-plus</artifactId>
<version>6.1.6</version>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-naming</artifactId>
<version>6.1.6</version>
</dependency>
</plugin>
....
</plugins>
....
</build>
- Create the jetty-env.xml configuration file, for example:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/dev</Set>
<New id="LibraryDS" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/LibraryDS</Arg>
<Arg>
<New class="org.apache.commons.dbcp.BasicDataSource">
<Set name="Url">jdbc:mysql://localhost:3306/fornaxDS</Set>
<Set name="DriverClassName">com.mysql.jdbc.Driver</Set>
<Set name="Username">admin</Set>
<Set name="Password">adminpasswd</Set>
<Set name="MaxActive">30</Set>
<Set name="MaxIdle">10</Set>
<Set name="MinIdle">2</Set>
<Set name="MaxWait">5000</Set>
<Set name="MinEvictableIdleTimeMillis">25000</Set>
<Set name="TimeBetweenEvictionRunsMillis">30000</Set>
</New>
</Arg>
</New>
</Configure> - Add a resource-env-ref to your web.xml:
<resource-env-ref>
<resource-env-ref-name>jdbc/LibraryDS</resource-env-ref-name>
<resource-env-ref-type>
javax.sql.DataSource
</resource-env-ref-type>
</resource-env-ref>
- Define your sessionFactory as follow:
<bean class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" id="sessionFactory">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.query.substitutions">true 1, false 0</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.connection.datasource">java:comp/env/jdbc/LibraryDS</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
<prop key="hibernate.current_session_context_class">org.hibernate.context.ManagedSessionContext</prop>
<prop key="hibernate.transaction.auto_close_session">false</prop>
</props>
</property>
....
</bean>
What is not obvious (I did not read the document carefully enough) is that "Object bindings declared in jetty-env.xml will automatically be bound into the java:comp/env namespace",
Posted by
Unknown
at
1:35 AM
4
comments