dev@glassfish.java.net

Unified Description in service Domain

From: liao <obframework_at_21cn.com>
Date: Sat, 8 Sep 2007 15:49:50 +0800






Unified Description in service Domain. Different services may hold different
description for its compomnets. We often talk about a component,which is
treated as one.We often listen some interesting J2ee Tech,for example: MBean,
EJB,Datasource....and so on.Let us think over them,we can find out a valid
way,a common way to describe them? OK, let us look at MBean(management bean).
Who do manage beans ? Containers ! Observeing a MBean in process,a contaier
apply its description into itself,and do some control on the cyclelife of the
bean.In this case,why we can't image out another similar objects:MComponent
(Management component). I can think a MComponent as a high-level object ?

Below,I will show you some description sample for referrence

For example:
1: POJO description:

   <component id="discoverer" type="Bean">
    <class>xxx.xxx.xxx</class>
    <property name="name" value="Test">
  </component>
  
Content between XML tag <component> will be alterable and parsed by a parser

I think we can regard MBean as a simple component. Do you think so?


2: Service description.

In fact, we can regard services as some special components in more high-level
service domain. Here,I share my definition

  <component id="admin" type="service">
    <class>xxx.FirstService</class>
    <property name="aspectPool">
    <property name="name" ref="First"/>
  </component>

3:DataSource Component
  <component id ="dataSource1" type="dataSource">
     <jndi>JDataSource</jndi>
     <transaction>local</transaction>
     <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
     <url>jdbc:odbc:jmin</url>
     <user>liao</user>
     <password>11111</password>
   </component>

4:EJB component(composite component)
<component id="session1" type="ejb3">
  <ejb-type>session</ejb-type>
  <interface>xxx.xxx.xxx</interface>
  <bean>xxx.xxx.xxx</bean>
  <state>stateless</state>
  <jndi>session1</jndi>
   .............
</component>

.............

Every component should hold a unique ID in component container. But How to
design a component container for the unified compoeents ?? I have some demos in
Jmin server. You can refer to them. Thanks!


Let's action in service domain,work together.