One remote interface vs. lots of interfaces

Hi,
I am now designing an API using RMI.
I can do it in 2 ways: One remote interface which has lots of functions,
or seperate it to lots of logical interfaces, which the client needs to get a remote interface of all of them.
Does anyone face this problem before? what do you think?
Thanks.

If those are your only options, I would recommend using several smaller logically grouped interfaces, rather than one large one, because any changes to an interface require the generation and distribution of a new stub. In some cases, your client may not even need all the interfaces.
However, there is another way to do it.
You could use only one interface, containing only one method, which can support unlimited client interfaces, with no stubs. That is my favourite way to do it! Want to see more? Please come and visit, it is very easy to do, and it is completely free:
https://cajo.dev.java.net/overview.html

Similar Messages

  • 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.

  • 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

  • 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

  • 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

  • Multiple inheritance in remote interfaces for EJB 3.0 session beans on Webl

    Hi All,
    We started migration from EJB 2.1(WLS 8.1) to EJB 3.0(WLS 10.3.2) and identified few serious problems. One of them is related with multiple business interfaces inheritance. I wrote simple example that presents point of the problem.
    we have session bean AImpl:
    +@Stateless(name="A")+
    +@Remote({A.class})+
    +@TransactionAttribute(TransactionAttributeType.REQUIRED)+
    +public class AImpl implements A {+
    +@Override+
    +public void writeA() {+
    System.out.println("A");
    +}+
    +@Override+
    +public void writeB() {+
    System.out.println("B");
    +}+
    +@Override+
    +public void writeC() {+
    System.out.println("C");
    +}+
    +}+
    with remote interface A:
    +@Remote+
    +@JNDIName(A.JNDI_NAME)+
    +public interface A extends B, C {+
    public static String JNDI_NAME = "A_JNDI_NAME";
    void writeA();
    +}+
    As you can see A extends B, and C. Definition of both interfaces is very simple:
    +public interface B {+
    void writeB();
    +}+
    +public interface C {+
    void writeC();
    +}+
    Everything looks nice until we want to invoke some method on AImpl bean. For above implementation code:
    A a = ctx.lookup(A. JNDI_NAME);
    a.writeA();
    a.writeB();
    a.writeC();
    writes down ”A \n B” and throws exception:
    caused by: java.lang.NoSuchMethodException: pl.gov.arimr.zszik.bazowe.slowniki.ejb.A_vt0zts_AImpl_1032_WLStub.*writeC()*
    at java.lang.Class.getMethod(Class.java:1605)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:165)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:57)
    so.. in stub generated by WLS there is no method from interface C ! What more interesting after small change in interface A rely on change in interface implementation order from B, C to C, B (+public interface A extends C, B {+) server writes down only A and I have stack like below:
    Caused by: java.lang.NoSuchMethodException: pl.gov.arimr.zszik.bazowe.slowniki.ejb.A_vt0zts_AImpl_1032_WLStub.*writeB()*
    at java.lang.Class.getMethod(Class.java:1605)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:165)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:57)
    After this experience I came up with suspicion that Weblogic 10.3 does not support inheritance from multiple interfaces in one “generation”. Instead of that it takes only the first interface from the list.
    Does anybody have some experience with such a situation? maybe someone have an idea how to work around this problem?

    This is Not Supported in WebLogic that the Remote Interface extends other Interfaces. Because Annotation Processor just looks up inside the implemented interface methods. The actual interface which is Implemented by the Bean Class. So the Methods declared inside the Interface B and Interface C will be ignored and will not be available as part of the generated Stubs. Thats why u are getting NoSuchMethodError.
    You can even contact Oracle Support on this...there are 3-4 Cases on it. And the Solution is Work As Designed.
    Workaround is : edit your interface A as following
    Declare all the Business Methods only in the Remote Interface and not inside it's Super Interfaces.
    Example:
    @Stateless(name="A")
    @Remote({A.class})
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class AImpl implements A {
    @Override
    public void writeA() {
    System.out.println("A");
    @Override
    public void writeB() {
    System.out.println("B");
    @Override
    public void writeC() {
    System.out.println("C");
    @Remote
    @JNDIName(A.JNDI_NAME)
    public interface A extends B, C {
    public static String JNDI_NAME = "A_JNDI_NAME";
    void writeA();
    void writeB();
    void writeC();
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • 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.

  • Returning a remote interface as a polymorphic form of its superinterface.

    Hi all
    I have a remote interface 'remoteinterface1'
    of a statless session enterprise java bean extending an interface 'BusinessInterface' that has some business methods.
    Can a business method 'getObj()' of the bean return a polymorphic form of the above remote interface as 'BusinessInterface' i.e.
    public BusinessInterface getObj()
    //some conditional check is done here; if true
    return remoteinterface1;
    Does doing as above violate any EJB specifications. If so what could be the alternative.
    Any input at the earliest is highly appreciated.
    Thanks.

    Hello,
    Hi
    Thanks for the quick reply.
    I guess I might be asking the same question but just
    wanted to confirm again by expressing one more doubt:
    If the remote interface is casted to Business
    Interface;
    Later when I check if the business interface is an
    instanceof the remoteinterface, will it be actual
    remote interface i.e. since we are casting to
    business interface(a simple interface and thus not an
    RMI aware object), would the remote interface loose
    any RMI features and thus violate EJB
    specifications.You don't have to worry at all if you access a remote object (in an RMI or EJB context) through a particular interface. You just have to make sure that the interface follows the RMI rules.
    This could be very useful if you want to create a number of different "views" for a remote object.
    Consider for example the following:
    class SomeRemoteObject implements A, B, ... {
       public void doSomething1() throws RemoteException {
       public void doSomething2() throws RemoteException {
    interface A {
       public void doSomething1() throws RemoteException;
    interface B {
       public void doSomething2() throws RemoteException;
    interface RemoteInterfaceOfSomeRemoteObject extends A, B, ... {
    }Interfaces A and B follow the RMI regulations. In this case you could access the remote object through A which disables access to doSomething2() which in turn is only accessible through B. Ofcourse the remote interface should contain the methods that you want to access remote for example by extending A and B.
    public A getAnAObject() {
    A anAObject = getAnAObject();
    anAObject.doSomething1();
    System.out.println(anAObject instanceof RemoteInterfaceOfSomeRemoteObject); // true
    System.out.println(anAObject instanceof B); // true
    System.out.println(anAObject instanceof java.rmi.Remote); // trueThere are indeed subtle differences in setting up the remote system (EJB or plain RMI) but the same principles always apply.
    Hope it helps.
    >
    Thanks in advance.

  • TraderService Remote Interface

    Why is the TraderService back end stateless session EJB implemented with remote
    interfaces instead of local interfaces. If I'm not mistaken, upon reaching this
    service, all processing will be co-located on one server, therefore, wouldn't
    it be more performant to implement this EJB with local interfaces?

    Hello,
    The examples are simply starting points to assist your own development
    work.
    You might want to take a look at the web service design guide [1] in the
    docs. If you are deploying to a cluster of WebLogic Server instances,
    by default the deployment targets all server instances in the cluster.
    This corresponds to homogenous module deployment, which is recommended
    in most clusters. See [2].
    Regards,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/design.html
    [2]
    http://edocs.bea.com/wls/docs81/deployment/overview.html
    Sean Cohan wrote:
    >
    Why is the TraderService back end stateless session EJB implemented with remote
    interfaces instead of local interfaces. If I'm not mistaken, upon reaching this
    service, all processing will be co-located on one server, therefore, wouldn't
    it be more performant to implement this EJB with local interfaces?

  • 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

  • WLS 7 - IIOP - Remote interface with parameterless method

    Hi all,
    I am developping EJBs which are accessed by clients with IIOP.
    Every method without any paramter I put in the remote interface do not
    work with IIOP but are ok when I call with T3.
    Note that all other methods which have parameters work properly.
    The EJB (Stateless SessionBean) is well deployed and installed on the
    server,
    ejbc gives no error.
    The resulting stacktrace on the client is :
    java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception
    is:
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception
    is:
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    org.omg.CORBA.BAD_OPERATION: minor code: 0 completed: No
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at com.sun.corba.se.internal.iiop.ReplyMessage.getSystemException(ReplyMessage.java:93)
    at com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:83)
    at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:204)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:459)
    at ch.vd.collectivitespkg._Collectivites_Stub.getTypesCollectivites(Unknown
    Source)
    at ch.vd.testpkg.CollectivitesTestClient.getTypesCollectivites(CollectivitesTestClient.java:467)
    at ch.vd.testpkg.CollectivitesTestClient.testRemoteCallsWithDefaultArguments(CollectivitesTestClient.java
    :502)
    at ch.vd.testpkg.CollectivitesTestClient.main(CollectivitesTestClient.java:545)
    At the same time only one line is added to the server log :
    ####<Jun 12, 2003 4:33:52 PM CEST> <Info> <IIOP> <****> <Server>
    <ExecuteThread: '14' for queue: 'default'> <kernel identity> <>
    <002002> <Failed to parse method name getTypesCollectivites.>
    FYI : I am using Jbuilder 7.0 with JDK 1.3.1-b24 and WLS 7.0 SP1.
    Thanks in advance for your help.
    Chris.

    [email protected] (ChrisFR) writes:
    Here is the fragment of the (new-)remote interface concerned :
    public Collection getTypesCollectivites(int type) throws
    RemoteException, BusinessException;
    BusinessException is not a runtime exception, it extends Exception.
    Where can I have a look on bugfixes in SP2 and SP3 ?Yes, we just fixed this. The CR is CR108317, if you go through support
    you will be able to get a patch. This will appear in sp3.
    andy

  • Role of Remote Interface in EJB 2.0

    Hi,
    Recently I was working upon a sample application for developing Entity Bean, the Home interface had a method which provided Business functionality. The implementation of the method was given in the Bean Class by preceeding the name of the method by ejbHome.
    This method was callable by just looking up the Entity Bean, thus not requiring the need for the Remote Interface.
    Now my question is why was this kind of work around required? This totally removes the need for the remote interface, if the Bean Writer decides so.
    The practices suggest that any functionality to the client should be provided via remote interface, and Home interface should contain only the methods related to life cycle of the EJB, then why to have business methods in the Home Interface.
    Please clarify.

    Bhushan!,
    I hope you getting the whole context wrong!.
    As I said earlier if you want to operate on your persistent data, then you must either find an entity bean through ejbFind() or create a new one using ejbCreate ().
    However ejbHome methods provide a functionality which is independent of the persistent data that the bean represents. For ex. Suppose you have an entity bean User that maps to a user database then in order to operate on user data you will always need a remote interface.
    However if you need some information from the bean which is independent of user data then, for ex. you want to say Hello to your clients, you need to implement this functionality using ejbHome () methods.
    I hope this helps.
    VJ

  • Multiple DMVPN instance on the same router one public interface

    I know it possible to run multiple instances DMVPN on a router with one public interface.
    Question:
    If I take one of my site and put it on a different tunnel from all other remote sites will it be able communication to the other site directly?  I am running EIGP through the gre Tunnel
    example of the hub site:
    interface Tunnel100
    bandwidth 100000
    ip address 192.168.105.254 255.255.255.0
    no ip redirects
    ip mtu 1400
    ip hello-interval eigrp 1 1
    ip hold-time eigrp 1 3
    no ip next-hop-self eigrp 1
    ip nhrp authentication L3GR@RD
    ip nhrp map multicast dynamic
    ip nhrp map group WAR-881-VPN1 service-policy output SHAPE->20M
    ip nhrp map group PLA-2811-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group LIV-2811-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group BRM-2811-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group ELP-2811-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group RAN-2811-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group LAB-2911-VPN1 service-policy output SHAPE->T1(MLPPPx2)
    ip nhrp map group ORE-2811-VPN1 service-policy output SHAPE->5M
    ip nhrp map group VAU-2811-VPN1 service-policy output SHAPE->10M
    ip nhrp map group CAVAURTVP001 service-policy output SHAPE->10M
    ip nhrp network-id 100
    ip nhrp holdtime 600
    ip nhrp max-send 1000 every 10
    ip nhrp redirect
    ip tcp adjust-mss 1360
    no ip split-horizon eigrp 1
    ip summary-address eigrp 1 10.87.0.0 255.255.0.0
    load-interval 30
    delay 100
    tunnel source GigabitEthernet0/0
    tunnel mode gre multipoint
    tunnel key 100
    tunnel vrf PUBLIC
    tunnel protection ipsec profile IPSEC-DMVPN
    interface Tunnel300
      bandwidth 100000
      ip address 192.168.106.254 255.255.255.0
      no ip redirects
      ip mtu 1400
      ip hello-interval eigrp 1 15
      ip hold-time eigrp 1 45
      no ip next-hop-self eigrp 1
      ip nhrp authentication L3GR@RB
      ip nhrp map multicast dynamic
      ip nhrp map group CAVAURTVP001 service-policy output SHAPE->10M
      ip nhrp network-id 100
      ip nhrp holdtime 600
      ip nhrp max-send 1000 every 10
      ip nhrp redirect
      ip tcp adjust-mss 1360
      no ip split-horizon eigrp 1
      ip summary-address eigrp 1 10.87.0.0 255.255.0.0
      load-interval 30
      delay 100
      tunnel source GigabitEthernet0/0
      tunnel mode gre multipoint
      tunnel key 100
      tunnel vrf PUBLIC
      tunnel protection ipsec profile IPSEC-DMVPN
    Thanks the help in advance,
    Nigel

    Hello Mr Manhurt,
    I can help you. But first what is EIGP?

  • Get a remote interface from a local instance

    hi,
    I want to construct a bean locally on a server and then I want to pass the remote interface for that constructed bean back to a client. Is this possible?
    Thanks

    Yes. Take a look at SessionContext class. You can't construct a bean yourself, as its life is managed by container.
         * Obtain an object that can be used to invoke the current bean through
         * the given business interface.
         * @param businessInterface One of the local business interfaces
         *        or remote business interfaces for this session bean.
         * @return The business object corresponding to the given business
         *         interface.
         * @exception IllegalStateException Thrown if this method is invoked
         *         with an invalid business interface for the current bean.
        <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException;

Maybe you are looking for