Multithread remote method invocation problem

Hello all
I have simple method that is entry point of CORBA remote invocation method
Inside it I have some kind of Logic I need to perform the this logic is inside method and I like
That each method that performs logic will be executed in its own thread ( from thread pool )
this method also returns parameters by reference back to the server .
here is example:
public boolean RemothMethod(Object obj1,Object obj2){
     //this is where I allocate thread from thread pool to invoke the logic method
     ThreadPool.getTask(LogicMethod(Object obj1,Object obj2));
}But the problem I have here that I can get several "RemothMethod" calls
And the returned Parameters can be from the wrong thread call .
My question is how can I force the right thread to return the right parameters to the "RemothMethod" call

I have simple method that is entry point of CORBA
remote invocation method
Inside it I have some kind of Logic I need to perform
the this logic is inside method and I like
That each method that performs logic will be executed
in its own thread ( from thread pool )Why? Each remote method is already being executed in its own thread.
//this is where I allocate thread from thread pool
l to invoke the logic method
ThreadPool.getTask(LogicMethod(Object obj1,Object obj2));What are these APIs?
But the problem I have here that I can get several
"RemothMethod" calls
And the returned Parameters can be from the wrong
thread call . Something wrong with the ThreadPool API you seem to have written.
My question is how can I force the right thread to
return the right parameters to the "RemothMethod" callGet rid of it and execute whatever you need to execute directly in the remote method body. There is no advantage to what you're trying to do. You already have a thread per concurrent client executing the remote method; you're trying to stall those threads and create yet more threads from an evidently non-working ThreadPool. This seems quite pointless.

Similar Messages

  • Compiling Error: Lesson 8: Remote Method Invocation

    When I compile the following program examples:
    RemoteServer.java
    RMIClient1.java
    RMIClient2.java
    it gives me error (below).
    G:\home\zelda\classes>javac RemoteServer.java
    RemoteServer.java:14: cannot resolve symbol
    symbol : class Send
    location: class RemoteServer
    implements Send {
    ^
    RemoteServer.java:37: cannot resolve symbol
    symbol : class Send
    location: class RemoteServer
    Send remoteServer = new RemoteServer();
    ^
    2 errors
    What classes do I need to include to my classpath directory?
    Im using JDK1.3.1.
    Thanks in advance.

    Hi,
    The interface "Send" is also in the example! You should add the "Send.java" to the same folder as the other .java files.
    If you don't have the Send.java, you can download it from
    http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/Code/Send.java
    Also make sure the current directory is added to your classpath! You can do this by appending a ;. (semicolon period) to your classpath environment variable.
    Hope this helps,
    Kurt.

  • How to Transfer files using socket remote method invocation?

    hello guys,
    i am working on java sockets...and i need to send and receive files though Java RMI. how will i go with it....
    Please do help me in this regard
    Edited by: sandeep_genevsoftech on Apr 4, 2008 4:32 AM

    I am also developing a similar application of file transfer but using sockets in place of RMI.The file gets transfered if i run client and server on same m/c(as localhost),but shows "access denied" if run on different m/c.I suppose some security policies need to be set.Can anybody help?

  • Problem calling remote method

    All the cirrus connection is working fine, I make one net  connection and get my key, then I make a net stream, do connection with  the other user, the problem happens when i send the remote method to  call on the other user application.
    In the net status (using previuos created net  connection) event handler when the status get "Success" i make one  request like this:
    myStream.send("myFunction"); (I don`t remember if is .send or .play, but i tested both for sure)
    And i have a public function called myFunction() to be activated on the other side.
    Everything looks fine, i got the connection but i can`t access the remote method myFunction().
    If needed, i can send my code for you to see.
    Sorry for my english.
    Thanks a lot for helping!

    you can only call NetStream.send() on a publishing stream (one on which you have called NetStream.publish(streamName)).  and that NetStream must either be a client-server one (if talking to FMS) or a P2P one (either a group NetStream or a 1:1 one created as NetStream.DIRECT_CONNECTIONS).
    on the subscriber side, your "myFunction" must be a function property on the subscribing NetStream.client object.

  • Connection problem while invoking remote method from client using oracle 8.1.6 server

    while using a connection object to make connection to oracle in all remote methods(in EJB)only the first remote method called from the EJB client is getting invoked and the connection stops.It gives me COMM_FAILURE while invoking the second method in oracle 8.1.6.Help me out in this aspect immediately please.

    r singh wrote:
    >
    I am getting "No Suitable Driver" exception from WebLogic 6.1 (sp1) at
    the start up of the server.
    My settings:
    - WLS 6.1 on a solaris 8 machine and Oracle 8.1.6 on a WIN2K machine.
    - I created the connection pool for oracle with the following
    parameters:
    connection name: OracleConnectionPool
    url: jdbc.oracle.thin:@myOracleServer:1521:myDBName
    driver class name: oracle.jdbc.driver.OracleDriver
    properties: user=scott
    password=tiger
    - I have also downloaded classes12.zip and nls_charset12.zip from
    Oracle.com
    and have placed under $WL_HOME/lib.
    - I have added $WL_HOME/lib/classes12.zip:$WL_HOME/lib/nls_charset12.zip
    in
    front of the $CLASSPATH in the startWeblogic.sh script. The echoed
    classpath
    from the startup script is:
    /opt/tools/bea/wlserver6.1/lib/classes12.zip:/opt/tools/bea/wlserver6.1/lib/nls_
    charset12.zip:/opt/tools/bea/wlserver6.1:/opt/tools/bea/wlserver6.1/lib/weblogic
    _sp.jar:/opt/tools/bea/wlserver6.1/lib/weblogic.jar
    - Still I get the error:
    <Jan 16, 2002 1:38:45 PM EST> <Error> <JDBC> <Cannot startup
    connection pool "Or
    acleConnectionPool" No suitable driver>
    Can somebody point me out if i am doing anything wrong here.
    Thanks.
    RamanandHi,
    Sure. Your URL should be "jdbc:oracle:thin:@myOracleServer:1521:myDBName"
    not "jdbc.oracle.thin:@myOracleServer:1521:myDBName"
    Joe

  • Strange invocation Problem

    Hi guys
    I m facing a strange problem here ...i initiate the 1st process named "Process A" from the BPEL test console...then it initates other processes ..so on and so forth ..after sometime i used xsl to change the root element so that i can again call "Process A " which expects a root element named "OrderBO" ...i changed the root using the xsl from "FaultType" to "OrderBO" ..and stringified it and sent it to java embedding which uses locator API to call the "Process A" again ..During the second initiation ..i can see both the xml inputs are correct (in d first and 2nd initiation)..but 2nd time the parsing fails...it seems there is no data or smthn ...it simply cant parse anythn..but i can see the xml as input with data in it ...
    did anyone of u face this problem?
    Please suggest something
    Thank s
    Edited by: AndyC1 on Sep 21, 2009 4:53 AM

    "univold" <[email protected]> wrote in
    message
    news:gp8447$t6b$[email protected]..
    > Hello, All.
    > I faced with the strange problem regarding getting
    result of Method
    > invocation
    > on the RemoteObject.
    > I have BlazeDS on server side configured and everything
    was working fine
    > when
    > server returns a Collection of Objects.
    > But now I'm trying to receive one Object, defined on
    server side as:
    >
    >
    @ActionScript( bindable = true)
    > public class PageHolder<T,U> {
    >
    > private List<T> valueList;
    > private U firstRowId;
    > private U lastRowId;
    > // ...... getters setters
    > }
    >
    > On client I have the mapped object:
    >
    >
    [Bindable]
    > [RemoteClass(alias="com.dummy.PageHolder")]
    > public class PageHolder extends PageHolderBase
    > {
    > private var _firstRowId : Object;
    >
    > private var _lastRowId : Object;
    >
    > private var _valueList : ArrayCollection;
    > }
    >
    > The remote object defenition is:
    >
    >
    <mx:RemoteObject id="searchService"
    destination="searchService"
    > fault="faultHandler(event);">
    > <mx:method name="findCustomers"
    > result="findCustomersResult(event)"
    > fault="faultHandler(event);"/>
    > </mx:RemoteObject>
    >
    > and methods are:
    >
    >
    public function findCustomers():void {
    > try {
    > searchService.searchCustomerData();
    > } catch (e:Error) {
    > Alert.show("after: " + e.message );
    > }
    > }
    >
    > public function
    > findCustomersResult(event:ResultEvent):void {
    > Alert.show("result!");
    > page = event.result as PageHolder;
    > }
    >
    > So, the problem is that findCustomersResult function is
    never called.
    > At the same time I have no errors in any logs, and I see
    debug messages
    > from
    > BlazeDS, that everything is fine:
    Is your faultHandler code called?

  • Exception data: java.lang.AbstractMethodError - Calling Remote Method.

    We recently changed some of our CMP fields from primative int's to integer's and now we are receiving Abstract Method Errors at runtime. We have fixed all the methods that use this CMP fields, well at least we think we got them all. Since this are remote methods the sever is setup to pull JAR files from a lib directory on the server. This JAR files have also been updated. Can anyone give me more information about this error or something I might be missing.
    ------------------------------------------------------------------------------------- Errors -------------------------------------------------------------------------------------
    [11/7/07 15:40:23:141 CST] 00000022 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getPositionInfo" on bean "BeanId(hr-ear#hr-ejb.jar#PositionService, null)". Exception data: java.lang.AbstractMethodError: com/tgt/supply/pdd/ejb/entity/AmcOffice.getOfcI()Ljava/lang/Integer;
         at com.theamc.hr.ejb.session.PositionServiceBean.getPositionCollections(PositionServiceBean.java:1383)
         at com.theamc.hr.ejb.session.PositionServiceBean.getPositionInfo(PositionServiceBean.java:46)
         at com.theamc.hr.ejb.session.EJSRemoteStatelessPositionService_fae72574.getPositionInfo(EJSRemoteStatelessPositionService_fae72574.java:262)
         at com.theamc.hr.ejb.session._PositionService_Stub.getPositionInfo(_PositionService_Stub.java:272)
         at com.theamc.hr.web.servlet.PositionServlet.createPageObject(PositionServlet.java:153)
         at com.theamc.framework.servlet.ControllerServlet.doGet(ControllerServlet.java:221)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    [11/7/07 15:34:10:043 CST] 00000020 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getUserOrgInfo" on bean "BeanId(userprofile-ear#userprofile-ejb.jar#UserOrgInfo, null)". Exception data: java.lang.AbstractMethodError: com/tgt/supply/pdd/ejb/entity/AmcOffice.getOfcI()Ljava/lang/Integer;
         at com.theamc.userprofile.ejb.session.UserOrgInfoBean.getUserOfficeValue(UserOrgInfoBean.java:536)
         at com.theamc.userprofile.ejb.session.UserOrgInfoBean.getUserOrgInfo(UserOrgInfoBean.java:84)
         at com.theamc.userprofile.ejb.session.EJSRemoteStatelessUserOrgInfo_13c2e095.getUserOrgInfo(EJSRemoteStatelessUserOrgInfo_13c2e095.java:194)
         at com.theamc.userprofile.ejb.session._UserOrgInfo_Stub.getUserOrgInfo(_UserOrgInfo_Stub.java:273)
         at com.theamc.userprofile.servlet.UserOrgInfoServlet.createPageObject(UserOrgInfoServlet.java:243)
         at com.theamc.framework.servlet.ControllerServlet.doGet(ControllerServlet.java:221)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
         at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
         at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
         at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
         at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
         at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
         at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
         at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
         at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
         at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    ------------------------------------------------------------------------------------- Usage -------------------------------------------------------------------------------------
    HashMap ofcRegn = new HashMap();
    AmcOffice off = null;
    AmcOfficeHome offHome = com.tgt.supply.pdd.ejb.entity.EntityHomeFactory.getAmcOfficeHome();
    ArrayList ofcColl = new ArrayList();
    Iterator iter = offHome.findAll().iterator();
    while (iter.hasNext()) {
    off = (AmcOffice) PortableRemoteObject.narrow(iter.next(), AmcOffice.class);
    ofcColl.add(new GenericCode(""+off.getOfcI(),off.getOfcN())); line 1383
    ofcRegn.put(""+off.getOfcI(),""+off.getRegnI());
    The abstract method error is thrown when off.getOfcI() is called. OfcI is the field that was changed from a primative int to an integer.
    Any help is appreciated
    Chris

    I am pretty sure. I am using RAD locally so I have deleted all the generated AccessBean and Deployment code and rerun the deploy. My concern is that these remote methods are using an external JAR file which is loaded when the server is started. I have updated this JAR files, but I am not sure if maybe they are being cached some where.

  • Error sending method invocation request(oc4j 10g(10.1.3.1))

    Dear,
    I have two applications a.ear and b.ear. They both are deployed on same oc4j container (10g(10.1.3.1))
    Both applications use each others session beans. In order to make communications between these two applications possible I set global-jndi-lookup-enabled attribute in <application-server> element in server.xml file, to be true.
    One of the applications use hibernate 3.1. According to some of posts from your forum, I replaced antlr.jar from toplink\jlib folder with one form with the one provided by the Hibernate 3 distribution.
    In order to integrate Hibernate with Container managed transactions, I set in hibernate.cfg.xml:
    hibernate.transaction.factory_class parameter to: org.hibernate.transaction.CMTTransactionFactory and
    hibernate.transaction.manager_lookup_class to: org.hibernate.transaction.OC4JTransactionManagerLookup.
    Everything works well since I save/update data in database. I save or update data, calling method from remote session bean.
    I am getting java.lang.NullPointerException. Here is my error log:
    2007-02-23 13:03:32.687 WARNING J2EE EJB-08002 [WorkflowManager] thread HTTPThreadGroup-12 encountered an exception while trying to end the transaction: oracle.oc4j.rmi.OracleRemoteException: An exception occurred during transaction completion: ; nested exception is:
    javax.transaction.RollbackException
    WARN processException, Unhandled Exception thrown: class com.ed.ecomm.edcore.exception.RepException
    2007-02-23 13:03:32.750 ERROR ServletException cause
    mermig > 13:03:32.765 ERROR SecurityFilter - EXCEPTION:
    Error sending method invocation request; nested exception is:
    java.lang.NullPointerException
    javax.servlet.ServletException: Error sending method invocation request; nested exception is:
    java.lang.NullPointerException
    at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:423)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
    at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
    at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at com.ed.mermig2plus.web.filters.AuthorizationFilter.doFilter(AuthorizationFilter.java:115)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at com.ed.ecomm.edcore.web.filters.MonitoringFilter.doFilter(MonitoringFilter.java:180)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at com.ed.ecomm.edcore.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:93)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at com.ed.ecomm.edcore.web.filters.DoFilterPrivilegedAction.run(DoFilterPrivilegedAction.java:65)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:320)
    at com.ed.ecomm.edcore.web.filters.jaas.OracleJAASProvider.performAction(OracleJAASProvider.java:166)
    at com.ed.ecomm.edcore.web.filters.SecurityFilter.performAction(SecurityFilter.java:595)
    at com.ed.ecomm.edcore.web.filters.SecurityFilter.doFilter(SecurityFilter.java:292)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:534)
    Can you help me? I can not find anything about this exception
    The same works for me in 10.1.2.0.2
    Thanks and regards,
    -- Smiljka

    OC4J can work with many different DataSources implementations to work against many different databases. We have not hardcoded it work only against an Oracle database. We have reworked the Data Source area in 10.1.3 to make it simpler and more consistent.
    I'd recommend having a read of the the J2EE Services Guide for 10.1.3 (http://download-west.oracle.com/otn/java/oc4j/1013/doc/web.1013/b14427.pdf)
    and have a look at chapter 4 where our new and improved DataSource implementation s discussed.
    -steve-

  • Remote method arguments (RMI)

    Configuration:
    OC4J Release 2
    JDeveloper 9i RC
    Problem:
    I get a "ClassNotFoundException" when passing objects as arguments to a remote method.
    The object being passed implements an interface. The interface extends "Serializable" and it is available on the server (where the RMI class resides).
    Appreciate any help on this.
    Thanks,
    Ranga

    Found the solution. Thanx.

  • JVMTI & jni  - object tracing and method invocation

    I need to log all method invocations in the form:
    <caller object's tag, called object's tag>
    May be I 'll elaborate:
    Suppose some object of class B say b invokes a method on an object of
    class A, say instance a..
    In need the info: <object tag of b, object tag of a>
    (P.S. I donot want just the class name.. thats is available in
    stacktrace.)
    Assume tagging is done and each instance is tagged with its
    instantiation history, so two instances of same class may have have
    different tags.
    How do I do this.
    It would be great if I could get some help.

    Hi,
    are you providing in your Setup class (i am assuming is the RMI server) the two arguments constructor needed by Activatable OBject??
    it should look like this
    public Setup(ActivationID id, MarshalledObject data)
    that hopefully solves your problems
    regards
    marco

  • Remote method HELP!

    Hi,
    I'm obviously missing some basic concept on how to handle
    response and return values from remote methods...
    Lets say i'm using the following on the server:
    Client.prototype.GetNumOfMessages = function(uid)
    _NumOfMessages = _ws.GetNumOfMessages(uid);
    _NumOfMessages.onResult = function(res)
    // HERE IS MY PROBLEM. How can I return the "res" value to
    the client function that invoked?
    The _ws.GetNumOfMessages(uid); is a call to a webservice,
    which works fine. If I trace the "res" I get the correct value.
    So, how can I return this value?
    The client code is:
    nc.some_function = function()
    nc.call("GetNumOfMessages",new retVal(),objUser.uid);
    function retVal()
    this.onResult(res)
    trace(res); // I Get "undefined" here...
    Please advise,
    Thanks in advance,
    Guy

    Properties properties = new Properties();
    properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "your factory");
         properties.setProperty(Context.PROVIDER_URL, "your server url");
         properties.setProperty(Context.SECURITY_PRINCIPAL, "morad");
         properties.setProperty(Context.SECURITY_CREDENTIALS, "morad");
    Context ctx = new InitialContext(properties);
    Object objref = ctx.lookup("the name of your bean);
    yourbean = (yourbean) PortableRemoteObject.narrow(objref,serviceClass);
    Also make sure you include your credentials in the deploy.properties file in your deploy directory.

  • NullPointerException in Remote method

    Hello,
    I am trying to reproduce the database sample of the Java Roadmap using EJB's. I have gone through all the steps, deploying went well, compiling too. but when running the selectEJB Client program I get the following messages:
    "C:\Program Files\Oracle\JDeveloper 3.1\java\bin\javaw.exe" -mx50m -classpath "U:\Documentation\EJB;C:\Program Files\Oracle\JDeveloper 3.1\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.1\jdbc\lib\oracle8.1.6\classes111.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.1\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.1\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.1\sqlj\lib\translator.zip;U:\Documentation\EJB\selectEJBRemoteSource.jar;U:\Documentation\EJB\selectEJBRemoteGenerated.jar;C:\Program Files\Oracle\JDeveloper 3.1\java\lib\classes.zip" selectO8iClient.MyEJBClient
    Creating an initial context
    Looking for the EJB published as 'test/selectEJBRemote'
    Creating a new EJB instance
    Caught RuntimeException in remote method; nested exception is:
    java.lang.NullPointerException:null
    Remote Stack Trace:
    java.lang.NullPointerException
    at selectEJB.selectEJBClass.ejbCreate(selectEJBClass.java:41)
    at oracle.aurora.ejb.gen.test_selectEJBRemote.EjbHome_selectEJBHome.create(EjbHome_selectEJBHome:52)
    at selectEJB._tie_selectEJBHome.create(_tie_selectEJBHome.java:53)
    at selectEJB._selectEJBHomeImplBase._execute(_selectEJBHomeImplBase.java:65)
    at selectEJB._selectEJBHomeImplBase._execute(_selectEJBHomeImplBase.java:53)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java:129)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:266)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:462)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java:92)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java:62)
    at oracle.aurora.server.GiopServer._service(GiopServer.java:82)
    at oracle.aurora.server.GiopServer.service(GiopServer.java:191)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java:201)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java:292)
    oracle.aurora.ejb.RemoteRuntimeException: Caught RuntimeException in remote method; nested exception is:
    java.lang.NullPointerException:null
    Remote Stack Trace:
    java.lang.NullPointerException
    at selectEJB.selectEJBClass.ejbCreate(selectEJBClass.java:41)
    at oracle.aurora.ejb.gen.test_selectEJBRemote.EjbHome_selectEJBHome.create(EjbHome_selectEJBHome:52)
    at selectEJB._tie_selectEJBHome.create(_tie_selectEJBHome.java:53)
    at selectEJB._selectEJBHomeImplBase._execute(_selectEJBHomeImplBase.java:65)
    at selectEJB._selectEJBHomeImplBase._execute(_selectEJBHomeImplBase.java:53)
    at com.visigenic.vbroker.orb.SkeletonDelegateImpl.execute(SkeletonDelegateImpl.java:129)
    at oracle.aurora.server.GiopProtocolAdapter.doRequest(GiopProtocolAdapter.java:266)
    at com.visigenic.vbroker.orb.GiopProtocolAdapter.dispatchMessage(GiopProtocolAdapter.java:462)
    at oracle.aurora.server.ThreadSessionDispatcher.run(ThreadSessionDispatcher.java:92)
    at oracle.aurora.server.VCIiopConnection.processRequest(VCIiopConnection.java:62)
    at oracle.aurora.server.GiopServer._service(GiopServer.java:82)
    at oracle.aurora.server.GiopServer.service(GiopServer.java:191)
    at oracle.aurora.net.VirtualCircuit.processRequest(VirtualCircuit.java:201)
    at oracle.aurora.net.Presentation.handleRequest(Presentation.java:292)
    at selectEJB._st_selectEJBHome.create(_st_selectEJBHome.java:68)
    at selectO8iClient.MyEJBClient.main(MyEJBClient.java:110)
    End...java.io.IOException: read error
    I have tried debugging the code and there seems to be a problem with creating the remoteInterface:
    selectEJBRemote remoteInterface = homeInterface.create();
    I just can't figure out what. Can someone help me?
    Thanks,
    Benny

    I have encountered exactly the same problem when creating a BMP Entity Bean. Has someone found a solution yet ?

  • Calling ejb remote method

    SQLPLUS How to call ejb remote method in the sql plus.i am getting problem to intiallize the initial context.

    hi chidambaresh,
    you could have sent this to me directly.
    the Enumeration si an interface and so the object we get during the runtime is basically an object of some implementation of this interface.
    the Enumeration you get from HAshtable is actually Serializable.
    but the Enumeration you actually get from Vector (this is actaully an inner class of Vector viz., Vector$1) is not serializable. that is what the error you are getting.
    regards
    Srinivasan.R
    (VAMSOFT)

  • Flex Data Services does not see remote methods in extended ColdFusion component.

    I have created a remote service base component as a AModelService.cfc file. I extend that file to make my ModelService.cfc. When I configure the ColdFusion data service and point to ModelService.cfc and click next, I don't see any remote methods (there are none explicitly defined in the component) in the Service Operations window.
    If I go back and point to AModelServide.cfc, the parent component, and hit next, I see all the remote methods that are defined in the parent component. So, either I am doing something wrong, or Data Services does not look at methods up the cfc prototype chain, which from an OOP standpoint means that instead of say creating one restful base class and being nice and DRY you can't. I.e. not OOP for data services. Is this a bug, or what?
    Anybody get data services to work with extended service components?
    Mark

    Thanks for the reply. Yes, I did compile all the Java and it
    works OK with a simple Java program. It just will not work in a
    Flex application.
    The java classes are:
    RRA:
    package blah.myPackage;
    import java.util.List;
    import java.util.Collection;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    class RRA extends AbstractAssembler
    public Collection fill( List fillParameters )
    RRS service = new RRS();
    return service.getSome();
    RRS:
    package blah.myPackage;
    import java.util.ArrayList;
    import java.util.List;
    import java.sql.*;
    import flex.EORS.*;
    class RRS
    public List getSome()
    ArrayList list = new ArrayList();
    String str = "bob";
    RR rr = new RR(str);
    list.add(rr);
    return list;
    RR:
    package blah.myPackage;
    class RR
    private String name;
    public RR() { }
    public RR(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setName(String name)
    this.name = name;
    I started with something that retrieved data from a database
    but watered it down just to try and get some kind of communication
    between Flex and Java.

  • Web service invocation problem on host hostname and port 8000 protocol : http logical port name : LP_WS_SMDAGENT_MONITORING

    hello colleagues,
    In the phase Connect Diagnostics dont show the Agent available in SLD, but when go to SLD i have the agents,
    Error,
    Connect Diagnostics Agent
    The table does not contain any data
    Agent availables in all SLD
    SOAP:1.007 SRT: Unupported xstream found: ("HTTP Code 401 : Unauthorized")
    Web service invocation problem on host hostname and port 8000 protocol : http logical port name : LP_WS_SMDAGENT_MONITORING
    Thanks

    OK, then pls follow below steps;
    - Go to step 'Create Users' in solman_setup System Preparation scenario and make sure the user SM_INTERN_WS has a green status. Use the 'Test Login' button to make sure the user is not locked and has correct credentials maintained in solman_setup
    - Immediately after checking the user status, navigate to Configure Connectivity->Enable Web Services and execute again the 'Create Logical Ports' automatic activity, in order to propagate the correct credentials to the Logical Port definitions.
    - If the above operation is not successful, repeat the two steps above, providing a different user Id in 'Create Users' step, eg SM_INTERN_W1. This will prevent situations where the user gets locked by Logical Ports using an obsolete password.
    Let me know the results.
    Regards,
    Vivek

Maybe you are looking for