geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson A. Perez" <nelap...@yahoo.com>
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"?>
	
<configuration
	  
xmlns="http://geronimo.apache.org/xml/ns/deployment"
	   configId="task/SampleGBean"
	   >
	 
		<dependency>		
			<groupId>samples</groupId>
	    	       <artifactId>task</artifactId>
	    	       <version>1.0</version>  	    	
		</dependency>		    		

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

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



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. 

Thanks,
NP.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message