Cmp2.0 /local interface

Hi! I'm trying to deploy the wrox ch16 sample on cmp2.0 and local interfaces and got the following error:
java.lang.InstantiationException: local/local-home tag not supported in this version
Does OC4J ver 9.0.2 supports the new cmp2/cmr and local interfaces?
Thanks.

Pedro -- Local interfaces were not available in v902 but they are available in the OC4J v903 Developer Preview. You can download this from OTN. Please start at http://otn.oracle.com/tech/java/oc4j/content_preview.html to find the download as well as updated documentation and more data about the J2EE compliant version of OC4J.
Thanks -- Jeff

Similar Messages

  • Basic ques - Local Interface

    Is it mandatory to have Local Interfaces in my ejbs built in EJB2.0? Or can I build
    my beans without them?

    As Rob stated you have to use local ejbs when you define a CMP2.0
    relationship (example Customer-Contact, where Contact is defined as a local
    ejb).
    Also, you could prefer to use local ejbs if you think they are going to be
    accessed from the same virtual machine.
    Do I have to have classes derived from EJBLocalObject and EJBLocalHome in my
    ejb?
    Yes. Your local ejb interface should extend EJBLocalObject and the home
    interface should extend EJBLocalHome.
    "vishal" <[email protected]> wrote in message
    news:3c764d48$[email protected]..
    >
    Do I have to have classes derived from EJBLocalObject and EJBLocalHome inmy ejb?
    >
    >
    Rob Woollen <[email protected]> wrote:
    The only requirement is that container-managed relationships are only
    through local
    interfaces. If you're not using EJB 2.0 CMP relationships, then you
    can continue to
    use remote interfaces if you wish.
    -- Rob
    vishal wrote:
    Is it mandatory to have Local Interfaces in my ejbs built in EJB2.0?Or can I build
    my beans without them?

  • Remote and local interface on same ejb 3.0 bean instance

    Hi,
    Is it posible to get remote and local interface on same ejb 3.0 bean instance.
    For example get local interface of a bean and than pass it as remote to client.
    Both interfaces must operate on same bean instance.
    Thanks
    Zlaja

    yes. You can implement multiple interfaces on a single class, so you can add a local and a remote interface. One trick to avoid duplicate code is to simply make the remote interface extend the local interface; then you only have to add the @Remote annotation and you're done.
    For example get local interface of a bean and than pass it as remote to client.You don't pass an instances to a client, a client looks up a remote instance of the bean through JNDI.

  • Weblogic 10.3.2 EJB3 Local Interface in POJO/Helper classes

    Hi,
    I have a jar file containing all EJB's in application & some Helper classes. I want to access Local interfaces of EJBs in those helper classes. Is there any way I can do it? I've gone through Maxence Button & Jay SenSharma 's blogs about accessing Local interface. but it doesn't help. May be these two guys can help me more here.. My requirement is very simple. Just to access local interface in POJO/Helper classes that are in same JAR file as EJB's. I can't get reference with @EJB class level annotation as Helper classes are called independently from MBean services.. not from any EJB or Servlert.
    Please if anyone can tell me how do I get reference of local interfaces, that would be really good.
    my environment is
    Weblogic 10.3.2
    EJB3
    Regards,
    Prasad

    Hi,
    Just check ...If you want something like mentioned in the below Link with a complete Example:
    [http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/|http://jaysensharma.wordpress.com/2009/08/16/weblogic-10-3-ejb3-local-lookup-sample/]
    Regards
    Jay SenSharma

  • Use of local interface btw EAR

    hi,
    Can i use local interfaces to call session bean of EAR1 from EAR2. in my case EAR1 and EAR2 are deployed in the weblogic instance(same jvm). and parameters are being passed by value(because of 2 different classloaders).
    I tried doin this ... but resulted in exception being thrown when i tried to do a lookup to the localhome of EAR1.
    Please advise,
    venkat

    Hi,
    Even though they are running in the same JVM, the classes are not visible between EAR1 and EAR2 because they are loaded in separate classloaders, therefore local interfaces won't work.
    -thorick

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

  • EJB 3.0 Session bean local interface NullPointerException

    I am trying a very simple test of a Stateless EJB 3.0 bean called from a servlet.
    The bean has a local interface, annotated with @Local. The bean implements that interface and is annotated with @Stateless.
    I have a servlet with a variable of the local interface type, annotated with @EJB. The servlet's doGet method invokes the bean's one method using that interface and it works fine.
    BUT if I put the same variable, annotated with @EJB into another class in the web container, it is not injected correctly and I get a NullPointerException on the variable. This class is in WEB-INF/classes with the servlet class, so I assume it is loaded by the same classloader.
    I don't understand why the servlet can instantiate the EJB local interface successfully but another class in the web container can't. I get the same result in OC4J standalone 10.1.3.1 and 10.1.3.3.

    Only managed classes like servlets, filters etc. will have context and EJB references injected into them, and only with servlet version 2.5. A work colleague found the answer in Debu Panda's blog:
    http://debupanda.blogspot.com/2006_10_01_archive.html#116184543992078773
    This behaviour appears to be part of the EJB 3.0 standard.
    The solution is to use JNDI lookup in the client class (POJO) and declare an ejb-local-ref in web.xml.

  • EJB 3.0 local interface JNDI

    Hello
    I found some information that will probably help a lot of people having trouble with local interface not referenced in JNDI.
    You need to delacre each local interface in the web.xml.
         <ejb-local-ref>
              <ejb-ref-name>MappedNameInYourEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
    <local> yourLocalInterface
              </local>
         </ejb-local-ref>
    The weird thing about this is you don't need to do it when you use remote interface!! I would have thought Weblogic was smart enough to put your EJB in the JNDI when you declare @local on your interface!!
    Am I wrong with something here?
    When I read the EJB spec, it says you don't need to declare your EJB anywhere when you use annotation....
    If someone have an explanation I would be very happy to read about it!!!!
    Tanx

    Hi,
    In our current impl, we don't bind local business interface impl onto global jndi, this is because adding global JNDI binding for local EJB means every local business interface object must be bound into global JNDI, which will give rise to strange errors when accessing remotely or in different application context.
    On the other hand, you needn't add each local interface in the web.xml, you can use annotation through EJB link, which is the suggested way to use EJB local reference, for example:
    @Stateful(name="AccountManagementBean")
    public class AccountManagementBean
    @EJB(
    name="PersonBeanRef",
    beanName="PersonBean"
    Person person;
    @Stateless(name="PersonBean")
    public class PersonBean implements Person {
    In this example, AccountManagementBean has a local reference of PersonBean, the key is you should use beanName in @EJB, whose value is the ejb name of referenced EJB.

  • Problem with Local Interfaces (WSAD 5)

    I built an Entity Bean with Local Interface and a Remote Interface (apperently they both have the same JNDI name in WSAD)
    and when I look up for the name from other Session Bean (same EJB group) and I try to cast it to the local interface there is a classCastException.............
    HELP ME

    Nidhi
    I had the same problems as you that went away. If you have both remote and local interfaces defined, and your remote inerface can be accessed via JNDI lookup using (say) "ejb/sessionbean/stateless/HelloHome", then you can access the local intercafe using "local:ejb/ejb/sessionbean/stateless/HelloHome".
    The URL http://localhost:9080/UTC/initialize?port=2809 is very useful to browse the JNDI tree. Just expand "Local EJB beans" and position your mouse over the item of interest. The JNDI lookup name will echo in the bottom (solid) frame of the browser. The only problem is that the jndilookup name will appear (mistakenly) as local:/ejb/ejb/stateless......, just get rid of the first forward-slash to make it look like local:ejb/ejb/stateless....
    Hope this helps
    Somnath

  • Problem with local interface

    Hi all,
    I have a problem with the local interface,
    after I change the Home and Local interface I get a message when compiling saying that the bean has to implement the inherited abstract method javax.ejb.EJBLocalObject.isIdentical (EJBLOcalObject) and the mothd isPrimaryKey()...why is that, do I need to implement these methods?
    Thanks,
    A.

    solved, wrong code

  • How to get Initial context of Local Interface in weblogic 8.1

    I have developed a local entity bean but i wouldnt able to initial context of that bean
    CAN ANYBODY HELP ME
    bean deployment descriptor
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!--
    ** This file was automatically generated by EJBGen 2.16
    ** Build: 20031001-1049
    -->
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CabinBean</ejb-name>
    <home>my.CabinRemoteHome</home>
    <remote>my.CabinRemote</remote>
    <ejb-class>my.CabinBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinBean</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    <entity>
    <ejb-name>CabinLocal</ejb-name>
    <local-home>my.CabinLocalHome</local-home>
    <local>my.CabinLocalLocal</local>
    <ejb-class>my.CabinLocal</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinLocal</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>LocalCabin</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>CabinLocalHome</local-home>
    <local>CabinLocal</local>
    <ejb-link>LocalCabin</ejb-link>
    </ejb-local-ref>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>CabinLocal</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>CabinBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    <ejb-client-jar>EjbClient</ejb-client-jar>
    </ejb-jar>
    ************************************** Client Code****************
    package com;
    import my.CabinBean;
    import my.CabinRemoteHome;
    import my.CabinRemote;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import weblogic.jndi.Environment;
    public class Test
        public static void main(String args[])
            try{
                 Context context = getInitialContext();
                          Object cab = context.lookup("CabinLocalHome");
                ///**********-- Exception is thrown at this point -******************
                System.out.println("============ done====");
                Context ct = getInitialContext();
                Object ref = ct.lookup("CabinHomeRemote");
                CabinRemoteHome home = (CabinRemoteHome)PortableRemoteObject.narrow(ref,CabinRemoteHome.class);
                //CabinRemote cab = home.create(new Integer(1));
                //cab.setName("Master Suite");
                //cab.setDeckLevel(new Integer(1));
                //cab.setShipId(new Integer(1));
                //cab.setBedCount(new Integer(1));
                Integer pk = new Integer(1);
                CabinRemote cab1 = home.findByPrimaryKey(pk);
                System.out.println("--->>>>>>>> "+cab1.getName());
                System.out.println("--->>>>>>>>  "+cab1.getShipId());
                System.out.println("--->>>>>>>>"+cab1.getBedCount());
                System.out.println("--->>>>>>>>"+cab1.getDeckLevel());
                System.out.println("---");  
          }catch(java.rmi.RemoteException e){e.printStackTrace();}
           catch(javax.naming.NamingException e){e.printStackTrace();}
           //catch(javax.ejb.CreateException e){e.printStackTrace();}
           catch(javax.ejb.FinderException e){e.printStackTrace();}
        public static Context getInitialContext() throws javax.naming.NamingException
           Properties p = new Properties();
           p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
           p.put(Context.PROVIDER_URL,"t3://localhost:7001");
           return new javax.naming.InitialContext(p);
    } ************************************** Error ***********************
    javax.naming.LinkException: [Root exception is javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null']; Link Remaining Name: 'java:app/ejb/myejb.jar#CabinLocal/local-home'
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.Test.main(Test.java:27)
    Caused by: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null'
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:98)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:771)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
         at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)

    Hi,
    from what I gather, u have two jars
    1. EJBClient - this will have remote and home interfaces and will be used by the client
    2. myEJB - this iwll have all the classes - remote & home interfaces, the bean class and all the other classes required by the bean.
    Now, the question is, who is acting as the client of your EJB ? There are 3 possibilities
    1. A servlet
    2. Another EJB
    3. a simple java program.
    In the first 2 cases, you can go for Local Interfaces (more so in the second case than the first). The reason being that the the client and server will be in the same JVM. Thus, in the first case, if the Web container and the ejb container are in the same app server, EJBs can be local.
    However, in the third case, it is unlikey that you will have the client runnng and the same jvm as the server, because the server is using the jvm provided by weblogic.
    Thus, you cannot use local interfaces in this 3rd case. I have a feeling that this is what you are doing. If so, change the local interfaces to remote.
    See if this helps. Else, I will mail you some sample code. But I am afraid, sample code wont be of much help bcoz this seems to be a design problem.
    regards

  • EXTREMELY URGENT!!  Last question on Local Interfaces

    Using Oracle9iAS 9.0.3
    Running on RedHat 8.0
    Trying to implement local interfaces to my entity bean. (Oracle9iAS Containers for J2EE for 9.0.3) provides an example for writing local interfaces.
    pg. 2-10 states:
    //The variable is specified in the assembly descriptor (META-INF/ejb-jar.xml)
    Object homeObject = context.lookup("java:comp/env/EmployeeLocalBean");
    but, if you look at the ejb-jar.xml they reference, it's as follows (pg. 2-12):
    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean Employee Example</description>
    <ejb-name>EmployeeBean</ejb-name>
    <home>employee.EmployeeHome</home>
    <remote>employee.Employee</remote>
    <local-home>employee.EmployeeLocalHome</local-home>
    <local>employee.EmployeeLocal</local>
    <ejb-class>employee.EmployeeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Where does the EmployeeLocalBean name come from for the lookup?!
    Also, do I NEED to deploy BOTH remote and local interfaces to get my local interfaces to work? Another post on this forum had a problem where they couldn't view the configurations of the EJB because there were not remote interfaces available, but then later they said it was just a problem with the web-based Enterprise Manager.
    Please, can someone let me know if these questions are not interesting enough to the forum? Has nobody here ever implemented Local Interfaces on 9.0.3? Do I need to be posting these questions to a different forum? Please advise and I will take care to get my answers elsewhere if necessary.
    It's just that every resource I've looked at for Local Interfaces (which 9.0.3 CAN implement...right?!) has conflicting information and seems to have buggy implementations. Please....help!
    Thanks in advance!

    Strangely enough, I'm not aware of troubles with enviroment variables and JNDI lookup. There are some misunderstandings - compared to WLS, JNDI tree is different.
    Here is an example of Session EJB settings:
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>XSLTransformerEJB</display-name>
    <ejb-name>XSLTransformerEJB</ejb-name>
    <local-home>com.ness.europe.integration.transformer.XSLTransformerEJBLocalHome</local-home>
    <local>com.ness.europe.integration.transformer.XSLTransformerEJBLocal</local>
    <ejb-class>com.ness.europe.integration.transformer.impl.XSLTransformerEJBBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <env-entry>
    <description>path to root transformatin file</description>
    <env-entry-name>config/RootTransformFile</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>/oracle/product/IAS903/j2ee/MwCezPassport/xslt/passport.xslt</env-entry-value>
    </env-entry>
    </session>
    Next, there is an MDB with reference to it:
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>PassportMDB</display-name>
    <ejb-name>PassportMDB</ejb-name>
    <ejb-class>com.ness.europe.integration.inbound.mdb.InboundMDBBean</ejb-class>
    <transaction-type>Bean</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    <subscription-durability>Durable</subscription-durability>
    </message-driven-destination>
    <ejb-local-ref>
    <ejb-ref-name>ejb/XSLTransformerEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.ness.europe.integration.transformer.XSLTransformerEJBLocalHome</local-home>
    <local>com.ness.europe.integration.transformer.XSLTransformerEJBLocal</local>
    <ejb-link>XSLTransformerEJB</ejb-link>
    </ejb-local-ref>
    There is basically this piece of code to do lookup environment variable:
    String toRet = (String)this.initCtx.lookup("java:comp/env/config/" + paramName);
    (of course, the config prefix is our syntax)
    As for EJB lookup, this is used:
    final InitialContext context = new InitialContext();
    return (XSLTransformerEJBLocalHome)context.lookup("java:comp/env/ejb/XSLTransformerEJB");
    I didn't created those beans but I asked mate from my team and answer as to troubles was "no".
    Is the problem lies in "not hard coded" names of beans in lookup? We are not trying to get "env/ejb" but just straighforwardly EJB using its name.
    Myrra

  • How use a proxy consumer web service in ABAP Program with local interface

    I generate a proxy class based on a WSDL file.
    I want to use this class in an abap programm without a connection but using XML files in local.
    I see with the class CL_PROXY_LOCAL_ADAPTER that it is possible to execute without connection but for use this, it's necessary to use the method REGISTER.
    This method have two parameters : Class Name and Interface Name.
    Class name is the name of my proxy class, but I don't know how to find the interface name.
    I think that a local interface is needed to generate but I don't know how to generate in interface with entries in SPROXSIG table ?
    Could you help me ?

    Check out the following links to see if it meets your needs.. Has examples to call a ABAP proxy (that consumes a webservice) from ABAP program...
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm (webservices ->webservices toolset -> examples)
    http://help.sap.com/saphelp_dm40/helpdata/en/1a/b69d427cab0831e10000000a1550b0/frameset.htm

  • Local Data Address Does not belong to any of this hosts local interfaces

    I cannot get through this exception while running
    sessionManager.initSession(
    localAddress,
    new SourceDescription[] {  },
    0.05,
    0.25);
    I get this debug output:
    Initalizing session (localAddress)
    DataAddress: 10.8.0.6/10.8.0.6
    ControlAddress: 10.8.0.6/10.8.0.6
    DataPort: 2838
    ControlPort: 2839
    10.8.0.6 is on my tun0 interface, I also tried with 192.168.1.100 which is on my eth2 interface but always get the message in the subject. The only address I can init session on is loopback address.
    I use code that looks at local interfaces and grabs ip address from one of them so I'm sure the assigned address belongs to one of my interfaces.
    Anybody knows how I can solve this problem?

    I solved this one. The problem is JMF seems to use InetAddress.getAllByName() which returns (at least in my case) only single IP address no matter how many addresses I have defined on my interfaces. The problem was solved by placing my IP address that I wanted to use by session manager into /etc/hosts. It must be the first line in /etc/hosts otherwise the other row that matches is used.

  • Deploying EJB with Local Interfaces.

    HI everybody
    I am trying example on EJB with LocalInterfaces with BMP.
    My bean without Local interface is deployed and working fine.
    Then i have changed Home & Remote interface code. Again i have deployed it . It is deployed but i am unable to Look Up.
    I am using J2SDKEE1.3 server & JDK1.3.
    I have changed both interface files as follow:-
    I have made my Home interface as :
    public interface RetrieveConditionHome extends javax.ejb.EJBLocalHome {
         public RetrieveCondition create(String SQL_WHERE_ID, String SQL_WHERE_NAME,
              String FROM_TABLE , String WHERE_CLAUSE , String LAST_UPD_USER_ID ,
              Date LAST_UPD_TMSTMP, int ROW_VERSION)
              throws CreateException;
    I have made my Remote interface as :
    public interface RetrieveCondition extends javax.ejb.EJBLocalObject {
         public String getSQLWHERENAME() ;
    -Viren

    In JMS tutorial : They have stated ejbCreateLocal method.
    I am not using this method in my Bean class. I am using general ejbCreate method as we normally do .
    I am really confused about these methods : ejbCreate & ejbCreateLocal.
    JMS Tutorial site (where they have used ejbCreateLocal):
    A J2EETM Application that Uses the JMS API with an Entity Bean
    java.sun.com/products/jms/tutorial/1_3-fcs/doc/j2eeapp3.html
    Viren

Maybe you are looking for