-
1. Re: Oracle to JBoss RMI question
darranl Aug 6, 2004 7:05 AM (in response to scr1701)Scrap everything that you have done so far.
Do you have an understanding of J2EE? If not go to www.theserverside.com and download a copy of matering enterprise java beans.
Next follow through the getting started guide and make sure you understand how to write, deploy and use the different types of components.
What do you mean by connecting an Oracle package, and what do you mean by created a client class and loaded it into Oracle? What Oracle, do you mean the app server, database server or something else? -
2. Re: Oracle to JBoss RMI question
scr1701 Aug 6, 2004 10:41 AM (in response to scr1701)Thanks for your reply. I'm a newbie to J2EE but working on it. I'll attempt to answer your questions now -
1. A user can push a button on the interface we have that will call the Procedure in the Oracle package. Here's the oracle code:
create or replace package snfeedinterface as
procedure getReferralStatus;
end;
/
create or replace package body sneedinterface as
procedure getReferralStatus as language java name 'mydept.testing.OracleSNFeedInterface.getReferralStatus()';
end;
/
2. The client has been loaded into the oracle database using loadjava:
a. RemoteSnFeedInterface.class
public interface RemoteSnFeedInterface extends java.rmi.Remote {
public String getReferralStatus() throws java.rmi.RemoteException;
}
b. OracleSnFeedInterface.class
public class OracleSnFeedInterface {
public OracleSnFeedInterface() {
}
public static String getReferralStatus() throws Exception {
RemoteSnFeedInterface r = getRemoteSnFeedInterface();
return r.getReferralStatus();
}
private static RemoteSalesnetFeedInterface getRemoteSalesnetFeedInterface() throws Exception {
String rmiName = "SnFeedRMI";
RemoteSnFeedInterface r = (RemoteSnFeedInterface) Naming.lookup("rmi://10.2.86.190:1099/"+rmiName);
return r;
}
}
c. Stub class
On the remote side, I'm running jboss 3.2.3 as you know. -
3. Re: Oracle to JBoss RMI question
darranl Aug 9, 2004 10:24 AM (in response to scr1701)Ok that makes a bit more sense.
Still scrap everything that you have been doing so far, to start with you need to learn how to write session beans and how to access them from a client.
With J2EE you do not need to get involved with the RMI side of things at all.
Once you have been able to deploy a session bean and access it from a stand alone client you can start to look at how to run the code from the DBMS.