Remote and local interfaces....

Hey.. I used to work with weblogic 8, and now have to work with 10.01....
I remember reading some documentation about that the container can see what JVM it is running in... and hence that creating localhome interfaces it not necessary.... creating remote interfaces should be ok... as the container wont be making any remote calls and serialization when it can see that the applications are running in the same JVM...
But where can i find some documentation about this... ???
Regards
Kris

Hi Kristian,
The term local can be misleading ...
You've got to understand that when you talk about local with EJBs, it's not in the same JVM but within the same EAR.
If you want to go further, I detailed the use of EJB3 on WLS 10 on my blog :
http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html
Regards,
Maxence.

Similar Messages

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

  • Remote and Home Interfaces

    Why do we need a home interface and remote interface for a ejb.
    Must these interfaces be there for each ejb?

    Why do we need a home interface and remote interface
    for a ejb.The Home interface is like a factory for getting to your beans. The remote interface is what you use to speak "directly" to the bean. It's remote because the bean is usually on a remote server somewhere (not in the same VM as your client code). The same is true for the home interface in terms of it being remote.
    The corresponding LocalHome and Local interfaces are for use when the bean in question is not remote.
    Must these interfaces be there for each ejb?You need either a Home and Remote or LocalHome and Local interface for all beans except Message Driven Beans.

  • Remote and Local Site Sync Problems

    I have a customer who is using Dreamweaver CS4 on Mac OS X. Dreamweaver is setup to have a local site as our development server(win 2k3) and the remote site as our live web server(win 2k3). The folder structure on both the development and live web server is the same. When you view the path in the manage site window of dreamweaver it shows both remote and local site listed as /Volumes/www/Data. When dreamweaver connects to both of these to sync the files nothing happens since it sees them as the same place.
    I have looked in the /Volumes folder on the customers computer and two listings appear for the servers www and www-1. This is not what dreamweaver shows and if you repoint the link to the www-1 folder it just changes back to www.
    I have tried to create alias' and symbolic links to distinguish one folder from the other however nothing I seem to change has any effect.
    If you use finder on the machine it can distinguish between the two folders I just need to figure out how to make dreamweaver do the same.
    Any assistance on this would be greatly appreciated.

    Unfortunately no I do not have a solution. I was not able to find out at the time and the problem went away with the migration to a content management system for our web server. Also the Develpment team changed hands and the new people all use windows machines.
    Good Luck trying to find a solution.

  • JBoss and local interfaces (JNDI)

    I'm trying to do simple example involving local interfaces on JBoss.
    There is Bar remote interface, which uses Foo, local interface. And the problem is - i cant locate Foo within Bar:
    ejb-jar.xml:
    <session>
    <ejb-name>BarEjb</ejb-name>
    </session>
    <entity>
    <ejb-name>FooEjb</ejb-name>
    </entity>To make FooEjb accessible for Bar via local interface, as manual says, i have to put additional reference in ejb-jar.xml for Bar:
    <ejb-local-ref>
         <ejb-ref-name>LocalFooEjb</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
         <local-home>beans.FooHome</local-home>
         <local>beans.Foo</local>
         <ejb-link>FooEjb</ejb-link>
    </ejb-local-ref>But it doesnt change anything, JBoss maps Foo like this: "Bound EJB LocalHome 'FooEjb' to jndi 'local/FooEjb@13595063'", and
    public class  Bar ... {
    Object ref = context.lookup("LocalFooEjb");
    }resuluts in exception:
    "java.lang.RuntimeException: LocalFooEjb not bound ..."
    Question: how do i map local interfaces within JBoss to some human-readable and predictable name?
    Thanks for help.
    update:
    specifying JNDI names in jboss.xml does the trick, but i still dont understand why JBoss ignores local-ref element. So anyone who can explain is welcome.
    jboss.xml
    ...xml declaration..
    <jboss>
         <enterprise-beans>
              <session>
                   <ejb-name>StockListEjb</ejb-name>
                   <jndi-name>remote/StockListEjb</jndi-name>
              </session>
              <entity>
                   <ejb-name>StockEjb</ejb-name>
                   <local-jndi-name>local/StockEjb</local-jndi-name>
              </entity>
         </enterprise-beans>
    </jboss>Edited by: anykeyN on Jun 29, 2008 7:06 AM

    [skipped]

  • CMR and Local Interfaces

    I have a question on setting up CMR in an environment where I want to utilize local
    interfaces within a weblogic server instance. In the deployment descriptor, I have
    set up the home, remote, local-home, local, and ejb-class entries. I then want to
    define the relationships between two CMP entity beans. Here is where I run into
    problems.
    1) If I define the CMR field using the local interface, I get an error stating that
    the type defined by the bean for the field does not match that of the remote interface.
    2) If I define the CMR field using the remote interface, I get an error stating that
    the bean must use the local interface for the CMR if one exists.
    Seems kind of circular to me. What am I missing?

    If you want to be able to have mutiple children companies for a parent
    company and you want to be able to query for the parent company for a given
    comapnay then this is the XML I would do something like the following. In
    your xml you had the mutiplicities inverted and also the cmr field was
    either in the wrong place or misnamed (ie, if it had to be in the top block
    then it should have been "childCompanies" instead of "parentCompany").
    Assuming the bean name in the descriptor for the CompanyEJB is Company:
    <ejb-relation>
    <ejb-relation-name>Company-ParentCompany</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ChildCompanies</ejb-relationship-rol
    e-name>
    <multiplicity>one</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ParentCompany</ejb-relationship-role
    -name>
    <multiplicity>many</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>parentCompany</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    In the CompanyEJB you would have:
    public abstract CompanyLocal getParentCompany();
    public abstract void setParentCompany( CompanyLocal parent );
    -- Anand
    "Steve Ebersole" <[email protected]> wrote in message
    news:[email protected]...
    >
    The jar I am running through ejbc is attached (with source). The EJBobject naming
    conventions are as follows:
    ejb-class = CompanyEJB
    home = CompanyHome
    remote = Company
    local-home = CompanyLocalHome
    local = CompanyLocal
    The pertinent ejb-jar snippet:
    <ejb-relation>
    <ejb-relation-name>Company-ParentCompany</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ChildCompanies</ejb-relationship-rol
    e-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>parentCompany</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Company-Has-ParentCompany</ejb-relationship-role
    -name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Company</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    And the weblogic-cmp-rdbms-jar snippet:
    <weblogic-rdbms-relation>
    <relation-name>Company-ParentCompany</relation-name>
    <weblogic-relationship-role>
    <relationship-role-name>Company-Has-ParentCompany</relationship-role-name>
    </weblogic-relationship-role>
    <weblogic-relationship-role>
    <relationship-role-name>Company-Has-ChildCompanies</relationship-role-name>
    <column-map>
    <foreign-key-column>PRNT_COMP_ID</foreign-key-column>
    <key-column>COMP_ID</key-column>
    </column-map>
    </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    In the CompanyEJB, these are the two scenarios I tried:
    1)
    public abstract Company getParentCompany();
    public abstract void setParentCompany( Company prnt );
    2)
    public abstract CompanyLocal getParentCompany();
    public abstract void setParentCompany( CompanyLocal prnt );
    The only way I have been able to get it to work so far is to use thesyntax in #1
    above and then to remove all references to the local interfaces in thedeployment
    descriptors.
    Thanks for all help

  • Use remote or local interface in my CMP EB?

    I found it's suggested to writer your CMP EB with Local interface.and a Session Bean with Remote interface.and bundle them into a same EJB JAR file.my end-user client (WAR file) call SB in another JVM.
    I wrote two methods in my SB named [CreateAuser & DeleteAuser] which call enity bean by local interface.
    and I found it wokrs good anywhere while doing Create or Remove an enity object in my jsp files;
    But I have no way to directly call enity bean in jsp files to do database query.
    Do I have to write a method like findbyuserid which calls entity bean's home method findByPrimaryKey()? if so I should rewriter many methods in my SB to meet my jsp files need.
    What shall I do ,what is the common way to do sth like that?

    Hi,
    You SessionBean (Session Facade pattern) should provide service such as Business Service (Create User, Remote User, GetUser ...) that's the role of SessionBean as Session Facade.
    All the method you expect to call from Presentation Tier.
    Regards
    Sebastien Degardin.

  • RPC web service session beans and local interfaces

    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

    Ta. Thanks for the info.
    Any idea when Local I/F support is due?
    -Nick
    "Neal Yin" <[email protected]> wrote:
    >
    "Nick Minutello" <[email protected]>
    wrote
    in message news:3d4413a4$[email protected]..
    I was just about to post the very same question - but for WLS 7.0.0.1.
    There are essentially two questions:
    1) (from a functional perspective)
    Can I expose Local Interfaces as SOAP using the auto-generation(servicegen ant
    tasks)?Local Interfaces support is coming.
    2) (from a performance perspective)
    Does the generated SOAP implementation go via the (expensive) RemoteInterface
    (ie marshalling) - or is the RMI marshalling optimised out (by setting<enable-call-by-reference>true</>)?
    You can set this option by yourself on your EJB. Web service runtime
    doesn't
    do any magic in this area.
    Regards,
    Nick
    "Peter" <[email protected]> wrote:
    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

  • Remote and local databases

    let say that i access a oracle form through the web and that form access data from two distributed databases, then will there be a remote database and local database for the user or all the databases will be remote databases to the user

    In my opinion.
    using local databases -- access tables without DB_link
    using Remote databases -- access tables through DB_link

  • Remote and Home interface binding to an EJB2.1/3.0 bean.

    When deploying a complete ejb bean,
    -What associated a bean class, within the container,
    with it's home and remote interfaces?
    -JBoss Application server requires that the Bean class
    directly implement both interfaces.
    -Assuming EJB 2.1, is this approached by
    interface implementation, a naming convention,
    a common location in a package/directory,
    or is this put in the deployment descriptor xml file?
    What is the standard approach?
    Z.

    If you have included the HTTP server with your 10.1.3.2 installation you could also setup a proxy/proxy-reverse setup in the portal http server for the /app08 mountpoint and point this to your 10.1.3.2 server....

  • Remoting and localized output from executables

    Hello all, I am in need of a bit of assistance.
    We have client computers which have non-English Windows 7, and thus any executable that produce output produce non-English output. This is not a problem when using PowerShell locally, all localized output is displayed properly.
    Problems arise when using PowerShell remoting, where output does not display non-English characters correctly. Examples of native executables which produce incorrect output: ipconfig, ping, wingmmt.
    Host's output encoding:
    IsSingleByte      : True
    BodyName          : ibm850
    EncodingName      : Western European (DOS)
    HeaderName        : ibm850
    WebName           : ibm850
    WindowsCodePage   : 1252
    IsBrowserDisplay  : False
    IsBrowserSave     : False
    IsMailNewsDisplay : False
    IsMailNewsSave    : False
    EncoderFallback   : System.Text.InternalEncoderBestFitFallback
    DecoderFallback   : System.Text.InternalDecoderBestFitFallback
    IsReadOnly        : True
    CodePage          : 850
    Remoting output encoding:
    IsSingleByte      : True
    BodyName          : iso-8859-1
    EncodingName      : Western European (Windows)
    HeaderName        : Windows-1252
    WebName           : Windows-1252
    WindowsCodePage   : 1252
    IsBrowserDisplay  : True
    IsBrowserSave     : True
    IsMailNewsDisplay : True
    IsMailNewsSave    : True
    EncoderFallback   : System.Text.InternalEncoderBestFitFallback
    DecoderFallback   : System.Text.InternalDecoderBestFitFallback
    IsReadOnly        : True
    CodePage          : 1252
    Following command can be run to change console output encoding to UTF8:
    [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
    However, running this on remote session will result in "Exception setting "OutputEncoding": "The handle is invalid." Running this on host works, but has no effect on remote session.
    Apparently $OutputEncoding only works for input, not output. But I tried to set it to UTF8 anyway, with no effect.
    This problem does not affect PowerShell cmdlets, as Write-Host and Write-Output produce correct output even in remote session.
    Previously host had PowerShell 3 and client had PowerShell 2, now both have PowerShell 4 and problem still persists.
    Anyone know how I can receive correct output from localized native executables? Thanks in advance.

    Actually I am using PS remoting from server to client workstations.
    I have provided several examples of commands that produce incorrect characters in place of non-English characters in the first post. Likewise I have provided encoding info in the first post.
    As for culture info, info below.
    Get-Culture on host:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)
    Get-Culture in remote session:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)
    Get-Culture locally on client:
    LCID             Name             DisplayName
    1035             fi-FI            Finnish (Finland)

  • What is the use of Remote and Home Interface in EJB's?

    Is it like a stub and skeleton or any other purpose

    Home interface is handling the lifecycle events while Remote is handling the logic or other Business methods

  • Recording a person remotely and locally at the same time

    Using the most recent version of Adobe Audition for the Mac...
    I'm recording 2 people on my end, but also need to be able to record a third person that is in another city at the same time. They all need to be able to hear each other and I need a decent recording. I've got great mics on this end and I'm using Adobe Audition to record onto a Mac. The remote person has a good USB mic but I am not sure how to get his audio in and a monitor of everything back out to him. Any ideas?

    Not a simple as it sounds...
    The first thing to consider is how you're getting the voice from the other city into your system?  Regular phone?  Skype?  Specialist IP transmission device?  Skype (or similar) might be easier but not up to the full quality you'll get locally.
    Second, you have to consider what's fed where.  The remote voice will wish to hear the two people local to you but NOT his own voice returning with heavy lag.  In a professional situation, you'd also have a facility to over ride the programme audio for a director (you?) to give direction and countdowns etc.
    I know there are specialist pieces of podcasting software that can do some or all of this on a single computer (though with varying degrees of success from what I gather).  However, depending on the resources available, if it was me, I'd use 2 computers (and a third at the remote end), a headphone amp and a small mixer with at least one pre fade aux.
    I'd use one computer to set up a Skype connection with the remote end, feeding the line out into one channel of the mixer.  I'd feed the two local mics into two other channels of the mixer and the main output(s) of the mixer into your Mac for recording.  Up to you (and what you have) whether you keep each voice in a separate track or maybe just pan the local mics to one side and the remote to the other to keep the two locations separate.
    I'd use the pre fade aux to feed to the remote location, turning up the two local mics but NOT his own voice.  If necessary (and it usually is) I'd set up a third basic mic into the pre fade aux so I could talk to the far end as required.
    Anyhow, that's how I'd do it.

  • 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

  • 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

Maybe you are looking for

  • How to create editable select box in jsp page

    hi, i got som peculiar requirement in my jsp page.i have my page like this. <html> <body> <form name="test"> <select name="test"> <option value="one">USA</option> <option value="two">India</option> <option value="three">UAE</option> </select> </body>

  • Ipod wont come up on itunes

    my iPod wont come up on iTunes, ever since I formatted it, i connect it and it displays the DO NOT DISCONNECT sign, and its on MY COMPUTER, but I open up iTunes and it doesn't recognize the iPod. Please help!!

  • Setting up touch for the first time

    Hey! im getting ipod touch soon.. i was wondering when i first connect my ipod to my mac i should register it? am i obliged to make an iTunes store? (caz i dont have on , and i dont want to make one) Thanks

  • Activating itunes u

    I received an activation link and successfully activated our itunes U account. But now I am unable to access the site to begin setting it up. Please advise on what I should do. https://deimos.apple.com/WebObjects/Core.woa/Activate/emu.edu/004d76ed473

  • 4S (7.0.4) won't connect to Itunes 11.1.3.8, but iphone wants to confirm should I trust this PC

    Morning All I have a 4S (7.0.4) & it won't connect to Itunes 11.1.3.8, but iphone wants to confirm should I trust this PC when i connect the cable. I'm running on Window 7 Any suggestions Kind regards James