AKAI TSUKI

System development or Technical something

JacORBのつづき

javaはC:\j2sdk1.4.2_19\bin\javaに配置しています。

  • jaco.bat
@echo off
rem call java interpreter
set CLASSPATH=.;C:\Java\JacORB\lib
C:\j2sdk1.4.2_19\bin\java -Djava.endorsed.dirs=%JACORB_HOME%\lib -Djacorb.home=%JACORB_HOME% -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -classpath %CLASSPATH% %*
  • ns.bat(Naming Service)
@echo off
rem Starts the JacORB name server
jaco org.jacorb.naming.NameServer %*
  • ntfy.bat(Notification Service)
@echo off
rem Starts the JacORB Notification Service
set CLASSPATH="..\lib\backport-util-concurrent.jar;..\lib\picocontainer-1.2.jar;..\lib\antlr-2.7.2.jar"
jaco org.jacorb.notification.ConsoleMain %*


さらに、naming serviceに登録されているオブジェクトを見ることができるっぽい。

  • nmg.bat(the JacORB name manager)
@echo off
rem Starts the JacORB name manager

jaco org.jacorb.naming.namemanager.NameManager %*


んで、idlのクラス生成用

  • idl.bat.tplをidl.batにリネームする。
  • 以下の値を適宜変更する
    • @JAVA_CMD@
    • @JACORB_HOME@
  • idl.bat
@echo off
C:\j2sdk1.4.2_19\bin\java -classpath "%JACORB_HOME%\lib\idl.jar;%JACORB_HOME%\lib\logkit-1.2.jar;%CLASSPATH%" org.jacorb.idl.parser %*

JacORBの起動

  • JacORBをダウンロード

http://www.jacorb.org/download.html

  • version 2.3.0

> Download the latest JacORB version
> The latest release is JacORB 2.3.0. For details, please see the release notes.

  • 展開する。
    • C:/Java/JacORBの下に配置されるようにした。
  • batファイル修正
    • jaco.bat.tpl → jaco.batにリネーム
    • jaco.batを環境に合わせて以下の点を修正した。
      • @JAVA_CMD@
      • @JACORB_HOME@

設定ファイルの修正

  • orb.properties
    • 以下の設定を行う。
      • jacorb.config.dir=c:/Java/JacORB
      • ORBInitRef.NameService=file:/c:/Java/JacORB/data/NS_Ref
      • jacorb.logfile=c:/Java/JacORB/log/jacorb.log
  • jacorb.properties
    • jacorb_properties.templateをjacorb.propertiesに名前を修正。
    • 以下の設定を行う。
      • ORBInitRef.NameService=file:/c:/Java/JacORB/data/NS_Ref
      • ORBInitRef.NotificationService=file:/c:/Java/JacORB/data/ES_Ref
      • ORBInitRef.InterfaceRepository=file:/c:/Java/JacORB/data/IR_Ref (これいるんかな?)
      • jacorb.naming.ior_filename=c:/Java/JacORB/data/NS_Ref

Naming Service実行

以下のようになればよい?

C:\Java\JacORB\bin>ns
[jacorb.orb.print_ver] INFO :
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        JacORB V 2.3.0, www.jacorb.org
        (C) The JacORB project 17-Feb-2007
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hashtable
[org.jacorb.orb.codes] WARN : Warning - unknown codeset (windows-31j) - defaulting to ISO-8859-1
[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server 
Interceptors, 0 Client Interceptors and 1 IOR Interceptors
[jacorb.orb.singleton] INFO : created ORBSingleton
[jacorb.naming] INFO : NS up
[jacorb.orb] INFO : ORB run

Notification Service実行

以下のようになればよい?

C:\Java\JacORB\bin>ntfy.bat
[jacorb.orb.print_ver] INFO :
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        JacORB V 2.3.0, www.jacorb.org
        (C) The JacORB project 17-Feb-2007
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[jacorb.orb] INFO : Property "jacorb.hashtable_class" is set to: java.util.Hashtable
[org.jacorb.orb.codes] WARN : Warning - unknown codeset (windows-31j) - defaulting to ISO-8859-1
[jacorb.orb.intercept] INFO : InterceptorManager started with 0 Server 
Interceptors, 0 Client Interceptors and 1 IOR Interceptors
[jacorb.poa] INFO : oid:5F 45 43 46 61 63 74 6F 72 79                               _ECFactory
object is activated
[jacorb.poa] INFO : Using server ID (4188962439) for transient POA
[jacorb.orb.singleton] INFO : created ORBSingleton
[jacorb.orb.giop] INFO : ClientConnectionManager: created new ClientGIOPConnection to 192.168.129.24:4514 (b64435)
[jacorb.orb] INFO : ORB run