org.apache.geronimo.spring
Class SpringGBean

java.lang.Object
  extended byorg.apache.geronimo.spring.SpringGBean
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle

public class SpringGBean
extends Object
implements org.apache.geronimo.gbean.GBeanLifecycle

A GBean for creating graphs of Spring POJOs and auto-deploying them inside Geronimo as GBeans

Version:
$Revision: 1.1 $

Constructor Summary
SpringGBean(org.apache.geronimo.kernel.Kernel kernel)
           
 
Method Summary
protected  Object afterInitialization(Object bean, String name)
          Create an GBean wrapper
protected  Object beforeInitialization(Object bean, String name)
          Do we need to apply an interceptor to the bean?
protected  org.apache.geronimo.gbean.jmx.GBeanMBean createGBean(Object bean, String name)
           
protected  javax.management.ObjectName createObjectName(String name)
          Factory method to create an ObjectName for the Spring bean
protected  org.springframework.core.io.Resource createResource()
          Creates a resource from the current URL which by default will use the classpath
 void doFail()
           
 void doStart()
           
 void doStop()
           
 javax.management.ObjectName getObjectName()
           
 String getUrl()
           
 void setObjectName(javax.management.ObjectName objectName)
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringGBean

public SpringGBean(org.apache.geronimo.kernel.Kernel kernel)
Method Detail

getObjectName

public javax.management.ObjectName getObjectName()

setObjectName

public void setObjectName(javax.management.ObjectName objectName)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

createResource

protected org.springframework.core.io.Resource createResource()
Creates a resource from the current URL which by default will use the classpath

Returns:

beforeInitialization

protected Object beforeInitialization(Object bean,
                                      String name)
Do we need to apply an interceptor to the bean?


afterInitialization

protected Object afterInitialization(Object bean,
                                     String name)
                              throws org.springframework.beans.BeansException
Create an GBean wrapper

Throws:
org.springframework.beans.BeansException

createObjectName

protected javax.management.ObjectName createObjectName(String name)
                                                throws javax.management.MalformedObjectNameException
Factory method to create an ObjectName for the Spring bean

Parameters:
name - the name of the bean in the Spring config file
Returns:
the ObjectName to use for the given Spring bean name
Throws:
javax.management.MalformedObjectNameException

createGBean

protected org.apache.geronimo.gbean.jmx.GBeanMBean createGBean(Object bean,
                                                               String name)
Returns:
a newly created GBeanMBean for the given bean


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.