Date: 2004-04-17T19:26:03 Editor: 168.226.241.44 <> Wiki: Jakarta HiveMind Wiki Page: ModuleResourcesProposal URL: http://wiki.apache.org/jakarta-hivemind/ModuleResourcesProposal
no comment Change Log: ------------------------------------------------------------------------------ @@ -6,7 +6,7 @@ = Definitions = -Both services and resources are looked up via the registry using their unique id ''moduleid.serviceid''. +Both services and resources are looked up via the registry using their unique id ''moduleid.serviceid'' or ''moduleid.resourceid'' respectivly. '''Service:''' A POJO (Plain Old Java Object) used to perform a unit of work. A service has no state apart from injected references to other services or resources that are needed by the service. A service is disposable and is not persisted. A service is not locale sensitive (although @@ -18,9 +18,15 @@ '''Resource:''' A POJO that does not perform work put rather provides services and framework users with some resource/data. A resource -does have state and it is its state that is either the resource data itself (i.e Messages) or is used to gain access to the resource data (i.e.Datasource). Resource data is anything used in implementation, but external to it (Values from Properties/!ResourceBundles, data from a DB, data or XML from a file/URL, link to a JNDI/LDAP tree etc.). A resource is locale sensitive. The instantiation of a resource changes depending on the type of resource and the resources backing store. A resource could be writable, A resource has a state that tells us if it is in sync with its backing store. +does have state and it is its state that is either the resource data itself (e.g Properties) or is used to gain access to the resource data (e.g. Datasource). Resource data is anything used in implementation, but external to it (Values from Properties/!ResourceBundles, data from a DB, data or XML from a file/URL, link to a JNDI/LDAP tree etc.). A resource is locale sensitive. The instantiation of a resource changes depending on the type of resource and the resources backing store. A resource could in theory be writable. A resource has a state that tells us if it is in sync with its backing store if uses one as is the case with Properties/Messages etc. Resources are not a !HiveMind concept yet. I believe they could/should be and would be used widely. + +My concept of a resource as i have attempted to describe above is similar in many ways to the way in which resource can be defined and used in Tomcat. Tomcat is a web container and provides resources defined/configured in the server.xml via JNDI. Hivemind is a micro-kernel and would provide resources defined/configured hivemodule.xml's via the Registry. + +Take a look at [http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html] taking into account how as sorts of resources are used widely in application without letting the mention of JNDI/J2EE or web applications make you think its something specific to that enviroment. + + = Proposals = --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
