colus       02/02/04 02:42:30

  Modified:    apps/demo build.xml
               apps/demo/src/conf avalon-rmidemo-assembly.xml
                        avalon-rmidemo-config.xml
               
apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver
                        RMIHelloWorldServerImpl.java
                        RMIHelloWorldServerImpl.xinfo
  Removed:     src/java/org/apache/avalon/cornerstone/services/rmification
                        RMIficationListener.java
  Log:
  automatic rmification is impossible at this time. :=|
  
  Revision  Changes    Path
  1.39      +1 -1      jakarta-avalon-cornerstone/apps/demo/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/demo/build.xml,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- build.xml 26 Jan 2002 13:53:25 -0000      1.38
  +++ build.xml 4 Feb 2002 10:42:30 -0000       1.39
  @@ -320,7 +320,7 @@
       <java 
classname="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldClient">
         <classpath refid="project.class.path" />
         <arg value="localhost" />
  -      <arg value="9999" />
  +      <arg value="1099" />
         <arg value="RMIfication Tester" />
       </java>
     </target>
  
  
  
  1.3       +3 -4      
jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-assembly.xml
  
  Index: avalon-rmidemo-assembly.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-assembly.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- avalon-rmidemo-assembly.xml       26 Jan 2002 13:53:25 -0000      1.2
  +++ avalon-rmidemo-assembly.xml       4 Feb 2002 10:42:30 -0000       1.3
  @@ -2,13 +2,12 @@
   
   <assembly>
   
  -  <listener 
class="org.apache.avalon.cornerstone.services.rmification.RMIficationListener"
  -                  name="rmification-listener"/>
  -
     <block 
class="org.apache.avalon.cornerstone.blocks.rmification.DefaultRMIfication"
            name="rmification"/>
   
     <block 
class="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldServerImpl"
  -         name="rmihelloworld"/>
  +         name="rmihelloworld">
  +    <provide name="rmification" 
role="org.apache.avalon.cornerstone.services.rmification.RMIfication"/>
  +  </block>
   
   </assembly>
  
  
  
  1.3       +4 -8      
jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-config.xml
  
  Index: avalon-rmidemo-config.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/conf/avalon-rmidemo-config.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- avalon-rmidemo-config.xml 23 Jan 2002 09:25:31 -0000      1.2
  +++ avalon-rmidemo-config.xml 4 Feb 2002 10:42:30 -0000       1.3
  @@ -2,16 +2,12 @@
   
   <config>
   
  -  <rmification-listener>
  -
  -    <publisher>rmification</publisher>
  -
  -    <publish block="rmihelloworld" 
name="org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServer"/>
  -
  -  </rmification-listener>
  -
     <rmification>
       <port>1099</port>
     </rmification>
  +
  +  <rmihelloworld>
  +    
<pub-name>org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServer</pub-name>
  +  </rmihelloworld>
   
   </config>
  
  
  
  1.4       +44 -1     
jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServerImpl.java
  
  Index: RMIHelloWorldServerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RMIHelloWorldServerImpl.java      11 Jan 2002 04:46:33 -0000      1.3
  +++ RMIHelloWorldServerImpl.java      4 Feb 2002 10:42:30 -0000       1.4
  @@ -8,14 +8,57 @@
   package org.apache.avalon.cornerstone.demos.rmihelloworldserver;
   
   import java.rmi.RemoteException;
  +import org.apache.avalon.framework.component.Composable;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.configuration.Configurable;
  +import org.apache.avalon.framework.configuration.Configuration;
  +import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.phoenix.Block;
  +import org.apache.avalon.cornerstone.services.rmification.RMIfication;
   
   /**
    * @author <a href="mailto:[EMAIL PROTECTED]">Eung-ju Park</a>
    */
   public class RMIHelloWorldServerImpl
  -    implements RMIHelloWorldServer, Block
  +    extends AbstractLogEnabled
  +    implements Composable, Configurable, Initializable, RMIHelloWorldServer, 
Block
   {
  +    private RMIfication m_rmification;
  +    private String m_publicationName;
  +
  +    public void compose( final ComponentManager componentManager )
  +        throws ComponentException
  +    {
  +        m_rmification = (RMIfication)componentManager.lookup( 
RMIfication.ROLE );
  +    }
  +
  +    public void configure( final Configuration configuration )
  +        throws ConfigurationException
  +    {
  +        m_publicationName = configuration.getChild( "pub-name" ).getValue();
  +    }
  +
  +    public void initialize()
  +        throws Exception
  +    {
  +        m_rmification.publish( this, m_publicationName );
  +    }
  +
  +    public void dispose()
  +    {
  +        try
  +        {
  +            m_rmification.unpublish( m_publicationName );
  +        }
  +        catch ( final Exception e )
  +        {
  +            getLogger().error( "Fail to unpublish service", e );
  +        }
  +    }
  +
       public String sayHello( final String yourName )
           throws RemoteException
       {
  
  
  
  1.3       +7 -1      
jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServerImpl.xinfo
  
  Index: RMIHelloWorldServerImpl.xinfo
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/demo/src/java/org/apache/avalon/cornerstone/demos/rmihelloworldserver/RMIHelloWorldServerImpl.xinfo,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RMIHelloWorldServerImpl.xinfo     15 Jan 2002 10:42:25 -0000      1.2
  +++ RMIHelloWorldServerImpl.xinfo     4 Feb 2002 10:42:30 -0000       1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0"?>
  -<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN" 
  +<!DOCTYPE blockinfo PUBLIC "-//PHOENIX/Block Info DTD Version 1.0//EN"
                     "http://jakarta.apache.org/phoenix/blockinfo_1_0.dtd";>
   
   <blockinfo>
  @@ -14,5 +14,11 @@
       <service 
name="org.apache.avalon.cornerstone.demos.rmihelloworldserver.RMIHelloWorldServer"
                version="1.0" />
     </services>
  +
  +  <dependencies>
  +    <dependency>
  +      <service 
name="org.apache.avalon.cornerstone.services.rmification.RMIfication" 
version="1.0"/>
  +    </dependency>
  +  </dependencies>
   
   </blockinfo>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to