geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson A. Perez" <>
Subject Proper use of <reference> tags in configuration plans
Date Wed, 18 Jan 2006 16:01:22 GMT
Hi all,

  I am developing a configuration plan involving
multiple GBeans. One of them, MainGBean, will make use
of the other GBeans. I am specifying the dependencies
as follows:

<?xml version="1.0" encoding="UTF-8"?>

    	<gbean name="gb1" class="task.APrinterGBean">    

    	<gbean name="gb2" class="task.BPrinterGBean">    
    	<gbean name="MainGBean" class="task.MyGBean">
		<reference name="Aprinter">gb1</reference>
		<reference name="Bprinter">gb2</reference> 

The idea is that MainGBean references gb1 and gb2 and
makes use of them. However, I get errors related to
the  <reference> tags and as a result it cant be
deployed. If I remove the <reference> tags, then it
can be deployed but  NullPointerExceptions are thrown
at run-time when MainGBean tries to make use of these
two GBeans that it references. Any help on the proper
use of the <reference> tag will be appreciated. 


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message