Using EJBObject as remote interface

Hello all,
I'm trying to make an ejb session available for web services. I see that we must create an interface similar to the EJBObject, but that simply extends Remote, to get the web service. So I tried to use the EJBObject (which extends Remote) directly in the wscompile to get the wsdl. Unfortunalety I get the following error message that I don't understand:
error: type cannot implement remote: javax.ejb.EJBHome
Can someone explain the problem ? And btw, I don't have any problem when I create a copy of my EJBHome and simply extends Remote instead of EJBHome. So why to I have to duplicate the same code in 2 separate classes ?
Thanks for the help
This works:
public interface OperatorGroupCommands extends Remote {
public void modify(OperatorGroup operatorGroup) throws RemoteException;
This doesn't work:
public interface OperatorGroupCommands extends javax.ejb.EJBObject {
public void modify(OperatorGroup operatorGroup) throws RemoteException;

I am having the same problem.
I am try to use web service security in the sun j2ee 1.4 application server. I noticed that web services built from servlets work just fine, but web services built from ejbs do not work so well.
I tried to deploy an ejb and the security stuff appears in the deploytool when I extend EJBObject. When I extend java.rmi.Remote, the stuff does not show up.
Did you ever solve this problem?

Similar Messages

  • Configure webapp to use local or remote interface based on environment

    Hi,
    I have the following problem I am trying to solve (app server is Weblogic 10g by the way).
    I have a webapp (war-project) and an ear project containing stateless session beans.
    In our development environment I would like to deploy the war and ear separately, because that is easier for development (war-project can then be deployed as a directory, so changes to jsp's and such have immediate effect).
    Deploying the war and ear separately means that the war-project can only call the session beans through their remote interfaces. For development this is not a problem.
    In a production environment however we would like to package the war INSIDE the ear, so that the webapp can use the local interfaces to call the session beans, as this will improve performance.
    So I am looking for a solution where I can configure the way beans are called. Local if the war is inside the ear, remote if the war is separate from the ear. I was thinking along the lines of packaging a properties file with the war that determines the mode (local or remote). Or maybe packaging a different deployment descriptor, if that is a possibility.
    This is what I have so far:
    Business Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestService {
         public void doSomething();
    Remote Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestServiceRemote extends TestService {
    Local Interface_
    package be.cegeka.test.ejb3.service;
    public interface TestServiceLocal extends TestService {
    Bean implementation_
    package be.cegeka.test.ejb3.service;
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless(mappedName="ejb/TestService")
    @Local(TestServiceLocal.class)
    @Remote(TestServiceRemote.class)
    public class TestServiceBean implements TestService {
         @Override
         public void doSomething() {
              System.out.println("I'm doing something");
         @Override
         public void doSomethingLocal() {
              System.out.println("I'm doing something local");
    JSF backing bean_
    package be.cegeka.test.ui;
    public class MyWebAppBackingBean {
         @EJB(mappedName="ejb/TestService", beanInterface=TestServiceRemote.class)
         private TestService testService;
         public String doSmth() {
              testService.doSomething();
              return "success";
    }The part that I would like to be configurable is the "+beanInterface=TestServiceRemote.class+" part in the JSF backing bean. Depending on the environment (development vs. production), this should be "+beanInterface=TestServiceRemote.class+" for development and "+beanInterface=TestServiceLocal.class+" for production.
    Is something like this possible?
    I would like to avoid having to fill my web.xml with ejb-refs and having to do the JNDI-lookups myself if at all possible, to keep things as easy and clean as possible.
    Any ideas are welcome!
    Steven

    Hey Manish,
    comments inline.
    "manish kumar" <[email protected]> wrote in message
    news:1794338.1102557677925.JavaMail.root@jserv5...
    So If they are supposed to be in the same JVM -
    then
    1. the cluster of 3 weblogic servers are three JVMs. So does that meanLOCAL INTERFACES CAN'T BE USED IN CLUSTERED ENVIORONMENT ?
    Sure they can, but the calling component in an enterprise app will not call
    an intance of the local bean on another node in the cluster. It will make a
    by-reference call to the local component in the same EAR. Local interfaces
    are not Remote, so they cannot be used with by-value RMI semantics.
    >
    2. ARE YOU SURE ABOUT THIS FACT THAT THAT LOCAL INTERFACES CAN BE USEDONLY INSIDE THE SAME APPLICATION, I THOUGHT IT CAN BE USED AS LONG AS CLINET
    IS IN THE SAME JVM?
    PLEASE CONFIRM.........!!!!!!!!!!!!!Dead sure:
    http://e-docs.bea.com/wls/docs81/programming/classloading.html#1073506
    http://e-docs.bea.com/wls/docs81/ejb/understanding.html#1126831
    http://e-docs.bea.com/wls/docs61/ejb/cmp.html#1085452
    http://www.theserverside.com/discussions/thread.tss?thread_id=14628
    Also, search the ejb newsgroups. I know Rob Woollen has addressed this in
    here somewhere. And, if Rob says it's so, trust me, it's so.
    Bill

  • ClassCastException while casting EJBObject to remote Interface

    Hi,
    Can someone explain me why the following code doesn't work?
    MyHome home = context.lookup(...)
    MyEJBObject remote = (MyEJBObject)home.create();
    EJBObject ejbobj = (EJBObject)remote;
    remote = (MyEJBObject)ejbobj;
    I get a ClassCastException on the latest statement...
    WLS version is WebLogic7.1sp2
    TIA,
    massimo

    Hi,
    Can someone explain me why the following code doesn't work?
    MyHome home = context.lookup(...)
    MyEJBObject remote = (MyEJBObject)home.create();
    EJBObject ejbobj = (EJBObject)remote;
    remote = (MyEJBObject)ejbobj;
    I get a ClassCastException on the latest statement...
    WLS version is WebLogic7.1sp2
    TIA,
    massimo

  • Creating Remote Interface using workshop

    I created a session EJB using weblogic workshop 8.1 sp3. It autogenerated the remote interface that extends EJBObject, and is uneditable. I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager. How can I create my own remote interface while creating a session bean using workshop? Appreciate your help.

    Hi,
    I am in the same boat. Did you find any solution to it?.
    Thank You.

  • Remote Interface problem using Sun ONE App & web server

    HI,
    1) I am using an S'less SB. I have local & remote interfaces. I am using the sun one appserver7 & the sun ones's htttp server. By default it doesnt pick up the remote interfaces is it ? How do i make my remote interfaces work ? what are the changes required in config/xml ?
    2) However i changed my client code (i.e my action class which is called by the struts action servlet ) to access the localhome rather than the remote home, but then i get java.lang.classcastexception.
    pls help !
    sanjay

    Hi parsuram,
    Thanks for the tip. After looking at the sample source code, I did finally figure out the solution - so I'll post it in case anyone else happens to be working with websphere studio has the same issue deploying on sun one.
    To access local interface ejb, you must have the following
    1. ejb-local-ref tag in the ejb-jar.xml like so underneath the <session> or <entity> tag of the bean which you plan to access the local ejb with.
    <ejb-local-ref>
    <ejb-ref-name>TestL</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>memory.simple.TestLLocalHome</local-home>
    <local>memory.tool.simple.TestLLocal</local>
    <ejb-link>TestL</ejb-link>
    </ejb-local-ref>
    2. similar ejb-ref tag in sun-ejb-jar.xml
    <ejb-ref>
    <ejb-ref-name>TestL</ejb-ref-name>
    <jndi-name>localejbs/module_memory.betaEJB/TestL68640023372300293</jndi-name>
    </ejb-ref>
    note: sun generates the <jndi-name> and overwrites whatever you put in that tag no matter what you put in there.
    3. here is the code to access
    Context initial = new InitialContext();
    TestLLocalHome tlHome=(TestLLocalHome) Initial.lookup
    ("TestL");
    //the string must match <ejb-ref-name> underneath <ejb-local-ref>
    4. note that the jndi name for the local interface bean becomes irrelevant. only the <ejb-ref-name> in the ejb-jar and sun-ejb-jar matter. furthermore, both <ejb-ref-name> must be the same or you won't be able to deploy.
    5. This is completely my fault for not checking the "proper" way to access local interfaces. in websphere, they let you get away without the ejb-ref tags and just use the string "local:/TestL"!
    -matt

  • Obtain remote interface using PortableRemoteObject

    Hello,
    I have sample code from "Applying Enterprinse JavaBeans" book.
    Plan plan = (Plan)PortableRemoteObject.narrow(
    it.next(), Plan.class);
    ... plan.getPlanInfo() ...
    here:
    Plan is a remote interface of the entity bean (e.g.. MyPlanBean).
    getPlanInfo() is one of the business methods in Plan.
    In this case, the remote interface is obtained by using PortableRemoteObject.narrow(...). could anyone explane the creation using the concept of life cycle of an entity bean instance? That means if any ejbCreate() methods or any callback methods are involved in the creation or not?
    Thanks.

    I am not sure if you are doing the right thing.
    The home interface represents the life-cycle methods of the component (create, destroy, find) while the remote interface represents the business method of the bean.
    Clients use the bean's home interface to obtain references to the bean's remote interface. Following is the life-cycle of
    entity bean creation:
    1. Client invokes create() on home object
    2. Home object allocates a bean from the free pool
    3. Home object passes on the create args to the ejbCreate(..)
    in the bean
    4. the bean inserts a row into the database table
    5. the bean returns the primary key of the row to the home object
    6. The container creates an EJB object for the bean and populates
    it with the primary key
    7. The home object calls the ejbPostCreate() on the bean
    8. The home object returns the remote reference to the EJB
    object back to the client
    9. Client now makes business calls to the bean instance.
    No bean instance is associated with the EJB object
    10. EJB object communicates to the container that a bean
    instance is needed
    11. The container allocates a bean instance from the pool
    and associates it with the EJB object (ejbActivate() is called)
    12. home object invokes the ejbLoad method on the bean to
    tell it to load itself(BMP) or to tell it that it has just been
    loaded (CMP)
    13. the bean uses the primary key stored in the EJB object to load the approp row's data from the database
    14. EJB object dispatches the client's business method call to the
    bean
    Hope this helps.
    Regards,
    Sun-DTS

  • How to specify a base class for Remote Interface in Workshop 9.2? -- URGENT

    Hi,
    I am trying to create a UUP EJB in WebLogic 9.2 workshop. I am using @FileGeneration to create my home & remote interfaces. And the generated remote interface is extending javax.ejb.EJBObject;I want my remote interface to extend com.bea.p13n.property.EntityPropertyManager which in turn implements javax.ejb.EJBObject. Can someone tell how i can do it in Workshop?.
    I came across Predefined Variable: remote.baseClass and as per docume
    ntation..."If specified, the value of this variable will be used as the base class for all generated remote classes. Where i should specify it?. @FileGeneration does nt have any option for it. Any help is grtly appreciated.
    Following are my code snippets:
    IMPL Class
    @FileGeneration(remoteClass = Constants.Bool.TRUE,remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE,remoteClassName = "MyEntityPropertyManager",remoteHomeName = "MyEntityPropertyManagerHome")
    public class MyEntityPropertyManagerImpl extends GenericSessionBean implements
              SessionBean {
    //code
    }

    This question was posted to both the bea.workshop.developer.general and weblogic.developer.interest.workshop (I had replied to the later on 10/19); after seeing an identical question today on this list want to include a reference to that reply here:
    http://forums.bea.com/bea/message.jspa?messageID=600044925&tstart=0
    -Rob

  • EJB3 - More than one remote interface for Session Bean?

    Hi,
    Is it possible in EJB3 to have more than one remote interface for a SessionBean?
    I have seen it posetd on here that it is possible but never been able to find any other information.
    Using JBoss as my App Server, I have deployed an App, where a SessionBean is defined as implementing 2 interfaces, both of which are annotated using @remote.
    However when I examine the JBoss JMX Console, Global JNDI Namespace only one remote interface is listed, and indeed it is the first one defined in the SessionBean.
    Considering I use a String similar to (MyApp/MyBean/remote) to do the JNDI lookup, this would indicate that it is not possible to have more than one remote interface.
    1. Is this a JBoss specific limitation?
    2. Is there another way of performing the JNDI lookup?
    Thanks,
    Alan.

    Hi,
    Thanks for prompt response! I tried the suggestion in my application, and the output from JBoss JMX Console was
    +- XXXBean (class: org.jnp.interfaces.NamingContext)
      |   |   +- remote (proxy: $Proxy291 implements No ClassLoaders found for: xxx.xxx.xxx.xxx.xxx.Remote1 (no security manager: RMI class loader disabled))Again only displaying the remote interface that is first in the @remote ({ Remote1.class , Remote2.class}) list. This would lead me to believe that JBoss does not support this.
    Can anyone confirm this?
    Alan.

  • Using local session bean interface from web container using EJB 3.0

    Hi,
    How can you use a local session bean interface from Java (rather than data controls) in a web container using EJB 3.0?
    I can use a remote interface by looking up InitialContext, but I can't find a local interface this way (even from another session EJB). I can use a local interface from an EJB using annotation "EJB", but as I understand, this is not available in the web container.
    If I try to add an ejb-jar.xml file, these seems to mess up by project...
    Hope you can help.
    Roger

    The portable way to retrieve an EJB reference in Java EE is to either inject it or look it up via the
    component's private naming environment. The simplest way is :
    @EJB
    private DocumentManager dm;
    The global JNDI name is only used as an implementation specific way to uniquely assign an
    identifier to a specific Remote EJB. It's best for this not to appear directly in the source code.
    There's more on global JNDI names in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    The alternative to annotations is to use an ejb-ref to declare the ejb dependency. The ejb-ref
    is declared in the standard deployment descriptor corresponding to the component doing the
    lookup. Each ejb-ref has an ejb-ref-name, e.g. <ejb-ref-name>DM_ref</ejb-ref-name>
    The code looks up the ejb-ref-name relative to the java:comp/env namespace to retrieve the
    EJB reference.
    DocumentManager dm = (DocumentManager)
    new InitialContext().lookup("java:comp/env/DM_ref");

  • SJSAS 9.1 does not expose EJB 3.0 remote Interface via JNDI

    I have successfully deployed a simple Stateful EJB 3.0 bean (CartBean, like the one in the Java EE 5 tutorial remote interface Cart) on SJSAS 9.1, located on machine host1.
    After I deployed the CartBean, I browsed the SJSAS and noticed the existence of the following JNDI entries:
    ejb/Cart
    ejb/Cart__3_x_Internal_RemoteBusinessHome__
    ejb/Cart#main.Cart
    ejb/mgmt
    ejb/myOtherEJB_2_x_bean ( +myOtherEJB_2_x_bean+ is a different 2.x bean that I have deployed as well)So, I am trying to access the remote interface of the CartBean from a remote machine, host2. The client application is a Java-standalone client.
    I am using the Interoperable Naming Service syntax: corbaname:iiop:host1:3700#<JNDI name>
    The problem is that the remote interface of the bean does NOT seem to be available via JNDI. I get the javax.naming.NameNotFoundException when I try to do a lookup like:
    corbaname:iiop:host1:3700#ejb/Cart
    On the other hand, the following lookups succeed:
    corbaname:iiop:host1:3700#ejb/mgmt
    corbaname:iiop:host1:3700#myOtherEJB_2_x_bean
    and also the following succeeds:
    corbaname:iiop:host1:3700#ejb/Cart__3_x_Internal_RemoteBusinessHome__So it seems like the Remote interface is not available via JNDI, rather only some internal SJSAS implementation (the object returned from the ejb/Cart__3_x_Internal_RemoteBusinessHome__ lookup is of type: com.sun.corba.se.impl.corba.CORBAObjectImpl
    Why is this happening? I know there used to be a bug in Glassfish, but I thought it had been fixed since 2006.
    Many thanks in advance, any help would be greatly appreciated.

    The EJB 3.0 Remote Business references are not directly stored in CosNaming. EJB 3.0 Remote references do not have the cross-vendor interoperability requirements that the EJB 2.x Remote view had.
    You can still access Remote EJB references from a different JVM as long as the client has access to SJSAS naming provider. Please see our EJB FAQ for more details :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Enhancement request: Remote interface java file generation

    Problem:
    In release 9.0.3, If you want to write a method that is suppossed to be exposed in the remote interface, you have to first right click on the ejb-jar.xml's appropriate EJB name node and then add the method, specify the argument types (say about 25 in number in a small width textbox), return type, etc and check the check box 'Expose in remote interface'. Then only remote interface's java source gets updated and only after doing all this can you actually sit down to write the business logic in that method. If you first code the method and then try to add the same, it gives an error saying "duplicate method exists"
    Suggestion:
    The similiar feature in release 9.0.2 was much better and flexible as it allowed the generation of remote interface source after coding the actual method in the EJB source. You can first write the method and then expose it in the interface by just choosing it from a method browser and opting for exposing it in the remote interface. You donot have to write the name and number of arguments like we have to currently do in the 9.0.3 release.
    (1) Actually, all public methods in the EJB source should by default be exposed in the remote interface because EJB are supposed to be used by other EJBs and JSPs only and all methods that are public but not exposed in the remote interface should actually be private or protected.
    (2) Leave it up to the developer to edit the remote interface
    (3) When the EJB source file is changed (public methods changed) compiled the remote interface should also be updated automatically. Why? already you have provision to change the remote interface source, so just dump all the public methods in the remote interface source when the EJB source is compiled.
    (4) Ditto for EJB Homes
    (5) Actually whenever the developer changes and compiles the EJB source, the remote and home source should automatically be updated AND COMPILED. (Refer: Pramati Studio 3.0 SP3 :- URL: www.pramati.com )
    I was very happy with the earlier option. If anybody other then the JDeveloper Team finds this interesting, please respond. A suite like developer should be more User-friendly.
    And yes expect more like this from me in the future

    Hi Raghu,
    Thanks for the quick response. This flexiblity in Remote interface generation and choice of methods in it at any given point in the development cycle is very much desired feature.
    The other thing I would like to suggest is you look at another enhancement request in my name regarding batch updates of the "web.xml" file. You will find the thread updated today i.e. on 15th September with a reply
    I will shortly post one more for lack of modularity in EJB components descriptors.
    My Company Four Soft Pvt. Ltd. (www.four-soft.com) is Oracle's development partner and we use and support Oracle products. They are good but naturally we would like them to be better and more User-friendly.
    Thanks once again.
    Amit

  • Remote interface distribution

    Hi,
    I am just learning to use RMI, have a typical setup, Server and Client and everything works fine, BUT.......
    I have compiled my remote classes, ie RmtServer, RmtServerImpl, then run the rmiregistry
    and then started the service, so far so good.
    I then compile etc the Client class and run
    My question is this, I am currently working from the same directory for all classes, I would like to truly
    distribute the client and server. Do I need to put a copy of the RmtServer interface on the client?
    Currently in my client I have the line:
    RmtServer server = (RmtServer)Naming.lookup("rmi://" + serverHost + "/ProjectServer");
    I have been reading about dynamic class loading but I am slightly confused!!!
    It says that the stubs created by running "rmic" on the server classes can be loaded dynamically, thats great, but the stubs created and the RmtServer interface are not the same thing. If I have to have a "local" copy of every interface I want to use then it seems a bit limited.
    My impression was that I could specify a location for a class repositry on a remote machine and then
    instantiate classes from the server on the local machine! So then I would only need to have one interface on the client to enable me to connect to the server for the first time!!!
    Im really confused as people can probably tell. Any help would be really appreciated

    The purpose of dynamic loading is really so that you don't have to distribute the stub, or the implementation classes of any interfaces.
    You can certainly load the remote interface dynamically from the codebase in the client, e.g. with URLClassLoader, but you will also have to have already loaded all the classes that use the remote interface the same way, rather than via the system class loader. Otherwise they won't load (NoClassDefFoundError). You can download the entire client actually, and this is not a bad way to go: see the the RMI 1.1 Specification, 'Bootstrapping the client', for details (if you can find it: try http://java.sun.com/products/archive/jdk/1.1/index.html), and the RMI-USERS archives of about five-six years ago for discussions (see http://archives.java.sun.com/archives/rmi-users.html). The description of this was removed from the 1.2 specification for some reason, and I did encounter problems migrating a 1.1 bootstrap client to 1.2, so beware.

  • Local Interfaces in WebLogic 7.0 Not Faster Than Remote Interfaces?

    I was curious how much faster calling business methods in
    a stateless session EJB in WebLogic 7.0 would be through
    a local interface than calling the same business methods
    through a remote interface. I timed both ways of calling
    the same methods and much to my surprise the times were
    nearly identical. I double-checked that in one case I really
    used the local interface (using ejb-local-ref, local-jndi-name,
    local interfaces in source code). Does anybody (perhaps from
    BEA) have an explanation for this? By the way, I ran the
    same experiment with other J2EE application servers such
    as IBM's WebSphere 5 (Beta) and there was a tremendous
    performance difference between local and remote interface
    usage.
    Thanks,
    Reinhard

    "Reinhard Klemm" <[email protected]> wrote in message
    news:[email protected]...
    I appreciate your response and, at the same time, I am somewhat
    surprised about it. Here are the reasons for my surprise:
    1. Your response indicates that WebLogic uses RMI for
    EJB local method calls, i.e., even if the client is on the same VM.
    I would have assumed that WebLogic would bypass RMI in such
    a situation.That is not what I said. Local interfaces wont use rmi.
    But remote interfaces do better if the call is from the same VM. This is
    weblogic rmi optimization. Please see Rob's posting also.
    2. Other J2EE application servers fare a lot better. In one
    experiment, I timed WebLogic against WebSphere 5.0 Technology
    for Developers (i.e., WebSphere 5.0 Beta, which is expressly
    NOT for performance testing) and against the Sun Reference
    Implementation. Here are the numbers for calling business
    methods in a stateless session EJB through its local interface:
    WebLogic: 5.15 ms on the average
    WebSphere: 0.41 ms on the average
    Sun Reference Implementation: 0.11 ms on the average
    This indicates to me that both WebSphere and the Sun Reference
    Implementation are better optimized than WebLogic by excluding
    RMI when making local EJB calls.
    Reinhard
    "Maruthi Nuthikattu" <[email protected]> wrote in message
    news:<[email protected]>...
    Can you post some numbers so that we can visualize the difference.
    Please add the numbers with other J2EE appserver also.
    Otherwise top of my head, the reason is:
    Weblogic rmi is well optimized for the calls with in the same JVM andsame
    J2EE application.
    This could be the reason you are not seeing much difference.
    ..maruthi
    "Reinhard Klemm" <[email protected]> wrote in message
    news:[email protected]...
    I was curious how much faster calling business methods in
    a stateless session EJB in WebLogic 7.0 would be through
    a local interface than calling the same business methods
    through a remote interface. I timed both ways of calling
    the same methods and much to my surprise the times were
    nearly identical. I double-checked that in one case I really
    used the local interface (using ejb-local-ref, local-jndi-name,
    local interfaces in source code). Does anybody (perhaps from
    BEA) have an explanation for this? By the way, I ran the
    same experiment with other J2EE application servers such
    as IBM's WebSphere 5 (Beta) and there was a tremendous
    performance difference between local and remote interface
    usage.
    Thanks,
    Reinhard

  • EJB deployment problem --New remote interface class files are not loaded

    Hi, I face a problem while deploying an ear file in oc4j. I basically get some problems like the method in the remote interface is not implemented in the EJB class. But the implementation is actually available in the EJB class.
    We get this problem when we actually change the signature of the EJB remote methods. The new methods are not referenced by oc4j. Only the old version of remote interface is referenced by oc4j. But the latest version of EJB class is taken. I am using 9.0.3 version of the oc4j. Could you pls help me regarding this problem ?
    Regards
    Solomon

    I have found the solution :-)
    You must add to the ejbCreate() method of the bean class throws javax.ejb.CreateException

  • ClassCastException at Remote object although remote interface is implemented

    Hi,
    I want to access a remote object via T3 (on WebLogic 10) but I am
    getting a ClassCastException in the client. The exception is thrown if
    the generic "Remote" object is casted into a concrete remote interface.
    The following works ok (client side, get remote object via JNDI):
    Hashtable hashTable = new Hashtable();
    hashTable.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    hashTable.put(Context.PROVIDER_URL, "t3://localhost:7001);
    ic = new InitialContext(hashTable);
    Remote r = (Remote) ic.lookup("...jndi bind name...");
    But this cast fails:
    IMyRemoteIntf i = (IMintRemoteIntf) r;
    The ClassCastException has the classname of the class which implements
    the remote interface - the lookup should be ok therefore. With
    r.getClass().getInterfaces() I have verified that the remote object
    actually implements the appropriate interface. I suppose it is a class
    loader issue then and added some debug output.
    Class loader parent chain of IMyRemoteIntf:
    weblogic.utils.classloaders.ChangeAwareClassLoader@1715ee2
    -> weblogic.utils.classloaders.GenericClassLoader@123ade0
    -> weblogic.utils.classloaders.FilteringClassLoader@1312cf9
    -> weblogic.utils.classloaders.GenericClassLoader@159ea8e
    -> java.net.URLClassLoader@82d37
    -> sun.misc.Launcher$AppClassLoader@e39a3e
    -> sun.misc.Launcher$ExtClassLoader@a39137
    Class loader parent chain of IMyRemoteIntf as reported by r.getInterfaces():
    sun.misc.Launcher$AppClassLoader@e39a3e
    -> sun.misc.Launcher$ExtClassLoader@a39137
    IMyRemoteIntf is in a jar file in WEB-INF/lib of my web application. I
    tried prefer-web-inf-classes = true in weblogic.xml as well as
    prefer-application-packages in weblogic-application.xml (with the
    respective package of the interface).
    Any ideas? I don't know what more I can try. I can access the same
    server with this t3 URL just fine from outside of the WebLogic server.
    Regards
    Werner

    I meant an issue about multi-connections. Although the socket is shared by all of the connections, each connection in RMI might correspond to a separated thread, I guess. Since the socket is shared by all rmi clients, the RMI channel would be a blocking connection. I am not sure if the RMI in JDK1.4 or above also use the nonblocking new I/O technique. Thanks.

Maybe you are looking for

  • Videos icons missing after ios 8 update

    Hi! So after the ios 8 update, the icons in the official video app have a computer with a house inside instead of the nice picture they had. Some still have the same icon. How to fix this? thanks

  • Still trying to customize the layout of my e-commerse module, but it's not working for me

    I have followed the links  http://kb.worldsecuresystems.com/134/bc_1342.html#main_eCommerce I am still unable to manipulate these tabs to modify the layout. Please help. I want to center justify my items and no luck no matter what I try. They are so

  • Duplicating pages in Acrobat X Pro

    I downloaded a PDF (employment application) and was filling it in with Acrobat.  I duplicated the page titled "Employment History" so I could add more items.  I saved the file, but when I reopened it later, found that both "Employment History" pages

  • Help with setObject!!

    hi, I'm trying to look for a short cut to insert data into the table with preparedstatement. But I've got this problem saying invalid input type or something when I tried to input my data with setObject(1, "x"). The problem is the data I tried to inp

  • I can't see my pictures at all

    Does anyone know what to do if you cannot see your pictures.  All of my events are there just an exclmation mark instead of pictures.