<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6242794506857855992</id><updated>2012-02-16T01:43:19.912-06:00</updated><category term='embeded.'/><category term='java. spring'/><category term='jcontenedor'/><category term='integration'/><category term='frameworks'/><category term='java'/><category term='jembedded'/><category term='services'/><category term='testing'/><category term='jee'/><category term='j2ee'/><category term='jms'/><category term='ioc'/><title type='text'>jEmbedded  Service Oriented Container (SOC)</title><subtitle type='html'>Service Oriented Container (SOC) focused on creating and managing Services using annotations. Implements Lightweight SOA. More than 20 services are included.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-6837815257844787065</id><published>2011-02-05T01:01:00.000-06:00</published><updated>2011-02-05T01:01:19.111-06:00</updated><title type='text'>Puzzle Arcade Lite v1.1 is now Live!</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;i&gt;Puzzle Arcade Lite v1.1&lt;/i&gt; is now available at the &lt;a href="http://itunes.apple.com/lv/app/puzzle-arcade-lite/id416439754?mt=8&amp;amp;ls=1"&gt;App Store&lt;/a&gt;, or just looking for "&lt;i&gt;Puzzle Arcade Lite"&lt;/i&gt; &lt;i&gt;"Puzzle Arcade Lite"&lt;/i&gt; or &lt;i&gt;"PuzzleArcade"&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;More information at the &lt;a href="http://ssiosgames.blogspot.com/"&gt;game's blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_R2ECN_SRpxs/TUz1CrlLKXI/AAAAAAAAACg/vN5caTPeU0k/s1600/IMG_0107.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://3.bp.blogspot.com/_R2ECN_SRpxs/TUz1CrlLKXI/AAAAAAAAACg/vN5caTPeU0k/s320/IMG_0107.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-6837815257844787065?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/6837815257844787065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=6837815257844787065' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6837815257844787065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6837815257844787065'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2011/02/puzzle-arcade-lite-v11-is-now-live.html' title='Puzzle Arcade Lite v1.1 is now Live!'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_R2ECN_SRpxs/TUz1CrlLKXI/AAAAAAAAACg/vN5caTPeU0k/s72-c/IMG_0107.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5003981647240171480</id><published>2011-01-21T05:44:00.002-06:00</published><updated>2011-01-21T05:47:42.359-06:00</updated><title type='text'>Puzzle Arcade Lite - Iphone &amp; Itouch new game</title><content type='html'>&lt;div&gt;&lt;a href="http://ssiosgames.blogspot.com"&gt;More information at the Game Blog.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5003981647240171480?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5003981647240171480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5003981647240171480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5003981647240171480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5003981647240171480'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2011/01/puzzle-arcade-lite-iphone-itouch-new.html' title='Puzzle Arcade Lite - Iphone &amp; Itouch new game'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4977212465946169149</id><published>2010-01-25T09:54:00.004-06:00</published><updated>2010-01-25T12:16:01.120-06:00</updated><title type='text'>Anatomy of a Service</title><content type='html'>One of the reasons that I developed jEmbedded was my obsession with services :)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From 2002 onwards I haven´t stopped designing and developing using Services (and a DOM of course) to express and group the business logic of applications. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Make no mistake, we are working in Information Technology and that means that the core of our business is the information and how to store and manage it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Of course, we have to sell that information and for that we need fancy screens, complex Ajax frameworks etc... and sometimes because of that we lose the perspective and spent a lot of time making that screens look great and forgetting about to organize and develop the business logic. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The business logic it´s where the real value of the company lies, not the UI. In fact, the business logic could stay forever meanwhile the UI changes (look at the banks for instance). Despite that fact, most of the Companies I worked in the past had their business logic buried into the code, with no organization or services whatsoever. That lead to the disaster as you may well know, when you need to change something, add more rules etc...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So Services and SOA comes to rescue, but what is a Service (I will talk about SOA in another post) ?.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A Service is just a piece of code that can be invoked by a client (being a client an application, a controller, a web service, another service etc..) that express some business logic grouped in a logical fashion. &lt;/div&gt;&lt;div&gt;The service acts as a facade for the client so only a few methods are exposed being each method the solution to a complete use case. For instance, a correct method would be &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;approveInvoice(invoice:Invoice):boolean &lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and a incorrect one would be&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;getCountryDescription():String.&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It´s easy to see the advantages of doing this and I´m sure you are aware of them so I´m not going to explore this further.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is many ways to develop a Service being  the most common way to have an interface and a implementation for that interface. You can do this with &lt;b&gt;jEmbedded&lt;/b&gt; of course but it provides more advanced and simpler ways to do it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Simpler, because you don´t need to implement a interface (you still can do it if you really need it) or any other class just annotations. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Advanced, because you can create your services as an abstract class using composition (reusing other services through the&lt;i&gt; @Compos&lt;/i&gt;e annotation and linking its life cycle to the parent service) or injection (&lt;i&gt;@Inject&lt;/i&gt;)  and letting the SOC container implements the abstract methods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So once you have figured out what part of your business logic you want to expose to the client you can decide which methods will you need and how you are going to implement then. The best way to implement  that methods it´s to use other services that you already have using composition or injection to promote re usability.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So let´s say you want to implement a simple service that evaluates if a list of numbers are odd or not. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It´s obvious we only would need a method:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;public List &lt;boolean&gt; checkOddNumberRS (Object... numbers)&lt;/boolean&gt;&lt;/i&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;And now we can implement the skeleton of the service or if you are following TDD in a strict way the unit test (by the way, &lt;b&gt;jEmbedded&lt;/b&gt; comes with a testing infrastructure for the core and for each service provided based on jUnit):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;@AbstractAnnotatedService (id="evenOddService")&lt;/div&gt;&lt;div&gt;public abstract class EvenOddService {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public List &lt;boolean&gt; checkOddNumbers (Object... numbers) {&lt;/boolean&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That´s good but how can we implement it? We could do it using just a List and the formula (i%2==0) but we´ll use the &lt;b&gt;RulesService&lt;/b&gt; that´s provided with&lt;b&gt; jEmbedded&lt;/b&gt; showing how to use the composition:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;@AbstractAnnotatedService (id="evenOddService")&lt;/div&gt;&lt;div&gt;public abstract class EvenOddService {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;@Compose&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;@AnnotatedRulesService&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public abstract RulesService getRulesService();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public List &lt;boolean&gt; checkOddNumbers (Object... numbers) {&lt;/boolean&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return (List &lt;boolean&gt;)getRulesService().execute(numbers);&lt;/boolean&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;As you can see the composition is made through and abstract method that the container will implement. The only restriction is that the method must  start with &lt;i&gt;get&lt;/i&gt;. The method will be implemented at runtime so you can use it to implement the service methods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All the services that you create using the&lt;b&gt; jEmbedded &lt;/b&gt;container have a properties service that will help you to configure it using a properties file. You can parse attributes of the annotations or variables of the service. You can do that either using the attribute &lt;i&gt;propertiesFile&lt;/i&gt; (from the annotations) or using the&lt;i&gt; AnnotationsPropertiesService&lt;/i&gt;:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;@Compose&lt;/div&gt;&lt;div&gt;@AnnotatedPropertiesService(propertiesFile="META-INF/evenodd/even-odd-service.properties")&lt;/div&gt;&lt;div&gt;public abstract PropertiesService getPropertiesService();&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We need to use the properties service not the &lt;i&gt;propertiesFile&lt;/i&gt; attribute as we need to configure the &lt;b&gt;RuleService &lt;/b&gt;not the the service we are creating.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4977212465946169149?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4977212465946169149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4977212465946169149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4977212465946169149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4977212465946169149'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2010/01/anatomy-of-service.html' title='Anatomy of a Service'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-685197842513600126</id><published>2010-01-15T07:21:00.002-06:00</published><updated>2010-01-15T07:28:10.002-06:00</updated><title type='text'>Learning RoadMap with jEmbedded 0.2</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:arial, sans-serif;font-size:12px;"&gt;Hi everybody,&lt;br /&gt;&lt;p&gt;I have added new examples and refactored the existing ones using the new features of the 0.2 version.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In order to learn how to use the framework here it's the roadmap you could follow:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Start learning the hello world service example, it's easy to follow and it's explained in the wiki. You can learn how to create your custom annotations, etc...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Then you can learn how to create other services using composition with the included services: jetty example, calculator service, even&lt;br /&gt;odd example etc...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Once you are comfortable creating services, composing etc you can learn how to organize the services in layers with the layers example.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- When you know how to create a layer you can learn how to use the container in a web environment (using the previous layer example).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Then you can have a look at the ESB case study that comprises all the previous stuff, services, layers, web environment etc...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I will continue improving the documentation and adding examples, and please feel free to ask everything you need. &lt;/p&gt;&lt;p&gt;Keep in mind that you can create and annotate your services and elements in many ways, I've tried to show this in the examples. There is no just one right way, you can create your custom annotations or not, you can inject fields or methods etc.. depends on the particular case. &lt;/p&gt;&lt;p&gt;Take care&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Adolfo &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-685197842513600126?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/685197842513600126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=685197842513600126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/685197842513600126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/685197842513600126'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2010/01/learning-roadmap-with-jembedded-02.html' title='Learning RoadMap with jEmbedded 0.2'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-8247543195387429563</id><published>2010-01-15T07:12:00.002-06:00</published><updated>2010-01-15T07:20:31.260-06:00</updated><title type='text'>jEmbedded 0.2-RC1 Released</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;I'm happy to announce that I've just released the 0.2 RC1 version of jEmbedded.&lt;br /&gt;&lt;br /&gt;This version is almost a 1.0 version release as it contains most of the features that I had in mind when I started the project but well I have more stuff ready for next versions. In fact this time I pushed the actual design to the limit, so a new re design it's in place.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;New features&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- Services and components now can be created using annotations only&lt;br /&gt;and just an abstract class (or a regular one).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;* Service &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;@AnnotatedAbstractService, @Start, @Stop, @Compose, @Inject, ....&lt;br /&gt;&lt;br /&gt;&lt;i&gt;* Component &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;@AnnotatedAbstractComponent, @Init, @Dispose, @Inject ... &lt;div&gt;&lt;br /&gt;- Layers now can be created extending a @Repository or using the new @Layer annotation (no need to use a repository anymore to declare a layer). The layer will act as another service.&lt;br /&gt;&lt;br /&gt;- A layer and a repository now has Spring as a external IoC provider&lt;br /&gt;by default. Just add the  @AnnotationSpringRepository to the&lt;br /&gt;container.&lt;br /&gt;&lt;br /&gt;- Services, components and beans  annotations now has a new property: propertiesFile, by default it's META-INF/properties-service/properties- service.properties. &lt;/div&gt;&lt;div&gt;This means that now every element can have a different or the same properties file without needing to use the properties service. You can use still it and it will override the&lt;br /&gt;defaults.&lt;br /&gt;&lt;br /&gt;-  @Inject and @Compose can be use without using the ref property if the element is declared in that field or method. You still need to use&lt;br /&gt;the ref property if the referenced element is declared elsewhere.&lt;br /&gt;&lt;br /&gt;- The extension (inherintance) of annotations has been improved.&lt;br /&gt;&lt;br /&gt;- The proxies created (for services and components) now can be more controlled with the properties interfaces and proxyClass.&lt;br /&gt;&lt;br /&gt;- All the services have been refactored to be abstract services (just an abstract class).&lt;br /&gt;&lt;br /&gt;- I have added more examples creating and learning road map that I will explain in another post.&lt;br /&gt;&lt;br /&gt;- The core has been refactored, improved and legacy code has been removed.&lt;br /&gt;&lt;br /&gt;Hope you like it.&lt;br /&gt;&lt;br /&gt;Take care&lt;br /&gt;&lt;br /&gt;Adolfo &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-8247543195387429563?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/8247543195387429563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=8247543195387429563' title='54 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8247543195387429563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8247543195387429563'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2010/01/jembedded-02-rc1-released.html' title='jEmbedded 0.2-RC1 Released'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>54</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5353802045374960579</id><published>2009-12-21T22:52:00.001-06:00</published><updated>2009-12-21T22:59:21.399-06:00</updated><title type='text'>jembedded-0.1.3-Release</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; "&gt;Hi all,&lt;br /&gt;&lt;p&gt;I'm very pleased to announce that I've just released the&lt;br /&gt;jEmbedded-0.1.3 version.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It's much more that a collections of fixes from the previous RC&lt;br /&gt;versions as I have included some features that was intended for the&lt;br /&gt;0.2 version (or higher), but it gives a good preview of the future&lt;br /&gt;direction of the project. In fact I though to label this one as 0.2,&lt;br /&gt;but I didn't for consistency.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;There are 5 very important features included in this release:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Annotation inheritance: Now you can extend any of the core&lt;br /&gt;annotations (@AnnotatedService, @AbstractAnnotatedService...) to&lt;br /&gt;create you own annotations. This means that you can set up your&lt;br /&gt;services directly using annotations like if you were writing and xml&lt;br /&gt;bean in Spring:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Until now you were doing this (still you can of course):&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@AnnotatedService(id="service", resources={WebClient.class})&lt;br /&gt;public class Service extends AbstractCMTService {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Compose(ref="webClient")&lt;br /&gt;private WebClient webClient;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Inject (value=${service.url})&lt;br /&gt;private String url;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100440" class="qt" style="display: block; "&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Now you could do this:&lt;br /&gt;&lt;p&gt;public @interface CustomAnnotatedService {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Class &lt;?&gt; inherits() default @AnnotatedService; // the annotation you&lt;br /&gt;want to extend.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//now you override the attributes you'd like to use (this case from&lt;br /&gt;the @AnnotatedService(id, lazy clazz, etc..),&lt;br /&gt;// the ones that are not overriden will be taken from the parent.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;String id() default "service";&lt;br /&gt;&lt;/p&gt;&lt;p&gt;String clazz() default "org.jsemantic.jembedded.Service";&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Class[] resources() default {WebClient.class};&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//new attributes&lt;br /&gt;String url();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100441" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Now the service looks like this:&lt;br /&gt;&lt;p&gt;@CustomAnnotatedService(url="&lt;a target="_blank" rel="nofollow" href="http://www.google.com/url?sa=D&amp;amp;q=http://code.google.com/p/jembedded&amp;amp;usg=AFQjCNEPTcHgGik-gdFpOoFg9ykz2T6JMA" style="color: rgb(0, 0, 204); "&gt;http://code.google.com/p/jembedded&lt;/a&gt;")&lt;br /&gt;public class Service extends AbstractCMTService {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Compose(ref="webClient")&lt;br /&gt;private WebClient webClient;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Inject (value=${service.url})&lt;br /&gt;private String url;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100442" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Now you can reuse this new annotation whenever you like.&lt;br /&gt;&lt;p&gt;The inheritance mechanism can be used with the core annotations&lt;br /&gt;(AnnotatedService, AbstractAnnotatedService, AnnotatedBean,&lt;br /&gt;AnnotatedComponent..).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you have a look at the source code or to the examples you will see&lt;br /&gt;that I have refactored the code to use this feature when it fits.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- @AbstractAnnotatedService&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is a very and a powerful feature that also will give you an idea&lt;br /&gt;of the future direction of the framework. Now you can create a Service&lt;br /&gt;using an abstract class (similar to the @AbstractService) without&lt;br /&gt;needing to extend or implement anything (not even the Service&lt;br /&gt;interface). You can mix regular and abstract classes and injecting or&lt;br /&gt;composing fields.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is the old example of WebServer refactored to use the new&lt;br /&gt;features (also custom and inheritance annotaions).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@AnnotatedWebServer&lt;br /&gt;public abstract class WebServer {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Start&lt;br /&gt;        public void start() {&lt;br /&gt;                getJettyService().start();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Stop&lt;br /&gt;        public void stop() {&lt;br /&gt;                getJettyService().stop();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        public void setPort(String port) {&lt;br /&gt;                getJettyService().setPort(port);&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        //Composition, WebServer will handle the jettyService lifeCycle&lt;br /&gt;        @Compose(ref="httpService")&lt;br /&gt;        public abstract JettyService getJettyService();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Compose(ref = "propertiesService")&lt;br /&gt;        @PropertiesService(propertiesFile="META-INF/web-server/web-&lt;br /&gt;server.properties")&lt;br /&gt;        public abstract&lt;br /&gt;org.jsemantic.jirepository.core.services.properties.PropertiesService&lt;br /&gt;getPropertiesService();&lt;br /&gt;        // end of service composition&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        //Added functionality, you can create dynamic invoking methods from&lt;br /&gt;any service&lt;br /&gt;        //that you may have in the container&lt;br /&gt;        @ImplementedBy(ref="httpService", refMethodName="getServerContext")&lt;br /&gt;        public abstract ServletContext getServletContext();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100443" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;If you read the code you would notice:&lt;br /&gt;&lt;p&gt;- The abstract methods are implemented in real time, so you can use&lt;br /&gt;then in the regular implemented methods.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- There are 2 new annotations @Start and Stop that replaces  the old&lt;br /&gt;startService and stopService.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- The service can be cast to Service (even though it does not need to&lt;br /&gt;implement it).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- If you like the PropertiesService can be declared at class level,&lt;br /&gt;this is just a choice, you have as much freedom as usual.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- @Compose new annotation: works like @Inject, but ties the lifecycle&lt;br /&gt;of the composed service to the parent Service, not the container. In&lt;br /&gt;other words, the composed service will be started and stopped by the&lt;br /&gt;parent service. For example, if you declare the propertiesService at&lt;br /&gt;class level the propertiesService will be handled by the container,&lt;br /&gt;nor by the WebServer:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@AnnotatedWebServer&lt;br /&gt;@PropertiesService(propertiesFile="META-INF/web-server/web-&lt;br /&gt;server.properties")&lt;br /&gt;public abstract class WebServer {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Start&lt;br /&gt;        public void start() {&lt;br /&gt;                getJettyService().start();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Stop&lt;br /&gt;        public void stop() {&lt;br /&gt;                getJettyService().stop();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        public void setPort(String port) {&lt;br /&gt;                getJettyService().setPort(port);&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        //Composition, WebServer will handle the jettyService lifeCycle&lt;br /&gt;        @Compose(ref="httpService")&lt;br /&gt;        public abstract JettyService getJettyService();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100444" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;In the case of the jettyService it makes sense its lifecyle it's tied&lt;br /&gt;to the WebSever but you can also do this:&lt;br /&gt;&lt;p&gt;@AnnotatedWebServer&lt;br /&gt;@PropertiesService(propertiesFile="META-INF/web-server/web-&lt;br /&gt;server.properties")&lt;br /&gt;public abstract class WebServer {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;       @Inject (you can use Compose here too), here the container will&lt;br /&gt;handle the jettyService&lt;br /&gt;        private JettyService jettyService;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Start&lt;br /&gt;        public void start() {&lt;br /&gt;                jettyService.start();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Stop&lt;br /&gt;        public void stop() {&lt;br /&gt;                jettyService.stop();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        public void setPort(String port) {&lt;br /&gt;                jettyService.setPort(port);&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;       //Added functionality, you can create dynamic invoking methods&lt;br /&gt;from any service&lt;br /&gt;        //that you may have in the container&lt;br /&gt;        @ImplementedBy(ref="httpService", refMethodName="getServerContext")&lt;br /&gt;        public abstract ServletContext getServletContext();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100445" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;As you can see you have a lot of freedom to compose or create new&lt;br /&gt;Services with the new features, you can annotate at class, method or&lt;br /&gt;field leve, using abstract or regular methods.&lt;br /&gt;&lt;p&gt;You can also provide a interface for the service if you like or need&lt;br /&gt;it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The @AnnotatedWebServer ann looks like this:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;public @interface AnnotatedWebServer {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        /**&lt;br /&gt;         *&lt;br /&gt;         * @return&lt;br /&gt;         */&lt;br /&gt;        String id() default "webServer";&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        /**&lt;br /&gt;         *&lt;br /&gt;         * @return&lt;br /&gt;         */&lt;br /&gt;        Class&lt;?&gt; inherits() default AbstractAnnotatedService.class;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        /**&lt;br /&gt;         *&lt;br /&gt;         * @return&lt;br /&gt;         */&lt;br /&gt;        Class&lt;?&gt;[] resources() default { JettyServiceImpl.class };&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100446" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;- Integration testing framework integrated within the container and&lt;br /&gt;services (jIntegration therefore is depecrated):&lt;br /&gt;&lt;p&gt;I've always felt that the testing process should be more integrated&lt;br /&gt;into the development process so what I did was to include the testing&lt;br /&gt;framework within the core framework and the services so now it's&lt;br /&gt;availble at any time (I left the jUnit4 dependency optional though).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So basically now the core framework has an Assert class with some&lt;br /&gt;useful classes and the same happens with the services.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For instance the core has Assert.getService(), Assert.existService()&lt;br /&gt;and so on.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In order to setup a unit test class (or integration test class) you&lt;br /&gt;need to use @Container  and the @RunWith annotation. Keep in mind that&lt;br /&gt;the Asserts are static classes so the created container must be&lt;br /&gt;attached to the current thread, so you need to use the&lt;br /&gt;prototype_by_thread annotation.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@RunWith(IntegrationTestClassRunner.class)&lt;br /&gt;@Container(instanceType=ContainerInstanceType.PROTOTYPE_BY_THREAD)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@WebClient&lt;br /&gt;@Include(resources=WebServer.class)&lt;br /&gt;public class IntegrationWebServerTest {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        //dispose the container between test methods invocations, if you want&lt;br /&gt;to reuse the same within invocations, delete this method&lt;br /&gt;        @After&lt;br /&gt;        public void dispose() {&lt;br /&gt;                ContainerHolder.releaseCurrentThreadContainer();&lt;br /&gt;        }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Test&lt;br /&gt;        public void test() {&lt;br /&gt;                WebServer server = (WebServer)Assert.getService("webServer");&lt;br /&gt;                assertNotNull(server);&lt;br /&gt;       }&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_100447" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;As you see you don't need to create a container yourself,one will be&lt;br /&gt;created for you by the testing framework.&lt;br /&gt;&lt;p&gt;- Ruby now it's a separate service and services can be fully&lt;br /&gt;implemented with it. Have a look at the new CalculatorService example&lt;br /&gt;that mix a complete ruby service with a java one.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- New Spring AOP Service.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Core and services Refactored.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have refactored some parts of the core but I will work more on this.&lt;br /&gt;The services and annotations have been refactored as well and adapted&lt;br /&gt;to the new features.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Examples and case study.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have completely refactored them and adapted to the new features,&lt;br /&gt;trying always to simplify as much as possible.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The case study has been completely refactored and simplified (I have&lt;br /&gt;removed GWT in this version), usign the new features and services. I'm&lt;br /&gt;writing a complete paper about this, but I think you will find easier&lt;br /&gt;to understand this time.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- RoadMap&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As you can see a lot of effort has been put into this release, not&lt;br /&gt;only to improve the past version but to look to into the future.&lt;br /&gt;The @AsbtractAnnotateService and the annotation inheritance are 2&lt;br /&gt;powerful features and examples of this. The idea is to implement all&lt;br /&gt;the services and elements without any asbtract class (like&lt;br /&gt;AbstractCMTService) and make the services more intelligent.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Versions 0.1.3 to 0.2 - Maintenance and fixes. Improve Services and&lt;br /&gt;examples . Complete documentation.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Versions 0.2 -&gt;1.0 - New features (removing the need of abstract&lt;br /&gt;services etc) and new services. More scripting languages.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As I'm designing the new versions, please any features you think it&lt;br /&gt;would be nice to have please let me know.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Special thanks to all of you that downloaded jEmbedded and helped me&lt;br /&gt;to improve it. Your comments are always appreciated.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I will dedicate the next few weeks to upto date the documentation.&lt;br /&gt;Please be patience, I promise I will do it :) &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5353802045374960579?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5353802045374960579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5353802045374960579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5353802045374960579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5353802045374960579'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/12/jembedded-013-release.html' title='jembedded-0.1.3-Release'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4727066132502882560</id><published>2009-10-01T15:02:00.002-06:00</published><updated>2009-10-01T15:10:21.966-06:00</updated><title type='text'>jEmbedded - 0.1.3. RC-1 - Weekend Release</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12px; "&gt;Hi,&lt;br /&gt;&lt;p&gt;Yes I know  I've skipped  2 versions :) but the work has been  progressing so well that I decided to wait a bit and release something more complete.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So I'm releasing a rc this weekend, it's still a bit rough on the edges but it contains most of the features that I'd wanted and works  pretty well. Also it will fit with the new documentation that I''m going to start writing this weekend as well.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;New features:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Dynamic Injection/creation of Services: create services just with an&lt;br /&gt;interface + annotations, no implementation neded, in case you are&lt;br /&gt;just composing services:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Repository(id = "serviceLayer",  iocProviders = { "springRepository" }, parent = "persistenceLayer")&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@AnnotatedService(id = "serviceLayer", resources= {InvoicingServiceImpl.class})&lt;br /&gt;&lt;/p&gt;&lt;p&gt;public interface ServicesLayer extends Service {&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @Inject(ref="invoicingService")&lt;br /&gt;        public InvoicingService getInvoicingService();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;        @SpringRepository(configurationFile = "META-INF/invoices-app/layers/ persistence-layer.xml")&lt;br /&gt;        public Service getSpringRepository();&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="qhide_91367" class="qt" style="display: block; "&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;- Complete Spring integration: a service exporter (from jembedded) into the spring context, @Inject can reference a spring bean, a @SpringProvider annotation that will load a context as a service and can be referenced as well., a ContainerListener for web applications..&lt;br /&gt;etc etc..&lt;br /&gt;&lt;p&gt;- More services: Validation-Service (using annotations, oval), dao-service, hibernate-service, agent-service, proxy-service.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- A payload validator for mule using the the validator-service, so you can validate your payload with annotations.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- More examples including an esb/integration case study including spring/spring-mvc, jms, mule, rules etc.. I think it shows very well what you can do with jEmbedded. Also it's an original cas study, it's not the typical aggregator of responses you can find all over the net.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- jIntegration-Test 1.0 (see the web services post).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Fixes and more stuff.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Well I think it's pretty good for this version.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Adolfo&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4727066132502882560?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4727066132502882560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4727066132502882560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4727066132502882560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4727066132502882560'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/10/jembedded-013-rc-1-weekend-release.html' title='jEmbedded - 0.1.3. RC-1 - Weekend Release'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4865704945129303320</id><published>2009-09-20T11:46:00.004-06:00</published><updated>2009-09-20T12:44:18.829-06:00</updated><title type='text'>And after the holidays...</title><content type='html'>I resumed my day job this last week and it wasn't very bad :) at all . So  this weekend I resumed my work on jEmbedded. First of all, thanks to all the people who took the time to try it and sent me their comments, you have helped me a lot. Even though it was a early release it has given me a lot of insight in which direction I should go.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I decided to release the version 0.1.1 in the next few days that will be focused in:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Improved Spring Integration: The @Inject annotation will be able to reference a Spring Bean and more.&lt;/li&gt;&lt;li&gt;Improved Documentation.&lt;/li&gt;&lt;li&gt;Improved Web Support.&lt;/li&gt;&lt;li&gt;More examples: I'm adding several examples that I'm working on as a complete example of a Invoicing System including Spring MVC integration and a hierarchical  services layer (you can have an early peek on the project website). That will show a lot of the jEmbedded features as creating and composing a service layer in a few minutes. Other examples will include jIntegrationTest-0.1, how to package services with jEmbedded etc...&lt;/li&gt;&lt;li&gt;Bug fixes and code refactoring.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4865704945129303320?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4865704945129303320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4865704945129303320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4865704945129303320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4865704945129303320'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/09/and-after-holidays.html' title='And after the holidays...'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5846626543177683972</id><published>2009-09-01T21:28:00.005-06:00</published><updated>2009-09-01T23:05:32.654-06:00</updated><title type='text'>jEmbedded - FAQ III</title><content type='html'>Well I'm going abroad for my holidays (it's time at last !!) so I won't be writing in a while.&lt;br /&gt;&lt;br /&gt;I've just created a new discussion group &lt;a href="http://groups.google.com/group/jembedded-discussion-group?lnk=gcimh"&gt;jEmbedded Discussion Group&lt;/a&gt; so you are free to join and post your questions, requests etc...&lt;br /&gt;&lt;br /&gt;After holidays want I'm going to do it's to write down a full documentation and upload more examples.&lt;br /&gt;&lt;br /&gt;In the meantime here it's more Q/A:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* What's the difference between the @Include and @Repository annotations?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With  these two annotations resources can be added to the container but in a different manner as @Repository will create a new container for the resources and @Include will just add them to the current container (default container in case you haven't provided the @Repository ann).&lt;br /&gt;&lt;br /&gt;Use @Include if you only want to add some extra resources to the container and  not to create a new one.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* Spring Integration, how to do it?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are many different ways to do this.  I've provided a spring-support-module  that will help you, but  in this stage it's not very comprehensive as I've focused to provide a stand alone IoC container.&lt;br /&gt;&lt;br /&gt;In this module a FactoryBean class is provided so an instance of the embedded container can be  stored into the spring-context. Then you can inject the container in any bean you want, get the container from Spring or just use ContainerHolder.getCurrentThreadContainer().&lt;br /&gt;Please have a look at the spring-integration-module and the embedded-database example for more information.&lt;br /&gt;&lt;br /&gt;You  may ignore the integration module and write your own FactoryBean:&lt;br /&gt;&lt;br /&gt;@Container(instanceType=&lt;div id=":122" class="ii gt"&gt;ContainerInstanceType.xxxx)&lt;br /&gt;@Repository(id="database-&lt;wbr&gt;service-layer", resources={&lt;wbr&gt;EmbeddedDatabaseImpl.class})&lt;br /&gt;public class EmbeddedDatabaseFactory implements FactoryBean {&lt;br /&gt;&lt;br /&gt;  public Object getObject() throws Exception {&lt;br /&gt;      return EmbeddedHandlerFactory.&lt;wbr&gt;getInstance(getClass());&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public Class getObjectType() {&lt;br /&gt;      return EmbeddedHandler.class;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public boolean isSingleton() {&lt;br /&gt;      return false;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Then you can retrieve the container like this:&lt;br /&gt;&lt;br /&gt;ApplicationContex appContex; //SpringContext&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;EmbeddedHandler handler = (EmbeddedHandler)appContext.getBean("factory-bean-id");&lt;br /&gt;&lt;br /&gt;Finally, you can create the container in any spring bean you'd like. Of course watch out what kind of bean it is (singleton, prototype etc...)&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;* Can the annotation @Inject be used to reference a Spring bean?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No at this moment, but you can inject the container to any spring bean or just accessing the container with ContainerHolder. I will add this feature in the near future.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5846626543177683972?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5846626543177683972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5846626543177683972' title='147 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5846626543177683972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5846626543177683972'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/09/jembedded-faq-iii.html' title='jEmbedded - FAQ III'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>147</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-576574460896076658</id><published>2009-08-31T21:50:00.012-06:00</published><updated>2009-09-01T15:15:05.535-06:00</updated><title type='text'>jEmbedded FAQ II</title><content type='html'>Here there are more questions that I kept being asked about jEmbedded:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* What's the best way to use jEmbedded in a web environment?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Depends on how are you planning to use the container as a singleton, prototype or instance by thread.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Singleton&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you are planning to use it as a one single container to serve the whole web app you can create and dispose the instance in a ServletContext listener:&lt;br /&gt;&lt;br /&gt;import javax.servlet.ServletContextListener;&lt;br /&gt;import javax.servlet.ServletContextEvent;&lt;br /&gt;import javax.servlet.*;&lt;br /&gt;&lt;br /&gt;@Container(instanceType=SINGLETON_VM)&lt;br /&gt;public  class EmbeddedContainerListener implements ServletContextListener {&lt;br /&gt;{&lt;br /&gt;private ServletContext context = null;&lt;br /&gt;&lt;br /&gt;private EmbeddedHandler handler = null;&lt;br /&gt;&lt;br /&gt;public void contextDestroyed(ServletContextEvent event)&lt;br /&gt;{&lt;br /&gt; this.context = null;&lt;br /&gt; handler.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void contextInitialized(ServletContextEvent event)&lt;br /&gt;{&lt;br /&gt; this.context = event.getServletContext();&lt;br /&gt;&lt;br /&gt; handler = EmbeddedHandlerFactory.getInstance(EmbeddedContainerListener.class, *.class);&lt;br /&gt; handler.start();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In order to access the container from any part of the web app:&lt;br /&gt;&lt;br /&gt;EmbededHandler handler = ContainerHolder.getCurrentThreadContainer();&lt;br /&gt;&lt;br /&gt;If you are using Spring, you can use an implementation of the ContainerListener to create the contaner.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;As an instance per thread&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's say that you need a fresh container per request, in a MCV controller for instance.  In order to do that just create  and dispose the instance there.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Prototype instances.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can create and dispose these instances anywhere but remember to dispose them!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* What are the differences between @Container and @Repository annotations.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@Container is just an annotation to control how the instances are being created when EmbeddedHandlerFactory.getInstance() is invoked.&lt;br /&gt;&lt;br /&gt;@Repository is a way to create logical collections of services, components etc, for example different layers of services or components (as you can create them as a hierarchy).&lt;br /&gt;&lt;br /&gt;This is useful even when you don't want to create complex collections (as a tree of services) just as an entry point for the container:&lt;br /&gt;&lt;br /&gt;@Repository (id="baseServicesRepo", resources={*.class})&lt;br /&gt;public class RepoEntryPoint {&lt;br /&gt;&lt;br /&gt;handler = EmbeddedHandlerFactory.getInstance(RepoEntryPoint.class);&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now for instance lets say you need to create a different group of services that need to reference the former repository for composition:&lt;br /&gt;&lt;br /&gt;@Repository (id="extendedServices", resources={*.class}, parent="myRepo")&lt;br /&gt;&lt;br /&gt;Now the new container would have access to the to the parent repository as well.&lt;br /&gt;&lt;br /&gt;I will be creating a full documentation in September, some web support out of the box and more examples (after my holidays).&lt;br /&gt;&lt;br /&gt;Any feedback and comments are welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-576574460896076658?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/576574460896076658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=576574460896076658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/576574460896076658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/576574460896076658'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/08/jembedded-faq-ii.html' title='jEmbedded FAQ II'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-3042620635302063697</id><published>2009-08-29T01:05:00.016-06:00</published><updated>2009-08-30T23:54:59.754-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='embeded.'/><category scheme='http://www.blogger.com/atom/ns#' term='services'/><category scheme='http://www.blogger.com/atom/ns#' term='ioc'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>jEmbedded F.A.Q</title><content type='html'>First of all thanks to the people who have sent me emails asking about &lt;span style="font-style: italic;"&gt;jEmbedded&lt;/span&gt; and of course to those who like it :)&lt;br /&gt;&lt;br /&gt;All the feedback are highly appreciated so I can improve it in the next versions.&lt;br /&gt;&lt;br /&gt;I reckon that the documentation now is quite scarce but I wanted to release before I went on holidays (I will improved it a lot though) so I did that compromise. Also there are some features that are not explained in the provided documentation (many actually)&lt;br /&gt;&lt;br /&gt;So I will try to answer here some of the questions I have received.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight: bold;"&gt;What is this framework good for?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well first of all it's just an &lt;span style="font-style: italic;"&gt;IoC container&lt;/span&gt; with all that implies, but more importantly it allows you to manage your application elements (definition, creation, composing, starting, stopping, releasing) in a easy and fast way (using annotations, no need of XML or other additional configuration).&lt;br /&gt;&lt;br /&gt;It provides the semantics or annotations needed to promote a bean or a POJO to a service, to  a component, or to a entity managing their life cycle (if you choose that). For example, the container will start and stop the services for you.&lt;br /&gt;&lt;br /&gt;These additional semantics provide not only a life cycle to the POJOS, or a contract but also additional features as accessing to the executing environment and a chance to be externally managed (through JMX,  I'm already working on a console).&lt;br /&gt;&lt;br /&gt;I would say that the provided embedded services and the feature of easy composition (creating a new service using other services)  it's quite useful. In fact,  it's how this framework was born.&lt;br /&gt;For example, you can get the jetty-service and create and web server of your own using just composition. Or a rules-server for your application using the rules-service provided,  executing a set of business rules for the rest of the services.&lt;br /&gt;&lt;br /&gt;Finally,&lt;span style="font-style: italic;"&gt; jEmbedded&lt;/span&gt; is an implementation of another framework of mine, &lt;span style="font-style: italic;"&gt;jRepository&lt;/span&gt; that allows you to create your own IoC customized container (included in the distribution).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight: bold;"&gt;Can jEmbedded be used in a web application?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Of course you can,  in the same way you would use it in a standalone application. (I designed it with the 2 environments in mind). You have to be careful though, in the way that the container are created or disposed. This is managed by the annotation :&lt;br /&gt;&lt;br /&gt;@Container(ContainerInstanceType instanceType)&lt;br /&gt;&lt;div id=":6l" class="ii gt"&gt;&lt;br /&gt;public enum ContainerInstanceType {&lt;br /&gt;SINGLETON_VM,  PROTOTYPE_VM, PROTOTYPE_BY_THREAD;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;If you don't provide this annotation by default the way of creating instances it's PROTOTYPE_BY_THREAD (a new instance per thread) so if you are creating an instance of &lt;span style="font-style: italic;"&gt;jEmbedded&lt;/span&gt; inside a MVC Controller, there is a good chance that you are creating a new container with each request. In this case use the SINGLETON_VM property to have one container per VM.&lt;br /&gt;&lt;br /&gt;Another way of getting the handler to the container is using the following static method:&lt;br /&gt;&lt;br /&gt;EmbededHandler handler = ContainerHolder.getCurrentThreadContainer();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-3042620635302063697?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/3042620635302063697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=3042620635302063697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3042620635302063697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3042620635302063697'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/08/jembedded-faq.html' title='jEmbedded F.A.Q'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5143929501068255320</id><published>2009-08-20T11:28:00.006-06:00</published><updated>2009-08-20T12:03:22.698-06:00</updated><title type='text'>jEmbedded-0.1 - Release</title><content type='html'>Well at last!,  after 6 months of work (well just a bit everyday, more the weekends) I'm ready to release a very complete first version of jEmbedded.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;jEmbedded bornt out of the necessity to use an IoC container on the go, lighter, faster and easier. Spring is great, but it takes some time to setup all the beans, xml-schemas (also you can use annotations, but still). For my purposes, using embedded services or just services  it was a bit too much,  and I wanted just to provide some annotations, some configuration data and get it running.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In fact, it was the core of the first version of my testing framework (jIntegration-Test), but I found myself writing a lot of xml schemas for each service or association classes something I wanted to avoid for the sake of simplicity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is more, I was looking for something more specific and Spring or  Guice are very generic,  everything is a POJO for then. I wanted to have more control of my services and have different kind of POJOS:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* Services (CMT / Unmanaged)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Lifecycle is managed by the container or not.&lt;/div&gt;&lt;div&gt;- Can be started / stopped. Initialized / disposed.&lt;/div&gt;&lt;div&gt;- The context is injected by the container and gives access to the running enviroment. &lt;/div&gt;&lt;div&gt;- A service could contain and manage services, components, beans and entities.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* Components (CMT/ Unmannaged)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;- Lifecycle is managed by the container or not.&lt;/div&gt;&lt;div&gt;- Can be initialized / disposed.&lt;/div&gt;&lt;div&gt;- The context is injected by the container and gives access to the running enviroment. &lt;/div&gt;&lt;div&gt;- A component could contain and manage components, beans and entities.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, A CMT Service. This service will be started and stopped by the container. Also initialized and disposed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;@AnnotatedService(id="testService", resources=TestBean.class) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;public class TestService extends AbstractCMTService {    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 13px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;@Inject  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private TestBean testBean = null;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 13px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public void test() {           &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;testBean.printMsg();         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; font-size: 13px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;In order to have access to the service and get the container started:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;EmbeddedHandler handler= EmbeddedHandlerFactory.getInstance(TestService.class); handler.start(); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;TestService testService = (TestService) handler.getService("testService")&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;testService.test(); &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  white-space: pre-wrap; "&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;handler.stop();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you can see, my main concern has been keeping it easy and fast to use as it should be with embedded services.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More information will be found in the project &lt;a href="http://code.google.com/p/jembedded"&gt;homepage&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://code.google.com/p/jembedded/downloads"&gt;jembedded-0.1-release&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5143929501068255320?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5143929501068255320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5143929501068255320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5143929501068255320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5143929501068255320'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/08/jembedded-01-release.html' title='jEmbedded-0.1 - Release'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-448642166088876617</id><published>2009-05-15T00:08:00.004-06:00</published><updated>2009-05-31T08:43:21.023-06:00</updated><title type='text'>jIntegration-Test-0.9.3-SNAPSHOT version released.</title><content type='html'>&lt;a href="http://code.google.com/p/jembedded/downloads/list"&gt;jIntegration-Test-0.9.3-SNAPSHOT&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jembedded/wiki/UserGuide"&gt;User Guide&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-448642166088876617?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/448642166088876617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=448642166088876617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/448642166088876617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/448642166088876617'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/05/jintegration-test-085-version-released.html' title='jIntegration-Test-0.9.3-SNAPSHOT version released.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-6064404723528851100</id><published>2009-04-05T06:55:00.024-06:00</published><updated>2009-04-05T09:54:27.048-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='integration'/><category scheme='http://www.blogger.com/atom/ns#' term='jms'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='java. spring'/><title type='text'>jIntegrationTest - version 0.7.1 notes.</title><content type='html'>As I've just released the &lt;a href="http://jembedded.googlecode.com/files/jintegration-test-0.7.1-SNAPSHOT.zip"&gt;0.7.1 version of jIntegration-Test&lt;/a&gt; (aka JEmbedded) I though I should write down some brief notes about it.&lt;br /&gt;&lt;br /&gt;First of all I've changed the name to something more intuitive than jEmbedded because it's main purpose its integration testing (even thought is based on the concept of embedding servers).&lt;br /&gt;&lt;br /&gt;Secondly, this is still a work in progress so in every version I'm releasing I'm changing many things: refactoring out code, adding new features, refactoring configuration files, adding new services... etc etc.. always having in mind how to make it easier to use.&lt;br /&gt;&lt;br /&gt;So expect more changes and new functionality like more testing methods for  every integration test unit. For example, a test method  for every HTTP result code: 500, 400..&lt;br /&gt;&lt;br /&gt;Of course working this way has some drawbacks but I think it's worth the effort.&lt;br /&gt;&lt;br /&gt;The last integration unit I've added is one to test JMS applications using an ActiveMQ embedded server. At the moment you can test destination creation, sending messages etc.. expect more functionality for this integration unit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;@JMSIntegrationConfigurationTest( connector = "tcp://localhost:61666",&lt;br /&gt;jmx = "false")&lt;br /&gt;public class EmbeddedJMSIntegrationTest extends AbstractJMSIntegrationTest {&lt;br /&gt;        public void testDestination() {&lt;br /&gt;                 testDestinationCreation("TEST.TEST", "tcp://localhost:61666");    &lt;br /&gt;        }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Despite all of that,  still it's quite functional and I'm using it myself at the moment in real life projects with a degree of success.&lt;br /&gt;&lt;br /&gt;In this release I've put some extra care and effort to release something you wouldn't have any problems to compile and use. In order to do that, I've included all the dependencies that you can't get from a external mvn repository. Just copy the folder into your own mvn repository.&lt;br /&gt;&lt;br /&gt;Also in the src directory you can find a ready to compile and install project.&lt;br /&gt;&lt;br /&gt;Any problems, just drop me and email or leave a comment here.&lt;br /&gt;&lt;br /&gt;You can read the complete installation notes in the &lt;a href="http://code.google.com/p/jembedded/wiki/InstallNotes"&gt;project's wiki.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-6064404723528851100?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/6064404723528851100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=6064404723528851100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6064404723528851100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6064404723528851100'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/04/jintegration-test-version-07-notes.html' title='jIntegrationTest - version 0.7.1 notes.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-8867462565322609592</id><published>2009-02-14T23:43:00.029-06:00</published><updated>2009-04-05T09:51:39.405-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='integration'/><category scheme='http://www.blogger.com/atom/ns#' term='jembedded'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>jIntegrationTest  Framework.</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;The Framework.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jembedded"&gt;jIntegrationTest&lt;/a&gt; comes from my own experience working in many projects and trying to figure out how could I do the integration tests easier. Usually you will find two approaches: using mocking frameworks or just deploying the application and testing it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Mocking Approach.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One approach is using one of the many *.Mock.* frameworks out there. It's a valid one and it works (easy for POJO's, no that easy if you want to mock something more complex as HTTP request for example) but you probably will found yourself writing a lot of code and spending a lot of time just to replicate the behaviour of the application.&lt;br /&gt;&lt;br /&gt;Mocking as you are developing and designing it's OK, as you don't have the actual code or HTML's or pages (that's the whole point of mocking). But at the end of the day, when you have the real code it feels lacking doing the integration testing through all that mocking infrastructure as you are not getting most of the real errors you would get in the real environment (application, system, configuration, environment, dependencies errors etc...). The good thing about this approach is that fits easily with automatic testing and continuous integration.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Just Deploy and test Approach.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The other approach and sadly the most common one it's just doing the deployment and see what happens. OK the deployment fails because the XML descriptors are wrong or a file it's missing or we are getting a null pointer. Fix it, compile, test and deploy again. And so on. At last the deployment works, start testing the application, now one SQL sentence is failing. You do it again.. and again :). Now everything seems to work but now one new component is added and the deployment process fails again :(.&lt;br /&gt;&lt;br /&gt;Well it's clear how many time it's wasted following this approach and what is worst, you are never sure that you are not breaking something  when you add something new having to do expensive regression tests. It's obvious this approach it's no very easy to automatize.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why to use Embedded Servers and jIntegrationTest.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point it's when the idea of using embedded servers (and of course &lt;a href="http://code.google.com/p/jembedded"&gt;jIntegrationTest&lt;/a&gt;) comes handy as you won't have any of the problems of the former approaches:&lt;ul&gt;&lt;li&gt;Don't need to replicate the behaviour of the application, just test the expected real results, being a number, a HTTP response, the creation of a component...&lt;/li&gt;&lt;li&gt;Don't need to deploy the application to test it, just run the the integration test units from Eclipse, maven, ant etc.. getting an instant feedback.&lt;/li&gt;&lt;li&gt;Don't need to do regression testings as the process can be automatized.&lt;/li&gt;&lt;/ul&gt;The advantages of using &lt;a href="http://code.google.com/p/jembedded"&gt;jIntegrationTest&lt;/a&gt; are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You get all the above advantages.&lt;/li&gt;&lt;li&gt;Many embedded servers out of the box: HTTP (Jetty), DB (HSQLDB), Web Services (Apache CXF), Spring (Container and MVC), JMS(ActiveMQ) and RMI.&lt;/li&gt;&lt;li&gt;Easy configuration relying on defaults and annotations (almost none).&lt;/li&gt;&lt;li&gt;Based on JUnit so it's very easy to get into.&lt;/li&gt;&lt;li&gt;Many Integration Test Units out of the box: HTTP, DB, Spring, Spring MVC, JSF, Web Services....&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;A quick example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can find the complete application and tests  in the folder examples/invoices of the &lt;a href="http://code.google.com/p/jembedded"&gt;jIntegrationTest&lt;/a&gt; release.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;@HttpIntegrationConfigurationTest( port=9006, root="/test", src="src/main/webapp/")&lt;br /&gt;public class InvoicesControllerTest  extends AbstractIntegrationHttpTest {&lt;br /&gt;&lt;br /&gt;  public void testController() throws Exception {&lt;br /&gt;      String uri = "http://localhost:9006/test/invoice.do";&lt;br /&gt;      assertResponseStatusOK(uri);&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this test we are testing an actual controller of the application which is responsible of invoking a service that calculates the invoice.&lt;br /&gt;&lt;br /&gt;As we are testing a controller we need to use a HTTP embedded server, which configuration it's very easy, just need a port, a web root and the root location of the web application in your file system.&lt;br /&gt;&lt;br /&gt;It's just a simple test in which the framework will execute a request to the indicated URL, in this case the invocation URL of the controller, just if someone would have pressed a button to generate the invoice. If the server returns an OK (200 code) the test will pass.&lt;br /&gt;&lt;br /&gt;Of course, if there is any problem in your web application you will get an error and you could fix it right away without having to deploy again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-8867462565322609592?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/8867462565322609592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=8867462565322609592' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8867462565322609592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8867462565322609592'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/02/jembedded-integration-testing-framework.html' title='jIntegrationTest  Framework.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4717291125599010481</id><published>2009-02-14T00:56:00.010-06:00</published><updated>2009-04-05T09:53:38.578-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='frameworks'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jembedded'/><category scheme='http://www.blogger.com/atom/ns#' term='jee'/><category scheme='http://www.blogger.com/atom/ns#' term='jcontenedor'/><title type='text'>New Frameworks and change of direction</title><content type='html'>Once again it's been a long time since the last time I wrote something here, mainly because I thought was much better to invest the time writing code and new stuff. There are already many good blogs out there commenting the new stuff, enough to keep you occupied for ever.&lt;br /&gt;&lt;br /&gt;So I decided to focus on my new frameworks and comment some other interesting stuff from time to time.&lt;br /&gt;&lt;br /&gt;I've been working mainly in two new frameworks and the reworking of jServiceRules:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;a href="http://code.google.com/p/jcontenedor"&gt;jiContenedor&lt;/a&gt;: Multi layer JEE Service Container based on Spring, containing many different services out of the box: Validation (OVAL) , i18n, Logging, Spring/GWT MVC, JMS, jCaptcha, Spring Security, WebServices, Rules (R4Spring). It allows to define different layers for your applications (for example): web layer, repository layer, integration layer, services layer and so on. Relies on default configuration and a mix of xml schemas and annotations.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/jembedded"&gt;jIntegrationTest&lt;/a&gt;: JEE Integration Testing Framework including HTTP, DB, JMS, WebServices, RMI and JMS embedded Servers. Includes several Integration Testing Units: HTTP(Jetty), DB(HSQLDB), JSF, JMS(ActiveMQ), Spring, Spring MVC, Apache CXF WebServices...&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/jservicerules"&gt;Rules4Spring&lt;/a&gt;: evolution project from jServiceRules, focused on using declative/sematic rules in Services, using annotations.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4717291125599010481?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4717291125599010481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4717291125599010481' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4717291125599010481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4717291125599010481'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2009/02/new-frameworks-and-change-of-direction.html' title='New Frameworks and change of direction'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5780371579017841032</id><published>2008-03-18T02:08:00.006-06:00</published><updated>2008-03-24T01:23:05.431-06:00</updated><title type='text'>jSemanticService: version 0.5 released!</title><content type='html'>A new version of  &lt;span style="font-style: italic;"&gt;jSemanticService&lt;/span&gt;&lt;span style=""&gt; has been released.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;jSemanticService&lt;/span&gt; allows to use business rules and semantics using annotations in an easy way.&lt;br /&gt;&lt;br /&gt;This release includes:&lt;br /&gt;&lt;br /&gt;- Full &lt;span style="font-style: italic;"&gt;Annotations&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Spring&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Flex/Blaze DS&lt;/span&gt; support.&lt;br /&gt;&lt;br /&gt;- New support classes to build &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Services &lt;/span&gt;on the fly.&lt;br /&gt;&lt;br /&gt;- New and improved documentation.&lt;br /&gt;&lt;br /&gt;- New integration examples including &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Flex&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Spring MVC&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Project Webs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sourceforge.net/projects/jsemticservice/"&gt;jSemanticService in SourceForge&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/"&gt;&lt;br /&gt;jServiceRules in GoogleCode&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5780371579017841032?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5780371579017841032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5780371579017841032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5780371579017841032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5780371579017841032'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/03/jsemanticservice-version-05-released.html' title='jSemanticService: version 0.5 released!'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-749400094668183490</id><published>2008-03-05T02:32:00.004-06:00</published><updated>2008-03-06T01:31:57.282-06:00</updated><title type='text'>jSemanticService in Sourceforge.net</title><content type='html'> Good news!&lt;br /&gt;&lt;br /&gt;Some days ago &lt;span style="font-style: italic;"&gt;jSemanticService &lt;/span&gt;was approved by &lt;span style="font-style: italic;"&gt;SourceForge&lt;/span&gt;, so from now on the releases of this package will be found in the new &lt;a href="https://sourceforge.net/projects/jsemticservice/"&gt;project site.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The releases of the individual packages &lt;span style="font-style: italic;"&gt;(jSemantic-Core&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;jSemanticRules&lt;/span&gt;, jSemanticRules-support) will be made through &lt;span style="font-style: italic;"&gt;Google Code&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-749400094668183490?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/749400094668183490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=749400094668183490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/749400094668183490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/749400094668183490'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/03/jsemanticservice-in-sourceforgenet.html' title='jSemanticService in Sourceforge.net'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-3066403566521613451</id><published>2008-03-04T05:17:00.015-06:00</published><updated>2008-03-06T01:33:11.358-06:00</updated><title type='text'>jSemanticService: Flex Integration.</title><content type='html'>The support module included in the &lt;span style="font-style: italic;"&gt;jSemanticService&lt;/span&gt; release supplies some classes for the integration with &lt;span style="font-style: italic;"&gt;Flex&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;In these screen shots the &lt;span style="font-style: italic;"&gt;Semantic Even Service&lt;/span&gt; can be seen (included in the even numbers  example) working with &lt;span style="font-style: italic;"&gt;Flex  &lt;/span&gt;as a &lt;span style="font-style: italic;"&gt;RIA&lt;/span&gt; framework.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;Semantic Even Service&lt;/span&gt; is exposed as a Remote Object using &lt;span style="font-style: italic;"&gt;BlazeDS.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_R2ECN_SRpxs/R80yZIGNndI/AAAAAAAAAAU/18BukRi-8WY/s1600-h/Pantallazo-Mozilla+Firefox-1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_R2ECN_SRpxs/R80yZIGNndI/AAAAAAAAAAU/18BukRi-8WY/s200/Pantallazo-Mozilla+Firefox-1.png" alt="" id="BLOGGER_PHOTO_ID_5173846954170228178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the above screen shot  some numbers are being introduced.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_R2ECN_SRpxs/R80zQ4GNneI/AAAAAAAAAAc/cR78Te4P1AA/s1600-h/Pantallazo-Mozilla+Firefox-3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_R2ECN_SRpxs/R80zQ4GNneI/AAAAAAAAAAc/cR78Te4P1AA/s200/Pantallazo-Mozilla+Firefox-3.png" alt="" id="BLOGGER_PHOTO_ID_5173847911947935202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After pressing the submit button,  the &lt;span style="font-style: italic;"&gt;SemanticEvenService&lt;/span&gt; is invoked and  returns the results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-3066403566521613451?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/3066403566521613451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=3066403566521613451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3066403566521613451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3066403566521613451'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/03/jsemanticservice-integration-with-flex_04.html' title='jSemanticService: Flex Integration.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_R2ECN_SRpxs/R80yZIGNndI/AAAAAAAAAAU/18BukRi-8WY/s72-c/Pantallazo-Mozilla+Firefox-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4589957308121138250</id><published>2008-03-02T01:37:00.009-06:00</published><updated>2008-03-06T01:40:46.855-06:00</updated><title type='text'>jSemanticService version 0.1.0</title><content type='html'>&lt;span style="font-style: italic;"&gt;jSemanticService &lt;/span&gt;is a package that comprises the functionality of &lt;span style="font-style: italic;"&gt;jSemanticRules&lt;/span&gt; plus the support package (Spring, Hibernate, Mule, Flex..),&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is also available a &lt;a href="http://downloads.sourceforge.net/jsemticservice/jSemanticService-guide-0.1.0.pdf?modtime=1204741521&amp;amp;big_mirror=0"&gt;documentation guide &lt;/a&gt;in pdf format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Downloads.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; "&gt;&lt;a href="https://sourceforge.net/project/showfiles.php?group_id=220007"&gt;jSemanticService&lt;/a&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;a href="https://sourceforge.net/project/showfiles.php?group_id=220007"&gt; version 0.1.0 distribution&lt;/a&gt;&lt;/span&gt;&lt;a href="http://jservicerules.googlecode.com/files/jsemanticservice-build-0.1.0.tar"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4589957308121138250?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4589957308121138250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4589957308121138250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4589957308121138250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4589957308121138250'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/03/jsemanticservice-build-010.html' title='jSemanticService version 0.1.0'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-8481022337817351672</id><published>2008-02-29T02:14:00.008-06:00</published><updated>2008-03-06T01:54:27.123-06:00</updated><title type='text'>Setup and Dependencies of jServiceRules</title><content type='html'>The setup process is very easy, &lt;a id="Steps_for_the_binaries_distribution"&gt;just download, unzip the tar file and  &lt;/a&gt;&lt;a id="Steps_for_the_binaries_distribution"&gt;depending of the environment you are working with (standalone or Web) the jars must be added either to the &lt;span style="font-style: italic;"&gt;classpath&lt;/span&gt; of the application or to the &lt;span style="font-style: italic;"&gt;WEB-INF\lib&lt;/span&gt; directory.&lt;/a&gt;&lt;a id="Steps_for_the_binaries_distribution"&gt;&lt;br /&gt;&lt;br /&gt;The only issue could be getting the right dependencies. If you have downloaded the no dependencies package you can get it in a&lt;/a&gt;&lt;a href="http://jservicerules.googlecode.com/files/dependencies-jservicerules-alpha01.tar"&gt; separate file&lt;/a&gt;&lt;a id="Steps_for_the_binaries_distribution"&gt;.&lt;br /&gt;&lt;/a&gt;&lt;a id="Steps_for_the_binaries_distribution"&gt;&lt;/a&gt;&lt;br /&gt;For further information a &lt;a href="http://downloads.sourceforge.net/jsemticservice/jSemanticService-guide-0.1.0.pdf?modtime=1204741521&amp;amp;big_mirror=0"&gt;documentation guide&lt;/a&gt; is available.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-8481022337817351672?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/8481022337817351672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=8481022337817351672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8481022337817351672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8481022337817351672'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/setup-and-dependencies-of-jservicerules.html' title='Setup and Dependencies of jServiceRules'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4789608014947670937</id><published>2008-02-28T01:28:00.011-06:00</published><updated>2008-03-01T04:44:44.450-06:00</updated><title type='text'>Transforming Pojo / Web /  Enterprise Services into Semantic Services / Agents using jSemanticService</title><content type='html'>Let's suppose that you have an existing service (pojo in this case) in a &lt;span style="font-style: italic;"&gt;Spring context&lt;/span&gt;, (or that you need to write a new service) that needs to use &lt;span style="font-style: italic;"&gt;semantics&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;How would you do that? Well, in just three steps:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;First Step&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Writing a &lt;span style="font-style: italic;"&gt;SemanticServiceFactory&lt;/span&gt; bean (and it's collaborators if needed) in the Spring Context file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Second Step.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Either inject a reference to  the &lt;span style="font-style: italic;"&gt;SemanticServiceFactory&lt;/span&gt; directly in the service or extend the &lt;span style="font-style: italic;"&gt;SemanticServiceSupport&lt;/span&gt; abstract class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;public class EvenService  {&lt;br /&gt;&lt;br /&gt;  private SemanticSessionFactory semanticSessionFactory = null;&lt;br /&gt;&lt;br /&gt;  public Collection check(Collection numbers) {&lt;br /&gt;          SemanticSession session = semanticSessionFactory.getInstance();&lt;br /&gt;&lt;br /&gt;          Collection results = session.execute(numbers);&lt;br /&gt;          session.dispose();&lt;br /&gt;          session = null;&lt;br /&gt;          return results;&lt;br /&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;       public void semanticSessionFactory(SemanticSessionFactory semanticSessionFactory){&lt;br /&gt;          this.semanticSessionFactory = semanticSessionFactory:&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now a method that uses the new added semantics functionality can be written. For that matter there is  a method in the base class: &lt;span style="font-style: italic;"&gt;getInstance(&lt;/span&gt;). This method returns a &lt;span style="font-style: italic;"&gt;Semantic Session&lt;/span&gt; instance that is bound to the current thread. If we dispose the session then we'll get a new one. If not, the same session will be reused.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Third Step&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Inject the &lt;span style="font-style: italic;"&gt;Semantic Session Factory&lt;/span&gt; in the service bean.&lt;br /&gt;&lt;br /&gt;And that's all, now the Semantic Service is ready to roll!.&lt;br /&gt;&lt;br /&gt;Read the complete article in:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/wiki/TransformServicesIntoSemantics"&gt;http://code.google.com/p/jservicerules/wiki/TransformServicesIntoSemantics&lt;/a&gt;&lt;br /&gt;&lt;bean id="evenService class="&gt;&lt;br /&gt;&lt;/bean&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4789608014947670937?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4789608014947670937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4789608014947670937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4789608014947670937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4789608014947670937'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/transforming-enterprise-services-into.html' title='Transforming Pojo / Web /  Enterprise Services into Semantic Services / Agents using jSemanticService'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-5079998005036951755</id><published>2008-02-26T23:54:00.012-06:00</published><updated>2008-03-01T04:41:47.346-06:00</updated><title type='text'>Why to use Semantics and Rules in your Services.</title><content type='html'>&lt;a id="Introduction"&gt;The question is why should I use Semantics and rules  and when?&lt;/a&gt;&lt;span class="Apple-style-span" style=";font-family:'Lucida Grande';font-size:100%;"  &gt;&lt;br /&gt;Well, using semantics or rules should be another tool in you toolset. And it's a very useful one, even though is very underrated maybe because it´s never been easy to use. Or because semantic or functional programming has never been that popular.&lt;br /&gt;That is changing nowaydays because of SOA and BPM's, that rely heavily upon on Business Rules, specially sSOA.&lt;br /&gt;&lt;br /&gt;With the jServiceRules / jSemanticService frameworks I tried to cover up some of that gaps:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=";font-family:'Lucida Grande';font-size:100%;"  &gt;  &lt;/span&gt;&lt;p&gt;&lt;a id="Introduction"&gt;# Writing semantic services or agents in a easy way, just writing some rules files (and the service). &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="Introduction"&gt;# Adapting the &lt;i&gt;BRE&lt;/i&gt; to Services and Java environments. &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="Introduction"&gt;# Integration with another third party frameworks. &lt;/a&gt;&lt;/p&gt;&lt;h2&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;When to use Semantics or Rules&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;In a &lt;i&gt;Enterprise Environment&lt;/i&gt; these are some of the cases in which you could use &lt;i&gt;jServiceRules&lt;/i&gt; or &lt;i&gt;jSematicService&lt;/i&gt;: &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# If you need smart agents or services (for example a service that will recommend your tv favorites series of the day). &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# If you have a complex model you could write a semantic model to process it. &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# Business rules that would change over the time. &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# Business rules that you'd like to isolate from the code. &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# Business rules that you'd need to edit in a simple way, using a scripting language (so you don't need to compile), &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a id="When_to_use_Semantics_or_Rules"&gt;# Different types of events or objects you'd want to recognize and process. &lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-5079998005036951755?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/5079998005036951755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=5079998005036951755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5079998005036951755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/5079998005036951755'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/why-to-use-rules-and-semantics-in-your.html' title='Why to use Semantics and Rules in your Services.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-958378786709738008</id><published>2008-02-24T00:37:00.017-06:00</published><updated>2008-02-24T01:41:58.005-06:00</updated><title type='text'>About the jServiceRules alpha working release.</title><content type='html'>Well, after some months of development (well, not really that much but as I do it in my spare time, clocks that long) I've  finally been able to release an alpha working version. &lt;div&gt;In fact, it´s a stripped down version compared what I had in mind, but it's more focused (service oriented) and it can be used as a base for future developments.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Even though it's functional and I've tested it in different enviroments &lt;span class="Apple-style-span" style="font-style: italic;"&gt;(windows&lt;/span&gt;, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;linux&lt;/span&gt;, &lt;span class="Apple-style-span" style="font-style: italic;"&gt;mac os&lt;/span&gt;) using unit and stress testing, still some bugs could appear. Also I'm still improving it, so minor changes could be found in the next version. But that's the reason it's an alpha release :) .&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;About the release.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;This release includes the dist binaries, dependencies (if you choose so), API docs, and two examples. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It does not include the &lt;span class="Apple-style-span" style="font-style: italic; "&gt;support package&lt;/span&gt; therefore there is no &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Spring&lt;/span&gt; (and the rest of the bunch)  integration yet, so the only option to use and configure the framework is through code (see examples and further posts). I'll release it at the end of this week or early next.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;About the examples.&lt;span class="Apple-style-span" style="font-style: normal; font-weight: normal; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: normal; font-weight: normal; "&gt;The even numbers example is simple, just a service that returns if a number is even or not. Two  simpe rules are produced to do that. The objective of this example is to show how to use the basic features.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Energy example is a more complex one producing  the energy invoice of a customer, giving his personal data and energy readings. In this case, a number of rules are produced to generate the Tariffs available.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-958378786709738008?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/958378786709738008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=958378786709738008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/958378786709738008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/958378786709738008'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/about-jservicerules-alpha-working.html' title='About the jServiceRules alpha working release.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-4475310271347294869</id><published>2008-02-23T13:17:00.013-06:00</published><updated>2008-02-23T14:24:05.498-06:00</updated><title type='text'>JServiceRules alpha 01 working version released.</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"   style="  ;font-family:arial;font-size:13px;"&gt;&lt;a id="Project_Description"&gt;&lt;p style="max-width: 65em; "&gt;Transform existing (or new) &lt;i&gt;Enterprise Services&lt;/i&gt; in &lt;i&gt;Semantic Services&lt;/i&gt; in no time. Based on a implementation of a generic &lt;i&gt;Business Rules Engine&lt;/i&gt; (an implementation using &lt;i&gt;Drools 4&lt;/i&gt; is provided).&lt;/p&gt;&lt;/a&gt;&lt;p style="max-width: 65em; "&gt;&lt;a id="Project_Description"&gt;&lt;span class="Apple-style-span"   style=" ;font-family:Georgia;font-size:16px;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a id="Project_Description"&gt;Features&lt;/a&gt;&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;&lt;/p&gt;&lt;p style="max-width: 65em; display: inline !important; "&gt;# Quick and easy configuration (code or &lt;i&gt;Spring&lt;/i&gt; based).&lt;/p&gt;&lt;br /&gt;&lt;p style="max-width: 65em; "&gt;# Easy integration in existing services/applications (code or &lt;i&gt;Spring&lt;/i&gt; based).&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;# Hides the complexity behind a &lt;i&gt;BRE&lt;/i&gt; (configuration/development), allowing developers to concentrate in the development of the business logic and rules.&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;# Agnostic and focused API with the most common features that you'd need (plus new ones).&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;# New features that helps the &lt;i&gt;BRE to interact with the environment (internal/external), for example invoking external services by rules (that are located in a external Spring context).&lt;/i&gt;&lt;/p&gt;&lt;p style="max-width: 65em; "&gt;# Support package that provides integration out of the box for &lt;i&gt;Spring&lt;/i&gt;, &lt;i&gt;Hibernate&lt;/i&gt;, &lt;i&gt;Mule&lt;/i&gt; etc..&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;Project Home&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules"&gt;http://code.google.com/p/jservicerules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Binaries&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jservicerules.googlecode.com/files/jservicerules-alpha1.tar"&gt;http://jservicerules.googlecode.com/files/jservicerules-alpha1.tar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jservicerules.googlecode.com/files/jservicerules-alpha01-nodep.tar"&gt;http://jservicerules.googlecode.com/files/jservicerules-alpha01-nodep.tar&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Source Code&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/source/checkout"&gt;http://code.google.com/p/jservicerules/source/checkout&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Quick Guide&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/wiki/IntroductionGuide"&gt;http://code.google.com/p/jservicerules/wiki/IntroductionGuide&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-4475310271347294869?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/4475310271347294869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=4475310271347294869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4475310271347294869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/4475310271347294869'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/jservicerules-alpha-01-working-version.html' title='JServiceRules alpha 01 working version released.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-6783183146602919482</id><published>2008-02-18T01:03:00.014-06:00</published><updated>2008-02-18T01:36:40.399-06:00</updated><title type='text'>jSemantic-Core Beta 1 released.</title><content type='html'>The beta 1 for the &lt;span style="font-style: italic;"&gt;jSemantic-Core&lt;/span&gt; has been released.&lt;br /&gt;&lt;br /&gt;This package is the API  for the &lt;span style="font-style: italic;"&gt;jServiceRules&lt;/span&gt; framework, that allows to transform your regular &lt;span style="font-style: italic;"&gt;Enterprise Services&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;Semantic Services on the fly  &lt;/span&gt;backed by a rules engine.&lt;br /&gt;&lt;br /&gt;This is an "agnostic" API, so it doesn't contain any references or dependencies to any rules engine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;This release contains &lt;/span&gt;&lt;span style="font-style: italic;"&gt;binaries, API docs and dependencies.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Project Home&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/"&gt;http://code.google.com/p/jservicerules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Binaries&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jservicerules.googlecode.com/files/jsemantic-core-beta1.tar"&gt;&lt;span style="font-style: italic;"&gt;http://jservicerules.googlecode.com/files/jsemantic-core-beta1.tar&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Source Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/source/checkout"&gt;&lt;span style="font-style: italic;"&gt;http://code.google.com/p/jservicerules/source/checkout&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Quick Guide&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/jservicerules/wiki/IntroductionGuide"&gt;&lt;span style="font-style: italic;"&gt;http://code.google.com/p/jservicerules/wiki/IntroductionGuide&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-6783183146602919482?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/6783183146602919482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=6783183146602919482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6783183146602919482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6783183146602919482'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/jsemantic-core-beta-1-released.html' title='jSemantic-Core Beta 1 released.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-8247302230825355524</id><published>2008-02-17T04:33:00.032-06:00</published><updated>2008-03-03T23:22:58.837-06:00</updated><title type='text'>jServiceRules (I). The Semantic Core.</title><content type='html'>The first package of the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;jServiceRules&lt;/span&gt; framework is the&lt;span class="Apple-style-span" style="font-style: italic;"&gt; jSemanticCore&lt;/span&gt;, that contains all the interfaces, abstract factories, helpers  so a &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Session &lt;/span&gt;could be implemented.&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;The &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Session&lt;/span&gt; is a core concept within the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;jServiceRules&lt;/span&gt; framework and is just a&lt;span class="Apple-style-span" style="font-style: italic;"&gt; Working Memory&lt;/span&gt; object "on steroids". Essentially it offers a focused interface, improves the communication of the WM with the execution enviroment (internal/external) and hides all the complexity behind the backed  rules engine. Also helps to manage some external knowledge we could need through the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Knowledge Database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let's say that you want to execute some business stateless rules. To produce this is as simple as:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Creating a &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Session Factory &lt;/span&gt;associated to the rules file.&lt;/li&gt;&lt;li&gt;Getting an instance of the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Session &lt;/span&gt;(stateless by default), produced by the factory.&lt;/li&gt;&lt;li&gt;Passing some facts to the session (related to the rules you want to evaluate).&lt;/li&gt;&lt;li&gt;The rules will be automatically evaluated and some results will be returned.&lt;/li&gt;&lt;li&gt;The session could be disposed.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SemanticSessionFactory factory = &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;new SemanticSessionFactoryImpl("org/jservicerules/rules/test.drl");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SemanticSession session = factory.getInstance();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Collection results = session.execute(new Integer(10));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;session.dispose();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A template to produce the rules files is provided with the package:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;package org.jsemantic.templates&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;global org.jsemantic.core.context.SemanticContext ctx;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rule "rule_one"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;when&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;then&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.........&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rule "rule_n"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;when&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;then&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;For example, we'd like to know if a number it's even:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rule "even"&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;when&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;number:Integer()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;eval(number.intValue() % 2 == 0)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ctx.addObject(number, "Number: " + number +  " is even");&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Semantic Context&lt;/span&gt; is the object that allows to interact with the enviroment. One way is returning results of the rules evaluation through the&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;span class="Apple-style-span" style="font-style: italic;"&gt;addObject(id, value)&lt;/span&gt;&lt;/span&gt; method. There are other ways of interacting as using the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;ExternalContext&lt;/span&gt; or the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;Session Variables&lt;/span&gt;. I'll explain this in future posts.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-8247302230825355524?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/8247302230825355524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=8247302230825355524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8247302230825355524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/8247302230825355524'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/jservicerules-i-semantic-core.html' title='jServiceRules (I). The Semantic Core.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-3619063388568362826</id><published>2008-02-09T01:28:00.003-06:00</published><updated>2008-05-13T10:33:18.744-06:00</updated><title type='text'>It´s been a long time since I ...</title><content type='html'>Well yes!, it´s been a long time since the last time I wrote in this blog.. and a lot of things happened as well. The thing is,  that I have been doing a lot of stuff lately and I´m going to share some of it, starting with a little set of frameworks related to the main topic of this blog: semantics.&lt;br /&gt;&lt;br /&gt;First of all, a little of history :D&lt;br /&gt;&lt;br /&gt;My first experience with semantic programming was some years ago, when I was assigned (with 2 colleagues) to a "highly urgent project" :P for Telefonica. It was a use case simulator for testing, so we had a lot of different input/output cases.&lt;br /&gt;&lt;br /&gt;In order to relate the thousands of different input/output (a group of inputs/outputs would be a use case, depending on some conditions) we used a rule engine to generate and filter them.&lt;br /&gt;&lt;br /&gt;Why did we use a rule engine? Because we could declare the different use cases and it's driven conditions, using rules in a declarative fashion (that is, semantic programming), being easily read, changed or updated. Also we could filter the cases using the same rules.&lt;br /&gt;&lt;br /&gt;At that time (2003 I think it was) the best open source option was Drools (http://labs.jboss.com/drools/) and still is in my opinion. JRules from iLog, it´s a very good one rules engine but it´s a commercial option though.&lt;br /&gt;&lt;br /&gt;I starting using rules engines  over the years, collecting a few utility/helper classes.Then last year after the summer, I started working with these classes expanding them with a lot of improvements and concepts, always having Drools 3 as a core.&lt;br /&gt;&lt;br /&gt;Then Drools 4 was released, and it had some of the concepts and improvements I´d already added :D to my little framework (well done guys! by the way). For example,  changing the concept of WorkingMemory to RulesSession (stateless &amp;amp; stateful). I got something similar, but I went  further creating the SemanticSession, a concept that I´ll explain latter.&lt;br /&gt;&lt;br /&gt;Anyway, at that point I decided:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; first of all, to create an agnostic and simplified API, with the most common features that anyone would use (based in my own experience) and not related to a specific rules engine. It also expands some of the concepts and features. This API  would become the &lt;strong&gt;jSemanticCore&lt;/strong&gt; package. &lt;/li&gt;&lt;li&gt;Second of all, to create an implementation based on Drools 4, using its new features and  adding/removing others. Also it implements the new concepts, as the &lt;em&gt;SemanticSession&lt;/em&gt;, &lt;em&gt;SemanticContext&lt;/em&gt;, &lt;em&gt;KnowledgeDatabase&lt;/em&gt; etc. This would become the &lt;strong&gt;jServiceRules&lt;/strong&gt; package.&lt;/li&gt;&lt;li&gt;And finally, a support package that provides integration classes for Spring, Hibernate, Mule etc..&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I will be releasing all this packages the next 2 weeks through &lt;a href="http://code.google.com/p/jservicerules/"&gt;http://code.google.com/p/jservicerules/&lt;/a&gt;, in a alpha/beta state. Also, I will be publishing entries in the blog explaining how to use it, technical aspects and examples.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-3619063388568362826?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/3619063388568362826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=3619063388568362826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3619063388568362826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3619063388568362826'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2008/02/its-been-long-time-since-i.html' title='It´s been a long time since I ...'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-6248218925062449269</id><published>2007-07-25T10:05:00.017-06:00</published><updated>2008-02-18T02:39:14.384-06:00</updated><title type='text'>Plugabble XML Validations - Use the Jakarta Struts Validations from your Swing application.</title><content type='html'>Even though &lt;span style="font-style: italic;"&gt;Swing&lt;/span&gt; is not cool anymore (yes, it was back in the day because it was much better than &lt;span style="font-style: italic;"&gt;AWT&lt;/span&gt;,  believe me) and   everybody out there is talking about &lt;span style="font-style: italic;"&gt;RIA&lt;/span&gt; (you could say that Swing is &lt;span style="font-style: italic;"&gt;RIA&lt;/span&gt; too ;) ) it's not very unlikely that you'd find yourself in the situation you'd to work with it. In fact, it happened to me this year twice.&lt;br /&gt;&lt;br /&gt;There a lot of companies out there using &lt;span style="font-style: italic;"&gt;Swing&lt;/span&gt; (specially financial ones), and even though  some of them in the future  will change to the "&lt;span style="font-style: italic;"&gt;RIA experience&lt;/span&gt;" (if one does, everybody else will, yes SOA I'm looking at you  ;D ), in the meantime it's good to improve the "&lt;span style="font-style: italic;"&gt;Swing experience"&lt;/span&gt; :) .&lt;br /&gt;&lt;br /&gt;Like I said, I found myself working in a &lt;span style="font-style: italic;"&gt;Swing&lt;/span&gt; based project, and the first thing I realized (among others) is that the validations and errors messages were hard coded, repeated and spreaded all over the code. One amateur mistake,  you'd say but it's not that uncommon.&lt;br /&gt;&lt;br /&gt;To prevent that I integrated the "&lt;span style="font-style: italic;"&gt;Jakarta Commons Validator&lt;/span&gt;" engine that helps you to reuse sets of validations and messages. If you have used Struts, you'd know it for sure.&lt;br /&gt;&lt;br /&gt;The thing is that the JCV package does not provide any pluggable validations out of the box (it provides some validations routines to help you out).&lt;br /&gt;&lt;br /&gt;I though the best way would be using something like the &lt;span style="font-style: italic;"&gt;Struts Validation Plugin&lt;/span&gt;, that included many different validations configured by xml but for a standalone application.&lt;br /&gt;&lt;br /&gt;So that's what I did. Now you can use the same &lt;span style="font-style: italic;"&gt;Struts Validations&lt;/span&gt; (same config files, tags etc.. have a look at the Struts guide), but from your Swing application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Links&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://commons.apache.org/validator/"&gt;Jakarta Commons Validator&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://struts.apache.org/1.x/faqs/validator.html"&gt;Struts Validations Guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://www.box.net/static/flash/box_explorer.swf?widgetHash=ifuxdm8kvb&amp;amp;v=1&amp;amp;cl=0" wmode="transparent" type="application/x-shockwave-flash" height="300" width="350"&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-6248218925062449269?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/6248218925062449269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=6248218925062449269' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6248218925062449269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/6248218925062449269'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2007/07/wrapper-for-jakarta-commons-validator.html' title='Plugabble XML Validations - Use the Jakarta Struts Validations from your Swing application.'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-7861358633509163667</id><published>2007-07-16T13:37:00.000-06:00</published><updated>2007-07-16T14:04:33.659-06:00</updated><title type='text'>YUI Live Search (aka AJAX AutoComplete) - Integration with Struts - II</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;I´ve been very busy lately landing into a new job, so I couldn't add any new entries.&lt;br /&gt;&lt;br /&gt;I´ve received a couple of questions about the autocomplete component, and it seems that everybody gets confused in the same part.&lt;br /&gt;&lt;br /&gt;The autocomplete component is esentially a ui component, so it does not provide any function to filter the results in the server. That means you have to implement you own search and return it to the client. If you don´t do that, more likely you will get all the results at once.&lt;br /&gt;&lt;br /&gt;However, it has a filter function in the client side if you activate the cache, but you would have to return all the results the first time to make it work, and it´s not the way is intended.&lt;br /&gt;&lt;br /&gt;Here it is the sources for an example of the autocomplete, provided by Rohitesh (thanks!).&lt;br /&gt;&lt;br /&gt;&lt;embed src="http://www.box.net/static/flash/box_explorer.swf?widgetHash=tsuvk0q1k7&amp;v=1&amp;cl=0" width="200" height="160" wmode="transparent" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the next entries I will exploring some not very hot topics, but useful ones like an integration of the Jakarta Commons Validator with Swing (using the struts validations), a little Swing framework, and the use of Cactus Testing Framework with JBoss 4.&lt;br /&gt;&lt;br /&gt;It´s amazing the number of companies that still use technologies like swing and ejbs (entities), and the thing is that using some helping tools, it works (with some effort, that is).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-7861358633509163667?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/7861358633509163667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=7861358633509163667' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/7861358633509163667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/7861358633509163667'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2007/07/yui-live-search-aka-ajax-autocomplete.html' title='YUI Live Search (aka AJAX AutoComplete) - Integration with Struts - II'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-1417837179207792306</id><published>2007-04-26T00:52:00.000-06:00</published><updated>2007-04-26T07:00:54.735-06:00</updated><title type='text'>YUI Live Search (aka AJAX AutoComplete) - Integration with Struts</title><content type='html'>&lt;div align="left"&gt;Hi!&lt;br /&gt;&lt;br /&gt;Well, if you hadn´t had a look at the YUI LiveSearch component (&lt;a href="http://developer.yahoo.com/yui/autocomplete/"&gt;http://developer.yahoo.com/yui/autocomplete/&lt;/a&gt;) go for it. It´s worth the effort. &lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;&lt;em&gt;Autocomplete Component and DataSource.&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;YUI is just a library of AJAX components, so you would need to integrate it with you favourite framework. However, it´s shipped with some javascript libraries that wrap the XMLHttpRequestObject, so you don´t have to use it like that. Instead it uses the concept of DataSource to send queries and retrieve data:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;var serverURL = "/search/liveSearch.do"; //service URL&lt;br /&gt;var schema = ["Results","Id","Name", "Description"]; // data mapping format&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;var dataSource = new YAHOO.widget.DS_XHR(myServer, mySchema);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;dataSource.responseType = YAHOO.widget.DS_XHR.TYPE_JSON;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;dataSource.queryMatchSubset = true; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;dataSource.maxCacheEntries = 50; // component internal cache size.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this datasource must be passed in the autocomplete constructor:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;var liveSearchComponent = new YAHOO.widget.AutoComplete("textField","containerId", datasource);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;textField: input search text field component.&lt;br /&gt;&lt;br /&gt;containerId: div id that will hold the results.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Well, thats basically what you would need to know to create the datasource and the component (along with some configuration steps, have a look at the YUI tutorial).&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;em&gt;&lt;strong&gt;Search Service.&lt;/strong&gt;&lt;/em&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;We can get the results using a search service invoked by a struts action:&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;public String search(String searchText, int numMaxResults);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;Using this service we should get the data following the format specified in the datasource. In this case we need to get the data in JSON (java script object notation) format:&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;{"&lt;span style="font-family:courier new;"&gt;Results":&lt;br /&gt;[{"Id" : "1", "Name": "Lou Reed", "Description&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;": "NYC Man"},&lt;br /&gt;[{"Id" : "2", "Name": "Lou Dylan","Description": "the man!"}]}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&amp;nbsp;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Service code using the JSONObject:&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&amp;nbsp;&lt;div align="left"&gt; &lt;span style="font-family:courier new;font-size:85%;"&gt;import org.json.JSONArray;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;import org.json.JSONException;&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;import org.json.JSONObject;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;div align="left"&gt;&lt;br /&gt;public class SearchServiceImpl implements SearchService {&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;public String search(String searchText,...) {&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;//here goes the code to do the search&lt;/div&gt;&lt;div align="left"&gt;//once obtained the results must be formatted using json&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;JSONObject json = new JSONObject(); &lt;/div&gt;&lt;div align="left"&gt;JSONArray result = new JSONArray();&lt;br /&gt;JSONObject rowOne = new JSONObject();&lt;/div&gt;&lt;div align="left"&gt;JSONObject rowTwo = new JSONObject();&lt;br /&gt;try {&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;rowOne.put("id", "1"); &lt;/div&gt;&lt;div align="left"&gt;rowOne.put("Name", "Lou Reed"); &lt;/div&gt;&lt;div align="left"&gt;rowOne.put("Description", "NYC Man"); &lt;/div&gt;&lt;div align="left"&gt;result.put(rowOne);&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;rowTwo.put("id", "2"); &lt;/div&gt;&lt;div align="left"&gt;rowTwo.put("Name", "Lou Dylan"); &lt;/div&gt;&lt;div align="left"&gt;rowTwo.put("Description", "the man!"); &lt;/div&gt;&lt;div align="left"&gt;result.put(rowTwo);&lt;br /&gt;json.put("Results", result);&lt;br /&gt;} &lt;/div&gt;&lt;div align="left"&gt;catch (JSONException e) { &lt;/div&gt;&lt;div align="left"&gt;//umm a checked exception!! :) &lt;/div&gt;&lt;div align="left"&gt;//do something!&lt;/div&gt;&lt;div align="left"&gt;}&lt;br /&gt;return json.toString();&lt;br /&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;p&gt;&lt;p&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;That would be the search service, of course it could be whatever you want, a POJO, a Web Service etc.. the only thing to keep in mind is returning the data using the JSON format (specified in the datasource schema). &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;JSON Struts Action&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;It´s almost finished! we only need the controller code, to return the JSON String. In order to that, we need to write a special kind of action. Intead of returning and instance of action mapping, we should get the response object and flush the JSON object to the client:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;public ActionForward execute (ActionMapping mapping,...) {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;String json = searchService.search(searchText,...);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;res.setContentType(TEXT_JAVASCRIPT);&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;res.setHeader("Cache-Control", "no-cache");&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;br /&gt;PrintWriter pw = res.getWriter();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;pw.write(json);&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;pw.close();&lt;br /&gt;return null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Of course, you could do an abstract JSON Action class, or a helper to reuse it through the application.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-1417837179207792306?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/1417837179207792306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=1417837179207792306' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/1417837179207792306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/1417837179207792306'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2007/04/yui-live-search-aka-ajax-autocomplete.html' title='YUI Live Search (aka AJAX AutoComplete) - Integration with Struts'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-375590057359677437</id><published>2007-04-22T10:44:00.000-06:00</published><updated>2007-04-22T11:36:49.514-06:00</updated><title type='text'>Another Entry, Another Hype</title><content type='html'>Hi guys!&lt;br /&gt;&lt;br /&gt;I´m going to share with you some technical stuff about Ajax. And the reason is that I´ve been working lately a lot with it, because you know, these days you just can´t use a standard dropdown, you need an ajax driven dropdown or a web 2.0 dropdown.&lt;br /&gt;&lt;br /&gt;I suppose you know what Ajax is, if not check out this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29"&gt;http://en.wikipedia.org/wiki/Ajax_%28programming%29&lt;/a&gt;. (where have you been, in the Lost Island?, by the way I´ve got a crazy theory that I´ll share with you :) )&lt;br /&gt;&lt;br /&gt;Generally speaking, Ajax components could improve the user experience, if correctly used. For example the live search component, or the google search, I´m sure you know it; you just type some characters and the result appears without refreshing the page. You go on typing and more results appear.&lt;br /&gt;&lt;br /&gt;This component could save a lot of time and pain in a web application, I´ve used it to replace a conventional search (yes, with a pop up and pagination buttons, oh my!), replacing the manual pagination through hundreds of results for a simple search box. You just type a 3 o more chars and the results appear in DIV, under the box or next to it. Even you can have links inside the results!.&lt;br /&gt;&lt;br /&gt;So what I will do it´s explain to you how to integrate a Live Search component in your application using different frameworks and components.&lt;br /&gt;&lt;br /&gt;Ok, let´s have a look at the frameworks then. There are many of them, almost every software company has one, it´s the sign of the times. I´ll talk about the ones I know and I have used:&lt;br /&gt;&lt;br /&gt;- YUI (Yahoo User Interface): &lt;a href="http://developer.yahoo.com/yui/"&gt;http://developer.yahoo.com/yui/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- DWR (Direct Web Remoting): &lt;a href="http://getahead.org/dwr"&gt;http://getahead.org/dwr&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- GWT (Google Web Toolkit): &lt;a href="http://code.google.com/webtoolkit/"&gt;http://code.google.com/webtoolkit/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- Moo.Fx : &lt;a href="http://moofx.mad4milk.net"&gt;http://moofx.mad4milk.net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- Rico: &lt;a href="http://openrico.org/rico/home.page"&gt;http://openrico.org/rico/home.page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I´ll start with the YUI framework and the integration of the YUI live seach component with Struts, JSF and Spring MVC. That will be in the next entry.&lt;br /&gt;&lt;br /&gt;See you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-375590057359677437?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/375590057359677437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=375590057359677437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/375590057359677437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/375590057359677437'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2007/04/another-entry-another-hype.html' title='Another Entry, Another Hype'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6242794506857855992.post-3576364192377153595</id><published>2007-04-22T10:15:00.000-06:00</published><updated>2007-04-26T00:50:44.365-06:00</updated><title type='text'>In the beginning..let there be Blog</title><content type='html'>Hi everyone!&lt;br /&gt;&lt;br /&gt;It´s been a while since I wanted to write this blog.. but at last I´ve got some time in my hands to do it.&lt;br /&gt;&lt;br /&gt;My goal is to share some practical stuff that I´ve been using in rl projects and other experimental stuff.. of course the main topic will be java and jee (yeah it´s not dead, like some folks would wish) and Ruby (it´s a cool OO language).&lt;br /&gt;&lt;br /&gt;About Ruby I have to say that is a neat language but its killer app, Ruby on Rails, failed to impressed me.. it has some neat stuff, thats true, but nothing that you can´t find in java/jee frameworks:&lt;br /&gt;&lt;br /&gt;- Code generation: the most talked feature... it´s old stuff in j2ee/java, you have plenty of those, and more advanced: Middlegen, AndroMDA, AppFuse...&lt;br /&gt;&lt;br /&gt;-ORM: Hibernate (original, huh?), TopLink, Ibatis (semi-ORM), etc.. and by the way more complete than the ActiveRecord. I suppose that will be fixed in next RRails version.&lt;br /&gt;&lt;br /&gt;-Web Framework: it´s nice, but again nothing new there.&lt;br /&gt;&lt;br /&gt;-Ajax support: nothing new..&lt;br /&gt;&lt;br /&gt;I think the best they have done it´s to integrate all that stuff in one framework, trying to make it as simple as possible. Doing a CRUD application, it´s easy, but beyond that... things change.&lt;br /&gt;&lt;br /&gt;Ruby on Rails plays in a different league, it´s a good alternative to php, lamp.. it´s easier and more powerful, but I don´t see an enterprise project done in Ruby on Rails.&lt;br /&gt;&lt;br /&gt;Don´t take me wrong, I like the framework, but I can´t understand like java gurus like Bruce Tate, changed his mind and company from java to ruby like that..maybe looking for a new piece of cheese? It´s a new field indeed.&lt;br /&gt;&lt;br /&gt;Well, in the next entry I´ll talk about...AJAX, Web 2.0 Holy Grail&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6242794506857855992-3576364192377153595?l=semanticj2ee.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://semanticj2ee.blogspot.com/feeds/3576364192377153595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6242794506857855992&amp;postID=3576364192377153595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3576364192377153595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6242794506857855992/posts/default/3576364192377153595'/><link rel='alternate' type='text/html' href='http://semanticj2ee.blogspot.com/2007/04/in-beginninglet-there-be-blog.html' title='In the beginning..let there be Blog'/><author><name>Adolfo Estevez</name><uri>http://www.blogger.com/profile/07848227296384315658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
