Results 1 to 2 of 2

Thread: Icegrid descriptors and dbenv

  1. #1
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    Icegrid descriptors and dbenv

    Hello zeroc


    I using this descriptor for creating the service

    i have a few questions

    1) how make the dbenv property relative to the icegridnode database, is correct put the dbenv in the icegridnode database.

    2) the dbenv must be unique for all dbs?

    3) whe especify a DbEnv this is relative to [node-db]/servers/[server-name]/dbs is posible automatic create the DbEnv or this must be done in the application


    Code:
    <icegrid>
    	<application name="hydra" import-default-templates="true">
    		<node name="titanio">
    		<!--FileService-->
    		<!--Servicio de ficheros-->
    		<server-instance 
    			template="ModelServer"
    			icebox-id="FileService"
    			server-name="Files"
    			dll-entry-point="Files:create"
    			type="::Oz::Files::FileServer"
    			exe="/opt/Ice-3.0.1/bin/icebox"
    			identity="FileServer/Alcompleto"
    			luceneServiceId="LuceneServer/Alcompleto"
    			indexDir="/home/pepone/hydra/DB/LuceneDb"
    			DbEnv="Files"
    			DbFile="FilesDB"
    			DbHome="/home/pepone/hydra/DB/Files"
    			MessageSizeMax="2048"
    			ThreadPool.Server.Size="2"
    			ThreadPool.Server.SizeMax="5"/>
                 </node>
          </application>
    </icegrid>
    Here is the modelServer template
    Code:
    <server-template id="ModelServer">
    	<parameter name="icebox-id"/>
    	<parameter name="server-name"/>
    	<parameter name="dll-entry-point"/>
    	<parameter name="type"/>
    	<parameter name="exe"/>
    	<parameter name="identity"/>
    	<parameter name="luceneServiceId"/>
    	<parameter name="indexDir"/>
    	<parameter name="DbEnv"/>
    	<parameter name="DbFile"/>
    	<parameter name="DbHome"/>
    	<parameter name="MessageSizeMax"/>
    	<parameter name="ThreadPool.Server.Size"/>
    	<parameter name="ThreadPool.Server.SizeMax"/>
    			
    	<icebox id="${icebox-id}"
    		exe="${exe}"
    		activation="on-demand">	
    		<service name="${server-name}" entry="${dll-entry-point}">
    			<adapter name="${service}" endpoints="tcp">
    				<object 
    					identity="${identity}" 
    					type="${type}"/>
    			</adapter>
    			
    		<property name="ModelServerId" value="${identity}"/>
    		<property name="luceneServiceId" value="${luceneServiceId}"/>
    		<property name="FreezeDbEnv" value="${DbEnv}"/>
    		<property name="FreezeDbFile" value="${DbFile}"/>
                    <property name="SearchServerIndexDir" value="${indexDir}/${server-name}"/>
    		<property name="SearchServerName" value="${identity}-SearchServer"/>
    		<property name="Ice.ThreadPool.Server.Size" value="${ThreadPool.Server.Size}"/>
    		<property name="Ice.ThreadPool.Server.SizeMax" value="${ThreadPool.Server.SizeMax}"/>
    		<property name="Ice.MessageSizeMax" value="${MessageSizeMax}"/>
    		<property name="Freeze.DbEnv.${DbEnv}.OldLogsAutoDelete" value="1"/>
    		<property name="Freeze.DbEnv.${DbEnv}.DbPrivate" value="0"/>
    		<property name="Freeze.DbEnv.${DbEnv}.CheckpointPeriod" value="120"/>
    		<dbenv name="${DbEnv}" home="${DbHome}"/>
    		<!-- Activar SysLog como logger para Ice-->
    		<property name="Ice.UseSyslog" value="1"/>
    		<!-- Activar timestamp en los logs del sistema-->
    		<property name="Ice.Logger.Timestamp" value="1"/>
    	</service>
    </icebox>
    </server-template>

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Quote Originally Posted by xdm
    Hello zeroc


    I using this descriptor for creating the service

    i have a few questions

    1) how make the dbenv property relative to the icegridnode database, is correct put the dbenv in the icegridnode database.
    If you don't specify the home attribute in the dbenv element, the IceGrid node will create a directory in the node data directory for the dbenv, more precisely it will create the directory: <node-datadir>/servers/<server-id>/dbs/<dbenv-name>

    It will also generate the Freeze.DbEnv.<dbenv-name>.DbHome property with the correct value in the server configuration file. See the IceGrid XML reference from the Ice manual for more information.

    2) the dbenv must be unique for all dbs?
    The dbenv name must be unique within the server scope.

    3) whe especify a DbEnv this is relative to [node-db]/servers/[server-name]/dbs is posible automatic create the DbEnv or this must be done in the application
    This is automatic if you don't set the "home" attribute for the dbenv element.

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 09-27-2010, 02:55 AM
  2. Replies: 1
    Last Post: 11-23-2006, 02:33 AM
  3. escaping ${ } in xml descriptors
    By dwk in forum Help Center
    Replies: 2
    Last Post: 04-04-2005, 04:29 PM
  4. Freeze DbEnv error
    By xdm in forum Help Center
    Replies: 2
    Last Post: 01-07-2005, 03:36 PM
  5. DbEnv Error!
    By weiwei in forum Comments
    Replies: 1
    Last Post: 05-13-2004, 12:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •