Delphi Clients can not communicate with Java/Corba Server , a simple sample from Jbuilder 7/8 using POA.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rogelio_Samayoa
Posted On:   Tuesday, June 17, 2003 04:10 PM

I have trouble using POA. With BOA Java/Corba Server examples, Delphi Clients can communicate my Server/Objects (Great!! ) , but with Jbuilder7/8 simple sample with Java/Corba using POA , clients could not view them , it seems like them are not active. osfind messages: osfind: There are no OADs running on in your domain. osfind: There are no Object Implementations registered with OADs. osfind: There are no manually started Object Implementations. This is a simple sample from Borland and they are using POA ,but Delphi clients or other clients ( not Java Clients ) can't find the objects. My Question is How can I manualy activte my OBJ implementations ? Is this a manually activation ? "   More>>

I have trouble using POA. With BOA Java/Corba Server examples, Delphi Clients can communicate my Server/Objects (Great!! ) , but with Jbuilder7/8 simple sample with Java/Corba using POA , clients could not view them , it seems like them are not active.

osfind messages:

osfind: There are no OADs running on in your domain.
osfind: There are no Object Implementations registered with OADs.
osfind: There are no manually started Object Implementations.

This is a simple sample from Borland and they are using POA ,but Delphi clients or other clients ( not Java Clients ) can't find the objects.
My Question is How can I manualy activte my OBJ implementations ?

Is this a manually activation ? " poaAccountManager.activate_object_with_id(name.getBytes(),new AccountManagerImpl());"
Why I could not find them active?


BOA Sample I'm using JBuilder3 ,Osagent Visibroker 3.x,
Delphi6. ( Works Fine )

POA Sample I'm using JBuilder8 & Borland App. Server. 5.x Osagent Visibroker for C++ 5.01.. , Delphi 6 ( Doesn't work ).

Sample Code Server

			
package test;

import test.Bank.server.*;
import javax.swing.UIManager;
import java.awt.*;
import org.omg.PortableServer.*;

public class BankServerApp {

boolean packFrame = false;

public BankServerApp() {
ServerFrame frame = new ServerFrame();

if (packFrame) {
frame.pack();
}
else {
frame.validate();

}
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setLocation( (screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
}

public static void main(String[] args) {
try {
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
//UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch (Exception ex) {
}
new BankServerApp();

try {
java.util.ResourceBundle res = java.util.ResourceBundle.getBundle(
"test.Bank.server.ServerResources");
String name;

//(debug support)System.getProperties().put("vbroker.agent.debug", "true");
//(debug support)System.getProperties().put("vbroker.orb.warn", "2");
if (System.getProperties().get("vbroker.agent.port") == null) {
System.getProperties().put("vbroker.agent.port", "14000");
}
if (System.getProperties().get("org.omg.CORBA.ORBClass") == null) {
System.getProperties().put("org.omg.CORBA.ORBClass",
"com.inprise.vbroker.orb.ORB");
}
if (System.getProperties().get("org.omg.CORBA.ORBSingletonClass") == null) {
System.getProperties().put("org.omg.CORBA.ORBSingletonClass",
"com.inprise.vbroker.orb.ORB");
}

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, System.getProperties());

POA poaRoot = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

name = "AccountManager";
org.omg.CORBA.Policy[] AccountManagerPolicies = {
poaRoot.create_lifespan_policy(LifespanPolicyValue.PERSISTENT)
};
POA poaAccountManager = poaRoot.create_POA(name + "_poa",
poaRoot.the_POAManager(),
AccountManagerPolicies);
poaAccountManager.activate_object_with_id(name.getBytes(),
new AccountManagerImpl());
ServerMonitor.log(ServerResources.format(res.getString("created"),
"BankServerApp.java AccountManager"));

poaRoot.the_POAManager().activate();
ServerMonitor.log(ServerResources.format(res.getString("isReady"),
"BankServerApp.java Bank"));
orb.run();
}
catch (Exception ex) {
System.err.println(ex);
}
}
}
   <<Less
About | Sitemap | Contact