ExempleCh07_01_cas5_event_pushRetourTélécharger Exemple de l'utilisation d'un canal d'évènement en CORBA. ChannelServer.java package my_event; /** * * This drives the event channel object. * */ import org.jacorb.events.*; import org.omg.CosEventChannelAdmin.*; import org.omg.CosNaming.*; public class ChannelServer { static public void main( String[] argv ) { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(argv, null); try { org.omg.PortableServer.POA poa = org.omg.PortableServer.POAHelper.narrow( orb.resolve_initial_references("RootPOA")); NamingContextExt nc = NamingContextExtHelper.narrow( orb.resolve_initial_references("NameService")); EventChannelImpl channel = new EventChannelImpl(orb,poa); poa.the_POAManager().activate(); org.omg.CORBA.Object o = poa.servant_to_reference(channel); nc.bind(nc.to_name("eventchannel.example"), o); orb.run(); } catch( Exception e) { e.printStackTrace(); } } } Consommer.java package my_event; import java.io.*; import org.omg.CORBA.*; import org.omg.CosEventChannelAdmin.*; import org.omg.CosEventComm.*; import org.omg.CosNaming.*; class Consommateur implements PushConsumerOperations { public Consommateur() { } public void disconnect_push_consumer() { System.out.println("Consumer disconnected."); } public synchronized void push(org.omg.CORBA.Any data) throws org.omg.CosEventComm.Disconnected { System.out.println("event : " + data.extract_string()); } } public class Consommer { public static void main( String args[] ) { EventChannel ecs = null; ConsumerAdmin ca = null; PushConsumer pushConsumer = null; ProxyPushSupplier pps = null; try { //Initialisation de l'ORB. ORB orb = ORB.init( args, null ); org.omg.PortableServer.POA poa = org.omg.PortableServer.POAHelper.narrow( orb.resolve_initial_references("RootPOA")); poa.the_POAManager().activate(); // Récupération du Main Service NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); // Récupération du canal d'évènement ecs = EventChannelHelper.narrow(nc.resolve( nc.to_name("eventchannel.example"))); // On obtient les proxy des fournisseurs ca = ecs.for_consumers(); pps = ca.obtain_push_supplier(); // Création du consommateur (comme un servant on obtient la référence // a un objet CORBA PushConsumerPOATie pt = new PushConsumerPOATie( new Consommateur() ); pt._this_object(orb); pushConsumer = PushConsumerHelper.narrow(poa.servant_to_reference(pt) ); // On connecte le consommateur au proxy des fournisseurs suivant le modèle push pps.connect_push_consumer( pushConsumer ); System.out.println("PushConsumerImpl registered."); orb.run(); } catch( Exception ex ) { ex.printStackTrace(); } } } Producter.java package my_event; import java.io.*; import org.omg.CORBA.*; import org.omg.PortableServer.*; import org.omg.CosNaming.*; import org.omg.CosEventChannelAdmin.*; import org.omg.CosEventComm.*; import org.jacorb.events.*; class Producteur extends PushSupplierPOA { private EventChannel _ec; private org.omg.CORBA.ORB _orb; private ProxyPushConsumer _consommateurs; public Producteur(org.omg.CORBA.ORB orb, EventChannel ec) { _ec=ec; _orb=orb; try{ // On obtient les proxy des consommateurs suivant le modèle push SupplierAdmin supplierAdmin = _ec.for_suppliers(); _consommateurs = supplierAdmin.obtain_push_consumer(); // On connecte le producteur aux proxy des consommateur suivant le modèle push _consommateurs.connect_push_supplier( _this(_orb) ); }catch(Exception e){} } public void disconnect_push_supplier () { System.out.println ("Supplier disconnected"); } public void poster(String message) { try{ Any any = _orb.create_any(); any.insert_string(message); System.out.println("*** Pushing event"); _consommateurs.push( any ); }catch(Exception e){}; } } public class Producter { public static void main(String[] args) { try { //Initialisation de l'ORB ORB orb = ORB.init( args, null ); //Création du POA POA poa = POAHelper.narrow( orb.resolve_initial_references( "RootPOA" )); //Activation du POA poa.the_POAManager().activate(); //Récupération du Naming contexte NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); // Récupération du canal d'évènement org.omg.CosEventChannelAdmin.EventChannel e = EventChannelHelper.narrow(nc.resolve( nc.to_name("eventchannel.example"))); // Création d'un producteur Producteur p = new Producteur(orb,e); // On poste 100 évènements for(int i=1;i<100;i++) p.poster("EXEMPLE DE MESSAGE " + i ); } catch( Exception e ) { System.out.println( e ); } } } build.xml <?xml version="1.0"?> <!-- ==================================================== --> <!-- Compilation d'un prog Java Corba --> <!-- ==================================================== --> <project name="PROG" default="all" basedir="."> <!-- ==================================================== --> <!-- Definition de la tache de compilation des idl --> <!-- ==================================================== --> <target name="load-taskdef"> <taskdef name="jacidl" classname="org.jacorb.idl.JacIDL"> <classpath> <pathelement path="${env.CLASSPATH}" /> <fileset dir="${env.JACORB_HOME}/lib"> <include name="*.jar" /> </fileset> </classpath> </taskdef> </target> <!-- ==================================================== --> <!-- Initialisation : definition des proprietes, creation des repertoires, ... --> <!-- ==================================================== --> <target name="init"> <property environment="env" /> <property name="dirs.base" value="${basedir}"/> <property name="jacorb.dir" value="C:\JacORB-2.2.3" /> <property name="classdir" value="${dirs.base}/classes"/> <property name="lib" value="${jacorb.dir}/lib"/> <property name="dest" value="${dirs.base}/generated"/> <property name="include" value="${jacorb.dir}/idl/omg"/> <mkdir dir="${classdir}"/> </target> <!-- ==================================================== --> <!-- Compilation Java : - compilation des fichiers generes par la compilation des idl - compilation des fichiers java de haut nouveau du projet --> <!-- ==================================================== --> <target name="all" depends="init,idl"> <javac srcdir="${dest}" destdir="${classdir}" includes="**/*.java"> </javac> <javac srcdir="${dirs.base}" destdir="${classdir}" includes="*.java"> <classpath> <pathelement location="${lib}/jacorb.jar" /> <pathelement path="${java.class.path}/" /> </classpath> </javac> </target> <!-- ==================================================== --> <!-- Compilation des idl --> <!-- ==================================================== --> <target name="idl" depends="init,load-taskdef"> <mkdir dir="${dest}" /> <jacidl srcdir="${dirs.base}" destdir="${dest}" includepath="${include}" includes="*.idl"/> </target> <!-- ==================================================== --> <!-- Nettoyage avant compilation --> <!-- ==================================================== --> <target name="clean" depends="init"> <delete dir="${classdir}"/> <delete dir="${dest}"/> </target> </project> <!-- ==================================================== --> <!-- QUELQUES RECOMMANDATIONS : - ne pas mettre de caracteres accentuees: "Invalid byte 2 of 3 bytes UTF-8 sequence" (ceci a ete observe sous Windows Xp) - attention au item "delete" pour ne pas supprimer des fichiers lors de vos premiers pas avec ant. Faites toujours une sauvegarde de vos repertoires avant. - ne pas mettre de commentaires avant la 1ere ligne. - ce programme ant n'utilise aucun autre fichier ant (pas d'include). --> <!-- ==================================================== --> compil.bat call ant clean call ant pause etc jacorb.properties ## ## JacORB configuration options ## ######################################## # # # Initial references configuration # # # ######################################## # # URLs where IORs are stored (used in orb.resolve_initial_service()) # DO EDIT these! (Only those that you are planning to use, # of course ;-). # # The ORBInitRef references are created on ORB startup time. In the # cases of the services themselves, this may lead to exceptions being # displayed (because the services aren't up yet). These exceptions # are handled properly and cause no harm! #ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root ORBInitRef.NameService=file:/d:/NS_Ref #ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref #ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef ######################################## # # # Export of corbaloc IORs # # # ######################################## # allow for more readable corbaloc URLs by mapping the # actual object key to an arbitrary string. The mapping # below would permit clients of a name service to # access it using corbaloc::ipaddress:portnum/NameService # Note: it is NOT necessary to define this property for # the name service here because this is done already in the # code of the ns implementation. # This mapping can be altered programatically by the proprietary # function ORB::addObjectKey(NameService, file:/home/rnc/NameSingleton.ior) # # The property also accepts the following mappings: # IOR, resource, jndi, URL (e.g. file, http) # examples: # jacorb.orb.objectKeyMap.NameService=StandardNS/NameServer-POA/_root # jacorb.orb.objectKeyMap.NameService=file:/home/rnc/NameSingleton.ior ################################## # # # ORB version number output # # # ################################## # if on, the ORB's version number and a copyright statement is printed # any time the ORB is initialized jacorb.orb.print_version=on ################################## # # # Default Logging configuration # # # ################################## # Name of the factory class that plugs in a given log kit # The default value is JacORB's own factory for the Apache # LogKit. Only edit (or uncomment) if you want a different # log kit. #jacorb.log.loggerFactory=org.jacorb.util.LogKitLoggerFactory # log levels: # # 0 = fatal errors only = "almost off" (FATAL ERRORS) # 1 = non-fatal errors and exceptions (ERROR) # 2 = important messages (WARN) # 3 = informational messages and exceptions (INFO) # 4 = debug-level output (DEBUG) (may confuse the unaware user :-) # NOTE: the name of this property has changed from jacorb.verbosity!! jacorb.log.default.verbosity=2 # where does output go? Terminal is default #jacorb.logfile=LOGFILEPATH # If logging to file whether to append to existing file or overwrite jacorb.logfile.append=off # If jacorb.logfile.append is on, set rolling log size in kilobytes. # A value of 0 implies no rolling log jacorb.logfile.maxLogSize=0 # hexdump outgoing messages jacorb.debug.dump_outgoing_messages=off # hexdump incoming messages jacorb.debug.dump_incoming_messages=off jacorb.util.tpool.log.verbosity=0 ################################################## # # # WARNING: The following properties should # # only be edited by the expert user. They # # can be left untouched in most cases! # # # ################################################## ################################ # # # Basic ORB Configuration # # # ################################ # the GIOP minor version number to use for newly created IORs jacorb.giop_minor_version=2 # number of retries if connection cannot directly be established jacorb.retries=5 # how many msecs. do we wait between retries jacorb.retry_interval=500 # log2 of maximum buffer size managed by the internal # buffer manager. # # This is NOT the maximum buffer size that # can be used, but just the largest size of buffers that # will be kept and managed. This value will be added to # an internal constant of 5, so the real value in bytes # is 2**(5+maxManagedBufSize-1). You only need to increase this # value if you are dealing with LOTS of LARGE data structures. # You may decrease it to make the buffer manager release large # buffers immediately rather than keeping them for later # reuse. jacorb.maxManagedBufSize=18 # If this value is 0 an extra unlimited size buffer cache is created # for the CDROutputStreams. If this value is > 0 then the cache will # be purged every x msecs. If this value is -1 no caching of these # buffers will take place. This will reduce memory footprint at the # cost of decreased performance handling large data structures. # This value defaults to 0 if not set. #jacorb.bufferManagerMaxFlush=-1 # Normally, a jacorb server will close the TCP/IP connection right # after sending a CloseConnection message. However, it may # occasionally happen that the client sends a message into the closed # connection because it hasn't handled the CloseConnection yet. To # avoid this situation, closing of the TCP/IP connection can be delayed. #jacorb.connection.delay_close=on #jacorb.connection.timeout_after_closeconnection=20000 # Initial timeout for establishing a connection. #jacorb.connection.client.connect_timeout=0 # Wait the specified number of msecs for a reply to a request. If # exceeded, a org.omg.CORBA.TIMEOUT exception will be thrown #jacorb.connection.client.pending_reply_timeout=0 # client-side connection idle timeout, set no non-zero to stop # close the connection after so many msecs. #jacorb.connection.client.idle_timeout=0 # shall the orb ignore pending messages when a connection idle timeout # is detected? If "on", the connection is closed and all pending # messages are cancelled. Default is "off" #jacorb.connection.client.timeout_ignores_pending_messages=off # whenever a network failure is detected, the orb can either # (infinitely) retry all pending requests, or propagate a COMM_FAILURE # back into the client code. Default is "off", i.e. throw a # COMM_FAILURE #jacorb.connection.client.retry_on_failure=off # max time (msecs) a server keeps a connection open if nothing happens #jacorb.connection.server.timeout=10000 # Max no of accepted connections on the server. #jacorb.connection.max_server_connections= # Max number of connection threads. #jacorb.connection.max_threads= # The number of msecs that are waited until the next attempt to find # an idle connection is made (i.e. do not continuously spin) #jacorb.connection.wait_for_idle_interval=500 # The class name of the SelectionStrategy class #jacorb.connection.selection_strategy_class= # The class name of the StatisticsProvider class #jacorb.connection.statistics_provider_class= #jacorb.reference_caching=off # # The following property specifies the class which is used for # reference caching. WeakHashtable uses WeakReferences, so entries # get gc'ed if only the Hashtable has a reference to them. This # is useful if you have many references to short-living non-persistent # CORBA objects. It is only available for java 1.2 and above. # # On the other hand the standard Hashtable keeps the references until # they are explicitely deleted by calling _release(). This is useful # for persistent and long-living CORBA objects. # #jacorb.hashtable_class=org.jacorb.util.WeakHashtable # jacorb.hashtable_class=java.util.Hashtable # use GIOP 1.2 byte order markers (since CORBA 2.4-5) jacorb.use_bom=off # add additional IIOP 1.0 profiles even if we are using IIOP 1.2 jacorb.giop.add_1_0_profiles=off # Use DNS names in IORs jacorb.dns.enable=off # Compact Typecodes (0 - off, 1 - partial (not member_names), 2 - all) jacorb.compactTypecodes=0 # Cache typecode on read jacorb.cacheTypecodes=off # Cache poa names jacorb.cachePoaNames=off ########################################### # # # Interoperability # # # ########################################### # Turn off indirection encoding for repeated typecodes. This fixes # interoperability with certain broken ORB's eg. Orbix2000 jacorb.interop.indirection_encoding_disable=off # Iona Comet CORBA/COM bridge can incorrectly encode buffer lengths. # Enabling this property adds additional length checking and adjustment # for interoperability with Comet. jacorb.interop.comet=off # Some ORBs do not set a byte value of 1 as a CDR encoded boolean true # value. Enabling this property interprets any non zero CDR encoded # boolean value as true. jacorb.interop.lax_boolean_encoding=off # Control whether the method create_abstract_interface_tc performs # a validity check on the name parameter or not. Turning this check # off circumvents a bug in Sun's implementation of javax.rmi.CORBA.ValueHander, # which occasionally passes an invalid name (an empty string) to # ORBSingleton.create_abstract_interface_tc. If you are using RMI valuetypes, # you should turn this property off. jacorb.interop.strict_check_on_tc_creation=on # Custom-marshalled RMI valuetypes should be encoded as chunks, but some # ORBs are not able to decode chunked values. Disable this property for # interoperability with the ORB in Sun's JDK 1.4.2. jacorb.interop.chunk_custom_rmi_valuetypes=on ########################################### # # # Socket Factories # # # ########################################### # A factory design pattern is used for the creation of sockets and server # sockets. # The jacorb.net.socket_factory property can be used to configure # a socket factory that must implement the operations defined in the # interface org.jacorb.orb.factory.SocketFactory. # The jacorb.net.server_socket_factory property can be used to configure a # server socket factory that must implement the operations defined in the # interface org.jacorb.orb.factory.ServerSocketFactory. # #jacorb.net.socket_factory=org.jacorb.orb.factory.DefaultSocketFactory #jacorb.net.server_socket_factory=org.jacorb.orb.factory.DefaultServerSocketFactory #jacorb.net.socket_factory=org.jacorb.orb.factory.PortRangeSocketFactory #jacorb.net.server_socket_factory=org.jacorb.orb.factory.PortRangeServerSocketFactory # # Additional socket factores are supported that allow for the configuration # of maximum and minimum port numbers that can be used. This can be used to # enable firewall traversal via a fixed port range. To use these socket factories # configure one or both of the following property pairs. The first property pair # configures the client socket factory and the second pair the server socket # factory. # #jacorb.net.socket_factory.port.min #jacorb.net.socket_factory.port.max #jacorb.net.server_socket_factory.port.min #jacorb.net.server_socket_factory.port.max ########################################### # # # BiDirectional GIOP # # # ########################################### # uncomment this initializer if you want to use BiDirectional GIOP #org.omg.PortableInterceptor.ORBInitializerClass.bidir_init=org.jacorb.orb.giop.BiDirConnectionInitializer ########################################### # # # Proxy address in IOR # # # ########################################### # # Some times it is necessary to present an endpoint alias in an IOR # to allow clients outside a firewall to get a connection to a server # that is behind a NAT'ing firewall. # # WARNING: this is just "dumb" replacing, so you # have to take care of your configuration! # # The general form of this address is <protocol key>://<address> # The protocol key in the address must match the protocol(s) used by # the server. See the section on configuring Transport Factories for # information on loading specific protocols. #jacorb.ior_proxy_address=iiop://1.2.3.4:4711 # Deprecated IIOP-specific form: # with these two properties it is possible to # tell the ORB what IP/port IORs should contain, # if the ServerSockets IP/port can't be used # (e.g. for traffic through a firewall). # # WARNING: this is just "dumb" replacing, so you # have to take care of your configuration! # #jacorb.ior_proxy_host=1.2.3.4 #jacorb.ior_proxy_port=4711 ########################################### # # # The Object Adapter Internet Address # # # ########################################### # IP address on multi-homed host (this gets encoded in # object references). NOTE: Adresses like 127.0.0.X # will only be accessible from the same machine! #OAIAddr=1.2.3.4 #OAPort=4711 # A new protocol-independent configuration is available # for use to configure an explicit endpoint using IIOP or # other protocols. #OAAddress=iiop://1.2.3.4:4711 ############################ # # # Default Interceptors # # Please leave them in! # # # ############################ org.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer ############################################### # # # Implementation Repository Configuration # # # ############################################### # Switch off to avoid contacting the ImR on every server start-up jacorb.use_imr=off # Switch off if you don't want to write the ImR address into server IORs # (ignored if jacorb.use_imr=off) jacorb.use_imr_endpoint=on # if set to "on", servers that don't already have an entry on their # first call to the imr, will get automatically registered. Otherwise, # an UnknownServer exception is thrown. jacorb.imr.allow_auto_register=off # if set to "on", the imr will try to "ping" every object reference, # that it is going to return. If the reference is not alive, TRANSIENT # is thrown. jacorb.imr.check_object_liveness=off ORBInitRef.ImplementationRepository=http://www.x.y.z/~user/ImR_Ref jacorb.imr.table_file=Z:\table.dat jacorb.imr.backup_file=z:\backup.dat jacorb.imr.ior_file=/home/bwana/brose/public_html/ImR_Ref # Time (msecs) that the implementation will wait for a started server to register. jacorb.imr.timeout= # Host for ImR endpoint jacorb.imr.endpoint_host= # Port number for IMR endpoint jacorb.imr.endpoint_port_number= # how many millisecs should the imr wait, until a connection from an # application client is terminated. Default is 2000. jacorb.imr.connection_timeout=2000 # the implementation name, should be set to a different # name in the code of persistent servers jacorb.implname=StandardImplName # # This is supposed to be a generic startup string for everything # that calls Runtime.exec(). Might be replaced by jaco[.bat]. # jacorb.java_exec=java -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton # with these two properties it is possible to # tell the ORB what IP / hostname and port the IMR IOR and IMRified server IORs should # contain, if the ServerSockets IP/port can't be used # (e.g. for traffic through a firewall). # # WARNING: this is just "dumb" replacement, so you # have to take care of your configuration! # #jacorb.imr.ior_proxy_host=1.2.3.4 #jacorb.imr.ior_proxy_port=4711 # protocol-independent form for assigning imr proxy endpoint #jacorb.imr.ior_proxy_address=iiop://1.2.3.4:4711 ######################### # # # SSL Configuration # # # ######################### # # The port number used by SSL, will be dynmically assigned # by default # #OASSLPort=4711 # This interceptor must be set if programs need access to # certificates using the CORBA Security API, SSL works also # without this interceptor #org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.SecurityServiceInitializer #org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.iaik.SecurityServiceInitializer # qualified classname of access decision object jacorb.security.access_decision=org.jacorb.security.level2.AccessDecisionImpl # list of qualified classnames of principal authenticator objects, # separated by commas (no whitespaces!). The first entry (that can # be successfully created) will be available through the # principal_authenticator property. jacorb.security.principal_authenticator=org.jacorb.security.level2.PrincipalAuthenticatorImpl # the qualified classname of the ssl socket factory class #jacorb.ssl.socket_factory=org.jacorb.security.ssl.sun_jsse.SSLSocketFactory jacorb.ssl.socket_factory=org.jacorb.security.ssl.iaik.SSLSocketFactory # the qualified classname of the ssl server socket factory class #jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.iaik.SSLServerSocketFactory # IIOP/SSL parameters (numbers are hex values, without the leading "0x"): # NoProtection = 1 # EstablishTrustInClient = 40 # EstablishTrustInTarget = 20 # mutual authentication = 60 # please see the programming guide for more explanation jacorb.security.support_ssl=off jacorb.security.ssl.client.supported_options=0 jacorb.security.ssl.client.required_options=0 jacorb.security.ssl.server.supported_options=0 jacorb.security.ssl.server.required_options=0 # # If set, the following two values will be placed in the IOR, if # "corbaloc:ssliop" ssliop. # # If not set, only EstablishTrustInTarget is used for both supported # and required options. EstablishTrustInClient is not set, and the # rest of the Association Options aren't currently used anyway. #jacorb.security.ssl.corbaloc_ssliop.supported_options=0 #jacorb.security.ssl.corbaloc_ssliop.required_options=0 # The name and location of the keystore. This may be absolute or # relative to the home directory, or a file retrievable through the # classloader. # # NOTE (for Sun JSSE users): The "javax.net.ssl.trustStore[Password]" # properties don't seem to take effect, so you may want to add trusted # certificates to "normal" keystores. In this case, please set the # property "jacorb.security.jsse.trustees_from_ks"is to "on", so trusted # certificates are taken from the keystore instead of a dedicated # truststore. jacorb.security.keystore= jacorb.security.keystore_password= # # IAIK specific settings # # files with public key certs of trusted CAs # # WARNING: If no CA certs are present, the IAIK chain verifier will # accept ALL otherwise valid chains! # jacorb.security.trustees= # the name of the default key alias to look up in the keystore jacorb.security.default_user= jacorb.security.default_password= # have iaiks ssl classes print debug output to stdout jacorb.security.iaik_debug=off # # Sun JSSE specific settings # # Use the keystore to take trusted certs from. jacorb.security.jsse.trustees_from_ks=off # A comma-separated (no whitespaces!) list of cipher suite names. See # the JSSE docs on how to obtain the correct cipher suite strings jacorb.security.ssl.server.cipher_suites= jacorb.security.ssl.client.cipher_suites= # A comma seperated list of the names of the protocols to be set enabled on # the SSL socket. See the JSSE documentation for # javax.net.ssl.SSLSocket#setEnabledProtocols() # NOTE: Does only apply to jdk1.4 and above #jacorb.security.ssl.client.protocols= #jacorb.security.ssl.server.protocols= # A user defined javax.net.ssl.TrustManager implemementation class name. # Will be used to intialise the SSLContext. See JSSE docs for javax.net.ssl.SSLContext#init(). # Must be capable of instantiation via a no arg constructor. #jacorb.security.ssl.client.trust_manager=my.trust.Manager #jacorb.security.ssl.server.trust_manager=my.trust.Manager ######################### # # # POA Configuration # # # ######################### # displays a GUI monitoring tool for servers jacorb.poa.monitoring=off # POA log levels: # 0 = fatal errors only = "almost off" (FATAL ERRORS) # 1 = non-fatal errors and exceptions (ERROR) # 2 = important messages (WARN) # 3 = informational messages and exceptions (INFO) # 4 = debug-level output (DEBUG) (may confuse the unaware user :-) jacorb.poa.log.verbosity=3 # thread pool configuration for request processing jacorb.poa.thread_pool_max=20 jacorb.poa.thread_pool_min=5 # if set, request processing threads in thePOA # will run at this priority. If not set or invalid, # MAX_PRIORITY will be used. #jacorb.poa.thread_priority= # Properties controlling the POA's request queue. If queue_wait is off, # then if there are more than queue_max requests in the queue, the # client gets TRANSIENT exceptions for any requests. If queue_wait is on, # then the call blocks at the server side until no more than queue_min # requests are left in the queue. The new request is then delivered as usual. jacorb.poa.queue_wait=off jacorb.poa.queue_max=100 jacorb.poa.queue_min=10 # Set this to on for server-side checking of expired ReplyEndTimePolicy. # (This also applies to RelativeRoundtripTimeoutPolicy.) When this is on, # the clocks of the server and client machine need to be synchronized. #jacorb.poa.check_reply_end_time=off ################################### # # # Transport Layer Configuration # # # ################################### # Names of the factories classes for all installed transport plug-ins # (comma-separated list). #jacorb.transport.factories=org.jacorb.orb.iiop.IIOPFactories # ProfileId tags of all installed transports that should actually # listen on the server side. This is a comma-separated list of numbers, # each number must correspond to one ProfileId tag from a factory in # jacorb.transport.factories. In IORs produced by the server, the transport # profiles will appear in the order indicated by this list. #jacorb.transport.server.listeners=0 # Name of a class that selects the transport profile to use on the # client side. #jacorb.transport.client.selector=org.jacorb.orb.DefaultProfileSelector ################################## # # # Name Service Configuration # # # ################################## # log levels: # 0 = fatal errors only = "almost off" (FATAL ERRORS) # 1 = non-fatal errors and exceptions (ERROR) # 2 = important messages (WARN) # 3 = informational messages and exceptions (INFO) # 4 = debug-level output (DEBUG) (may confuse the unaware user :-) jacorb.naming.log.verbosity=3 # # name of the logger factory. Implement your own subclass of # org.jacorb.util.LoggerFactory and enter class name here to # customize logging behavior. Built-in default is org.jacorb.util.LogKitLoggerFactory #jacorb.log.loggerFactory= # Whether non active references are purged from name service # when list operation is invoked. jacorb.naming.purge=on # Whether resolve should return references without trying to # ping them to see if they're still alive first. jacorb.naming.noping=on # The file where the name server drops its IOR jacorb.naming.ior_filename=d:/NS_Ref ######################################## # # # Trader configuration, please see # # src/trading/README.PROPERTIES for # # explanation # # # ######################################## jtrader.util.max_threads=10 jtrader.util.min_threads=1 jtrader.util.query_timeout=5000 jtrader.impl.cache_max=100 # boolean values, e.g. true / false #jtrader.modifiable_properties= #jtrader.dynamic_properties= #jtrader.proxy_offers= jtrader.debug=false jtrader.debug_verbosity=3 #integer values jtrader.def_search_card= jtrader.max_search_card= jtrader.def_match_card= jtrader.max_match_card= jtrader.def_return_card= jtrader.max_return_card= jtrader.max_list= jtrader.def_hop_count= jtrader.max_hop_count= #FollowOptions #always=2 #if_no_local=1 #local_only=0 jtrader.def_follow_policy= jtrader.max_follow_policy= jtrader.max_link_follow_policy= ######################################################## # # # Notification Service configuration, please see # # the JacORB ProgrammingGuide for a explanation # # # ######################################################## jacorb.notification.filter.thread_pool_size = 2 jacorb.notification.proxyconsumer.thread_pool_size = 2 jacorb.notification.proxysupplier.thread_pool_size = 4 jacorb.notification.supplier.poll_intervall = 1000 jacorb.notification.max_batch_size = 1 jacorb.notification.max_events_per_consumer = 100 jacorb.notification.order_policy = PriorityOrder jacorb.notification.discard_policy = PriorityOrder jacorb.notification.consumer.backout_interval = 5000 jacorb.notification.consumer.error_threshold = 3 # valid values: ThreadPool, ThreadPerProxy jacorb.notification.proxysupplier.threadpolicy = ThreadPool jacorb.notification.default_filter_factory = builtin # jacorb.notification.supplier.max_number = 10 # jacorb.notification.start_time_supported = 10 jacorb.notification.stop_time_supported = on jacorb.notification.proxy.destroy_causes_disconnect = on # Notification Service log levels: org.jacorb.notification.log.verbosity = 3 ######################################## # # # SAS configuration # # # ######################################## jacorb.SAS.log.verbosity=INFO jacorb.SAS.CSS.log.verbosity=INFO jacorb.SAS.TSS.log.verbosity=INFO # This option defines the specific SAS context generator/validator # Currently supported contexts include: # NullContext - Sends a NULL SAS Context # GssUpContext - Uses GSSUP security # KerberosContext - uses Kerberos security # At least one context must be selected for SAS support #jacorb.security.sas.contextClass=org.jacorb.security.sas.NullContext #jacorb.security.sas.contextClass=org.jacorb.security.sas.GssUpContext #jacorb.security.sas.contextClass=org.jacorb.security.sas.KerberosContext # This initializer installs the SAS interceptors # Comment out this line if you do not want SAS support #org.omg.PortableInterceptor.ORBInitializerClass.SAS=org.jacorb.security.sas.SASInitializer # This option is used for GSSUP security and sets up the GSS Provider # Comment out this line if you are not using GSS UP authentication #org.omg.PortableInterceptor.ORBInitializerClass.GSSUPProvider=org.jacorb.security.sas.GSSUPProviderInitializer ######################################## # # # Custom configuration # # # ######################################## # any other custom properties can be added here. runChannel.bat cd classes call jaco -Djacorb.config.dir=".." my_event.ChannelServer pause runConsommer.bat cd classes call jaco -Djacorb.config.dir=".." my_event.Consommer pause runNS.bat cd etc ns runProducter.bat cd classes call jaco -Djacorb.config.dir=".." my_event.Producter pause