Can an EJB client application access to EJBs on two domains concurrently?

It is well-known that there can be multiple domains in a SUN application server. If two domains are started up, can the same EJB client application call different EJB methods from the two domains? If can, how to implement? Please kindly give a snippet of sample codes.
Another question: can EJBs among multiple domains communicate with each other? If can, tell me how to implement and had better provide some sample codes as well.

I have my client working now!
I was looking around on other forums and found a guy who said that javax.comm has problems with security. here is the address
http://lists.dalsemi.com/maillists/java-powered-ibutton/2002-February/002168.html
He said,
"This is an error generated by the javax.comm packages when initializing
the
serial ports. It's basically a security related bug. Officially, all
packages stored in your lib/ext folder should be considered trusted
code,
running with the same permissions as your trusted main application. But
it
seems that isn't the case with comm.jar.
I've heard that signing the comm.jar file might fix it, but I wasn't
able to
verify that myself (but I didn't test with Netscape's java plugin). I
found
a workaround that should take care of it (as long as your main
application
has "all-permissions"). Try adding this line to the top of your main
method:
System.setSecurityManager(null);
So I did that and it worked except for one thing. at the end of my program the client tells me
The system cannot find the path specified.
Do you think this is a major problem? What is it trying to find??
Michael B

Similar Messages

  • How client application contacts the EJB?

    Hi,
    I have a doubt. I am wondering how the client application contacts an EJB. Consider the following scenario.
    I have my web server and the application server located in two different locations, meaning two different machines.
    My web components are deployed onto the web server and my enterprise components are deployed onto the application server. In this case how the client application will know how to locate an EJB that is running on a different machine. In the client application we only call lookup method of the JNDI. But my doubt is just with the lookup name how it would be possible to locate an EJB. We are not giving any IP address or port or anything in our client application or may be we should...
    Is there anyone who can clarify please?
    Thanks in advance
    Karthik

    Hi
    This is what I wanted to know...
    If you need to access EJB components that are residing in a remote system other than the system where the application client is being developed, set the values for the Java Virtual Machine startup options:
    jvmarg value = "-Dorg.omg.CORBA.ORBInitialHost=${ORBhost}"
    jvmarg value = "-Dorg.omg.CORBA.ORBInitialPort=${ORBport}"
    Here ORBhost is the Application Server hostname and ORBport is the ORB port number (default 3700).
    This information can be obtained from the domain.xml file on the remote system. For more information on domain.xml file, see the Sun Java System Application Server Reference.
    The link you provided was more than enough to clarify...
    Thanks,
    Karthik

  • (261229964) Q RPCC-10 Where would a client application access the "waterworks.services.WaterUsage"  class?

    Q <RPCC-10> Where would a client application access the "waterworks.services.WaterUsage"
    package that it imports - and what is contained within it?
    A <RPCC-10> The WaterUsage interface is the remote interface for the stateless session
    bean that the RPC style web service uses for the business processing and it is included
    in the client.jar file for that RPC web service.

    Q <RPCC-10> Where would a client application access the "waterworks.services.WaterUsage"
    package that it imports - and what is contained within it?
    A <RPCC-10> The WaterUsage interface is the remote interface for the stateless session
    bean that the RPC style web service uses for the business processing and it is included
    in the client.jar file for that RPC web service.

  • Can't load client application at OC4J (9.0.4) start

    I have an EJB application with a client application (set in my orion-application.xml file) that connect to a database to check username (I have my own UserManager).
    When I deploy my package (OC4J started), the client application is loaded correctly. But when I restart OC4J, I have the folowing error message :
    " RoUserManager.getDataSource - Error in lookup of datasource : jdbc/RouteOptimiserDS exception is Not in an application scope - start Orion with the -userThreads switch if using user-created threads".
    I'm using the "-userThreads" option, and DataSource is correctly configured in both local and global "data-sources.xml" config file.
    It seems like the client application is started before OC4J has loaded its DataSource configuration.
    Thanks.

    Can you try the "-updateConfig" option of admin.jar?
    java -jar admin.jar ormi://localhost admin Matrox -updateConfigTo my vague memory, the "-restart" option does not necessarily implies reading the config files again.

  • How can I catch Client Application crash?

    Hi all.
    I'm developing a client application, which makes several long-time operations on its server.
    These server-operations are started, monitored and stopped by my cllient, during a "normal" lifecycle.
    The problem is: if my client unexpectedly shut down (i.e. system crash or interruption by task manager), how can I catch this event, in order to send the "interrupt" to the server and stop the current thread?
    I tried to add a WindowListener on the Main Window of my client app, but it doesn't work... any other idea?
    Thanks in advance for any help.

    But if you "pull the plug" how can the "finalize" method in the client be called?
    It's like asking your wife if she is sleeping.
    If she answers "yes" she is lying because she must be awaken to answer your question.
    The server must manage disconnections (for instance, you can devise a "ping" transaction that all clients must execute periodically.
    If the client stops to send the "ping" you can assume that the client was disconnected.)

  • Windows 7 pro client cannot access folders on server 2003 domain server

    I added a windows 7 64 bit client to a server 2003 32 bit domain 3 weeks ago and file sharing was working fine until today, 5/4/12. Now, when trying to access shared folders that reside on the server,
    I get the following "access denied" message:
    […folder…] is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
    The user name could not be found.
    Strangely enough...
    The windows 7 client
    can open shared folders that reside on the XP clients in the domain
    All the XP clients in the domain can access the server 2003 folders
    All the XP clients and the server 2003 machine can access shared folders and printers on the windows 7 client.
    The windows 7 client can ping the server 2003 machine and vice versa
    I can “see” the server in my network list, but when I click on it, I get the same “access denied” message listed above.
    So... the only problem is that the windows 7 client cannot access folders that reside on the windows server 2003 machine. There must be some sharing setting that got changed
    by a recent windows update.
    Here is what I have done/verified so far on the windows 7 client:
    In advanced sharing settings for Home/Work, Public and Domain profiles:
    network discovery is enabled
    file and print sharing is enabled
    use user accounts and passwords to connect to other computers is selected (I also tried allowing windows to manage homegroup connections instead, but the problem remained.)
    40 -56 bit encryption is enabled
    In “gpedit.msc” Local Policies/Security Settings:
    enabled the following policies:
    Network access: Allow anonymous SID/name translation
    Network access: Let Everyone permissions apply to anonymous users
    disabled the following policies:
    Network access: Restrict anonymous access to Named Pipes and Shares
    Network access: Do not allow anonymous enumeration of SAM accounts
    Network access: Do not allow anonymous enumeration of SAM accounts and shares
    What am I missing? Are there policies on the server that need to be adjusted?
    Please help! My business is crippled if I cannot access server files from this workstation. Thank you in advance.

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous
    steps should be helpful for many similar scenarios.  <o:p></o:p>
    If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You
    can also choose to unmark the answer as you wish.  <o:p></o:p>
    In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar
    problems.  <o:p></o:p>
    Thanks!<o:p></o:p>
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • Can you restrict some applications access to camera?

    The new version of Facebook allows direct access to camera from Chat and Message. In restrictions we have locked down photos on facebook but now this doesn't stop daughter sending photos to other people.
    For the time being we've turned off the camera on the phone, but is there a way to restrict the applications that can access the camera?

    Hello gbelton10. Welcome to the Apple Discussion!
    Is this even possible?
    Sorry, but no. Unlike some other manufacturer's routers, the AirPort & Time Capsule do not provide this type of feature. One workaround is to use OpenDNS to filter the types of websites that can be accessed.

  • Win 7 Client cannot access Win 2012 share by domain name

    Hello Everyone,
    We have Windows 2012 R2 Server configured as Domain cum File Server Role,
    There are 20 Win7 Clients / Domain Users who access and used their specific folder on server with \\Servername\Foldername
    After some hour (not fixed) for some users (not specific) the server path goes unavailable, but the same folder is accessible with IP address like \\192.168.1.1\Foldername. and after rebooting Win7 Client we can again access the server folder with name.
    This happen to any users anytime and the same time other users can access their folder by name,
    Please help me on this issue..
    Thanks in Advance

    > After some hour (not fixed) for some users (not specific) the server
    > path goes unavailable, but the same folder is accessible with IP address
    > like \\192.168.1.1\Foldername. and after rebooting Win7 Client we can
    > again access the server folder with name.
    This is a kerberos issue.
    By default, tickets (especially the TGT which is issued at logon) have a
    live time of 8 hours or so (can be adjustet). If this ticket expires and
    cannot be renewed (due to a lack of connectivity to a DC or whatever
    infrastructure issue), Kerberos fails and ressources cannot be accessed
    via name.
    IP on the other hand always uses NTLM and thus still works.
    How the Kerberos Version 5 Authentication Protocol Works:
    https://technet.microsoft.com/library/cc772815.aspx
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • IllegalArgumentException while accessing an EJB with a servlet client

    Dear All,
    Hey,
    I am facing some problems while accessing a deployed stateless ejb. Following is how my application is being accessed:
    WEBAPP CLIENT
         caller.html ------->> DisplayServletClient --------->> DisplayServlet
    (Simple HTML Page)          (Servlet which performs lookup)     (The actual bean)
    CONSOLE CLIENT
    DisplayConsoleClient --------->> DisplayServlet
    (Simple Console Client)     (The actual bean)
    I am using the J2EE reference implementation, the ejb bean is successfully deployed. The console client successfully, access the ejb. But when I try to access the ejb using the webapp client, I get the following exception:
    ======= EXCEPTION ENCOUNTERED ============
    Application DisplayApp deployed.
    Servlet Entered
    HTML Content Type Set
    PrintWriter Object Created
    Context Object Created
    Exception in Servlet Client Code: java.lang.IllegalArgumentException: Unknown co
    mponent type
    java.lang.IllegalArgumentException: Unknown component type
    at com.sun.enterprise.naming.NamingManagerImpl.getComponentType(NamingMa
    nagerImpl.java:670)
    at com.sun.enterprise.naming.NamingManagerImpl.getMangledIdName(NamingMa
    nagerImpl.java:708)
    at com.sun.enterprise.naming.NamingManagerImpl.getComponentIdInternal(Na
    mingManagerImpl.java:680)
    at com.sun.enterprise.naming.NamingManagerImpl.getComponentId(NamingMana
    gerImpl.java:313)
    at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(jav
    aURLContext.java:397)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.j
    ava:51)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at DisplayServletClient.service(DisplayServletClient.java:27)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:428)
    at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
    :180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationF
    ilterChain.java:197)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilt
    erChain.java:176)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:172)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:215)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
    .java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2314)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:164)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.ja
    va:368)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:163)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:995)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1088)
    at java.lang.Thread.run(Thread.java:484)
    ======== EXCEPTION END ===========
    Tweaking with the servlet client code, I have discovered that it is failing to perform a correct lookup. Can anybody suggest any remedy? My Source code is below:
    =========================================================
    ============ Remote Interface START ==============
    // The DisplayApp Remote Interface File
    import javax.ejb.*;
    import java.rmi.*;
    public interface Display extends EJBObject
         public String display() throws RemoteException;
    ============ Remote Interface END ==============
    ============ Home Interface START ==============
    // The DisplayApp Home Interface File
    import javax.ejb.*;
    import java.rmi.*;
    public interface DisplayHome extends EJBHome
         public Display create() throws RemoteException, CreateException;
    ============ Home Interface END ==============
    ============ Bean Class START ==============
    // The DisplayApp Bean Class File
    import javax.ejb.*;
    import java.rmi.*;
    public class DisplayBean implements SessionBean
         public String display() throws RemoteException
              System.out.println("The Server Side Response");
              return "Hello, Me a New Friend";
         public void ejbCreate(){}
         public void ejbRemove(){}
         public void ejbActivate(){}
         public void ejbPassivate(){}
         public void setSessionContext(SessionContext ctx){}
    ============ Bean Class END ==============
    ========== Console Client Class START ======
    // The Display Console Client Class File
    import javax.ejb.*;
    import javax.rmi.*;
    import javax.naming.*;
    import Display;
    import DisplayHome;
    public class DisplayConsoleClient
         public DisplayConsoleClient()
              try
                   Context initial=new InitialContext();
                   Object objref=initial.lookup("java:comp/env/DisplayJNDI");
                   DisplayHome home=(DisplayHome)PortableRemoteObject.narrow(objref, DisplayHome.class);
                   Display ref=home.create();
                   System.out.println("Client Side: "+ref.display());
                   ref.remove();
              catch(Exception ex)
                   System.out.println("Exception in Client Code: "+ex);
                   ex.printStackTrace();
         public static void main(String args[])
              new DisplayConsoleClient();
    ========== Console Client Class END ======
    ========== Servlet Client Class START ======
    // The DisplayApp Servlet Client Class File
    import javax.ejb.*;
    import javax.rmi.*;
    import javax.naming.*;
    import Display;
    import DisplayHome;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class DisplayServletClient extends HttpServlet
         private PrintWriter out;
         public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              try
              System.out.println("Servlet Entered");
              response.setContentType("text/html");
              System.out.println("HTML Content Type Set");
              out=response.getWriter();
              System.out.println("PrintWriter Object Created");
              Context initial=new InitialContext();
              System.out.println("Context Object Created");
              Object objref=initial.lookup("java:comp/env/ejb/DisplayWEBJNDI");
              System.out.println("Lookup Done Successfully");
              DisplayHome home=(DisplayHome)PortableRemoteObject.narrow(objref, DisplayHome.class);
              System.out.println("Home Object Created");
              Display ref=home.create();
              System.out.println("Remote Object Created");
              out.println("<html><title>The Results Page</title>");
              out.println("<body<hr>");
              out.println("<h1>The Client Side Response is: ");
              out.println(ref.display());
              out.println("</h1>");
              out.println("<hr>");
              out.println("</body></html>");
              System.out.println("Responses Done");
              out.flush();
              System.out.println("Output Stream Flushed");
              ref.remove();
              System.out.println("Remote Object Removed");
              catch(Exception ex)
                   System.out.println("Exception in Servlet Client Code: "+ex);
                   ex.printStackTrace();
    ========== Servlet Client Class END ======
    ========== Calling HTML File START ======
    <html>
    <body>
    <hr>
    <form method="get" action="/servlet/DisplayServletClient">
    <input type="submit" name="submit" value="Call Now!">
    </form>
    <hr>
    </body>
    </html>
    ========== Calling HTML File END ======
    =========================================================
    Since, the descriptors were automatically generated, I have not included them here. Also, I did not build the war, jar, ear files myself, they were automatically generated by the deploytool.
    Please help!!
    Thanks & Bye,
    Tualha Khan

    Hey,
    This was the latest code snippet which I used in the Servlet file.
    ========================
    try
              System.out.println("Servlet Entered");
              response.setContentType("text/html");
              System.out.println("HTML Content Type Set");
              out=response.getWriter();
              System.out.println("PrintWriter Object Created");
              InitialContext initial=new InitialContext();
              System.out.println("Context Object Created");
              Object objref=initial.lookup("DisplayWEBJNDI");
              System.out.println("Lookup Done Successfully");
              DisplayHome home=(DisplayHome)PortableRemoteObject.narrow(objref, DisplayHome.class);
              System.out.println("Home Object Created");
              Display ref=home.create();
              System.out.println("Remote Object Created");
              out.println("<html><title>The Results Page</title>");
              out.println("<body<hr>");
              out.println("<h1>The Client Side Response is: ");
              out.println(ref.display());
              out.println("</h1>");
              out.println("<hr>");
              out.println("</body></html>");
              System.out.println("Responses Done");
              out.flush();
              System.out.println("Output Stream Flushed");
              ref.remove();
              System.out.println("Remote Object Removed");
    ========================
    The Response was
    ========================
    Servlet Entered
    HTML Content Type Set
    PrintWriter Object Created
    Context Object Created
    Exception in Servlet Client Code: javax.naming.NameNotFoundException: DisplayWEB
    JNDI not found
    javax.naming.NameNotFoundException: DisplayWEBJNDI not found
    <<no stack trace available>>
    ========================
    So what else should I do???
    Thanks & Waiting,
    Tualha Khan

  • Java EJB client "Can't connect to ORB" errors...

    I'm writing an application that is a Java EJB client application (no web
    stuff at all). Needless to say there are no examples of such an app in
    the samples dir, they are all web-based.
    My problem is that when I try to run my application (client calls a
    stateless session bean on the server and gets a "hello world" string
    back) I get a "Could not create the TestService bean:
    javax.naming.CommunicationException: Cannot connect to ORB [Root
    exception is org.omg.CORBA.COMM_FAILURE:   minor code: 1 completed:
    Maybe]" error.
    This is a very simple test, and I'm getting quite frustrated in trying
    to figure out what's actually wrong.
    Here's the client code (the bean on the server has been deployed into a
    module called achptestEjb, the bean name is TestService)
    TestService service = null;
    TestServiceHome home=null;
    String host = "localhost";
    String port = "12345";
    try {
    Properties env = new Properties();
    Context context=null;
    String jndiName="ejb/achptestEjb/TestService";
    System.out.println("JNDI name is "+jndiName);
    env.put
    ("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://"+host+":"+port);
    context = new InitialContext(env);
    The error comes when the new InitialContext is set with the properties
    in the env object.
    Any ideas what I'm doing wrong?
    It would be a BIG help if iPlanet included one simple pure EJB client
    example. There are some of us out here who feel HTML is too limiting
    for complicated applications.
    Douglas Bullard

    I finally found the answer to my problem.... in the Ant script I had
    copied from another example, the "-iiop" was lacking in the ejbc
    arguments - almost all of the examples assume you'll be calling EJBs
    from within the container, instead of a stand-alone client, so they
    don't use that flag.
    Putting that "-iiop" flag into the ejbc arguments fixed everything.
    Thanks, Shivani, for pointing out what is now obvious but was
    mysterious.
    Douglas Bullard
    In article <[email protected]>,
    [email protected] says...
    I'm writing an application that is a Java EJB client application (no web
    stuff at all). Needless to say there are no examples of such an app in
    the samples dir, they are all web-based.
    My problem is that when I try to run my application (client calls a
    stateless session bean on the server and gets a "hello world" string
    back) I get a "Could not create the TestService bean:
    javax.naming.CommunicationException: Cannot connect to ORB [Root
    exception is org.omg.CORBA.COMM_FAILURE:   minor code: 1 completed:
    Maybe]" error.
    This is a very simple test, and I'm getting quite frustrated in trying
    to figure out what's actually wrong.
    Here's the client code (the bean on the server has been deployed into a
    module called achptestEjb, the bean name is TestService)
    TestService service = null;
    TestServiceHome home=null;
    String host = "localhost";
    String port = "12345";
    try {
    Properties env = new Properties();
    Context context=null;
    String jndiName="ejb/achptestEjb/TestService";
    System.out.println("JNDI name is "+jndiName);
    env.put
    ("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://"+host+":"+port);
    context = new InitialContext(env);
    The error comes when the new InitialContext is set with the properties
    in the env object.
    Any ideas what I'm doing wrong?
    It would be a BIG help if iPlanet included one simple pure EJB client
    example. There are some of us out here who feel HTML is too limiting
    for complicated applications.
    Douglas Bullard

  • ejb-client-jar example from the core specification

    Hello all,
    the ejb3.0 specification says (chapter 60 page 241):
    the jar file that contains the client should contain one of the following: 
    • a reference to the ejb-client JAR file 
    • a reference to the ejb-jar file that contains the client view classes 
    • a copy of the client view classes  There is also an example on page 242:
    In this example, the Bean Provider has chosen to package the enterprise bean client view classes in a
    separate jar file and to reference that jar file from the other jar files that need those classes. Those classes
    are needed both by ejb2.jar, packaged in the same application as ejb1.jar, and by ejb3.jar,
    packaged in a different application. Those classes are also needed by ejb1.jar itself because they
    define the remote interface of the enterprise beans in ejb1.jar, and the Bean Provider has chosen the
    by reference approach to making these classes available.
    The deployment descriptor for ejb1.jar names the client view jar file in the ejb-client-jar
    element. Because ejb2.jar requires these client view classes, it includes a Class-Path reference to
    ejb1_client.jar.
    The Class-Path mechanism must be used by components in app2.ear to reference the client view jar
    file that corresponds to the enterprise beans packaged in ejb1.jar of app1.ear. Those enterprise
    beans are referenced by enterprise beans in ejb3.jar. Note that the client view jar file must be
    included directly in the app2.ear file.
        app1.ear:
            META-INF/application.xml
            ejb1.jar Class-Path: ejb1_client.jar
                deployment descriptor contains:
                    <ejb-client-jar>ejb1_client.jar</ejb-client-jar>
            ejb1_client.jar
            ejb2.jar Class-Path: ejb1_client.jar
        app2.ear:
            META-INF/application.xml
            ejb1_client.jar
            ejb3.jar Class-Path: ejb1_client.jarNow finally my questions are:
    1. Why did we need to include the ejb1_client.jar in app2.ear (or even in app1.ear), wasn't it enough to deploy the ejb1_client.jar separately then refer to it (using class-path in Manifest, or may be just by using <ejb-client-jar>) as the bullets quoted first suggest?
    2. How come we didn't need to use <ejb-client-jar> for ejb2.jar
    3. Since both of ejb1.jar and ejb2.jar are packaged in app1.ear couldn't we simply refer to the ejb1_client.jar in the Manifest file of app1.ear?
    Please, I appreciate your input on this

    I am guessing here and please correct me if I am wrong:
    ejb1.jar uses interfaces in ejb1_client.jar as the interface for some of the beans so we needed to use ejb-client-jar and we needed a reference in the manifest file.
    ejb2.jar uses some of the claess/interfaces as may be a return type but not as an interface for one of its beans so we didn't need to use ejb-client-jar but we needed an entry in the manifest file.
    regarding app1.ear, we can put the ejb1_client.jar in the META-INF/lib app1.ear without the need for any entries in the manifest files.
    Edited by: malrawi on Jun 14, 2009 11:59 PM

  • EJB Client JAR project produces empty JAR

    I've built an EJB module in WorkSpace Studio using the "WebLogic EJB Project" type, which is part of an EAR. I created a couple stateless session beans within this project, and then created an EJB Client JAR project using the "EJB Client JAR-->Create EJB Client Jar" menu item on the EJB project's hidden menu.
    According to the documentation, exporting an EAR file from the EAR project will cause the client JAR to be generated. I exported the EAR file from the EAR project, and sure enough, it included the client JAR (in /APP-INF/lib/). I extracted the client JAR from the EAR and opened it up to make sure it contained all of the client-side classes. I discovered that the client JAR was empty, the only contents being the MANIFEST.MF file. The interface classes were instead contained in the EJB JAR itself.
    How can I get the EJB client code to actually be included in the EJB client JAR?
    Thanks,
    Eric

    Well I have tried this with 6.1 and first
    1. One would expect the jar name to be the name in the ejb-jar.xml -
    ejb-client-jar section
    2. It outputs the file XXXEJB_Compiled.jar but it is same size as base jar
    this is 6.1 sp3
    whats up?
    Matthew Shinn wrote:
    Hi Sanjay,
    There is a bug in the documentation. The client-jar name should never be part of the
    ejbc command line. Step 3 below should be something like:
    java weblogic.ejbc xxxEJB.jar xxxEJB_Compiled.jar
    If you have an ejb-client-jar entry in your ejb-jar.xml, the client jar should be placed
    in the directory from which you ran ejbc. Make sure that the classes that you want to be
    put in the client-jar are not loaded from the classpath. This is very important or your
    client-jar won't be created correctly. The client-jar will only contain classes loaded
    from the input jar to ejbc. A bug for the incorrect documentation has already been filed
    and should be fixed soon.
    - Matt
    Sanjay Dwivedi wrote:
    Hi,
    I am trying to use the
    <ejb-client-jar> sub-element of the Sun's <ejb-jar> (EB 2.0 DTD) element of the
    ejb-jar.xml to generate the ejb-client.jar. I followed the step as documented
    by WebLogic but the files in EJB jars and ejb-client jars are identical. Here
    is what I am doing:
    1. Build the xxxEJB.jar for my EJB by running the WebLogic.ejbc on the standard
    EJB jar file.
    2. My ejb-jar.xml file has following line:
    <ejb-jar>
    <ejb-client-jar>xxxEJBClient.jar</ejb-client-jar>
    </ejb-jar>
    3. Next I used the following command to generate the ejb-client.jar file
    java weblogic.ejbc xxxEJB.jar xxxEJBClient.jar
    My xxxEJBClient.jar files consists of exactly same files (with same sizes) as
    the xxxEJB.jar file. Only difference is that the xxxEJB.jar file includes generated
    java source files for the bean implementation class and home/remote classes.
    In my opinion the xxxEJBClient.jar should not contain the EJB implementation classes.
    Any experience using the ejb-client-jar for generating the ejb-client.jar?
    Thanks,
    Sanjay.
    [att1.html]

  • EJB client still need EJB stub when it's already compiled?

    Hi,
    I know an EJB client needs stub of EJB components to compile itself. However, does an EJB client still need stub when it's executed?

    Hi,
    I know an EJB client needs stub of EJB components to
    compile itself. EJB components should not need access to any stubs at compile time. All they need is access to the API classes, e.g. javax.ejb.*. The need for RMI-IIOP stubs is a vendor-specific issue. Some J2EE implementations require them, some don't. E.g., in the J2EE SDK we don't generate static RMI-IIOP stubs so the developer doesn't have to know about them at all.
    However, does an EJB client still
    need stub when it's executed?

  • .jar file for wls client application

    Is there a .jar file include files when client app needs at runtime

    You need weblogic jar file and if its ejb client application you might need client
    file that can be produced by ejbc.
    S
    "Wei Li" <[email protected]> wrote:
    >
    Is there a .jar file include files when client app needs at runtime

  • High CPU Usage On client application when upgrade remote SQL database

    Hi,
    Is anyone here encountered very high CPU usage after upgraded the database from SQL 2005 to SQL 2012? Following describes my issue.
    I have my client application running on Windows 7 that access to central database (SQL 2005) on Windows server 2003 using ODBC connection, this client application basically query data and perform data insert and update. There are a number of this similar
    clients connected to the database.
    Due to slowness of the database server, company decided to upgrade the database server to SQL 2012 and also new hardware runing Windows Server 2012. There is no change on the client application and client hardware and the client application still using the
    same ODBC connection to query, insert or update the new database server.
    The problem I am now experiencing now is that my client PC where my client application running the CPU usage is very high almost hitting 100% when accessing to the central database. I am also noticed this program lsass.exe that utilized almost 40-50% of
    the CPU time when client application accessing the central database.
    Is anyone here know, why client PC CPU usage 100% when access to upgraded SQL 2012 database? What is lsass.exe program doing, it only appear when accessing to database server. How to reduce the CPU usage on client?
    Thanks.
    Chee Wee.

    Hello,
    After upgrading, please rebuild indexes and update statistics on the databases.
    http://www.mssqltips.com/sqlservertip/1367/sql-server-script-to-rebuild-all-indexes-for-all-tables-and-all-databases/
    http://www.mssqltips.com/sqlservertip/1606/execute-update-statistics-for-all-sql-server-databases/
    Configure maxdop on the instance.
    http://blogs.msdn.com/b/sqlsakthi/archive/2012/05/24/wow-we-have-maxdop-calculator-for-sql-server-it-makes-my-job-easier.aspx
    If the above does not solve the issue, let us know.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for

  • Free Goos Issue

    Hi Sales order is created 1st November for 200 tooth pastes 100 brushes free of goods(2+1 free goods).At the time of delivery on 15th November you have shortage of brushes by 40. offer closed on 15th November . How do you solve in this scenario? Than

  • How can I get all the lessons on the disc (CIB)?

    I bought Adobe Photoshop Elements and Premiere Elements bundled together and I like the look of both. I also got Adobe Premiere Elements 11 Classroom in a Book. (The print in this book, by the way, is almost too small to read.) My question is this: A

  • Address Book entries for members of the same household?

    Has anyone a solution for the problem where you have multiple people living at one address, but you want all their separate work/mobile numbers and email addresses stored for syncing with your phone? For example, I currently have separate entries for

  • Problem in Softeare updating Mountain Lion, automatic reboot my mac

    I am need serious help.... all I am using Mountain Lion version 10.8.2. I am having problem in updating my iMac for last one months everytime it update it will reboot half way through.... Having probelem in updating iPhoto Update 9.4.2 and iTune 11.0

  • Lightroom not fix hot pixels from my Nikon D7100

    Hi there. I have a problem with my cam D7100: there are tons of hot/dead pixels on the sensor. I am going to bring this cam to the service center. But I have a lot of images captured with this cam, and need to remove hot pixels from them. One my frie