Accessing EJB's from Applet

Hai friends,
I want to access the ejb form the applet is it possible ?
if passible please let me know how we access?
Please send souce code to this id
[email protected]
Ok Friends i am wating for replys

Is it possible to access EJB's from applet?Yes, but not recommended.
if Yes,Please let me know how will happen and also if
possible send me the peace of source code for this.
mail id is : [email protected]
Are you inviting spam by passing your mail id?
Google and find out how EJB lookups are performed.

Similar Messages

  • Accessing EJB's from CORBA clients

    Hi!
    Can someone answer one badly important question?
    Is it possible to access EJB's from CORBA clients directly, as if the
    beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
    CORBA/Java server application as a liason between CORBA client and EJB
    server!
    I'm using WebLogic Enterprise 5.0.1.
    Thanks in advance.
    Aleksey.

    Please reference a later posting on this very same question.
    -- Lou Caraballo
    Sr. Systems Engineer
    BEA Systems Inc., Denver Telco Group
    719-332-0818 (cell)
    720-528-6073 (denver)
    Aleksey Bukavnev <[email protected]> wrote in message
    news:[email protected]..
    Thank you!
    Aleksey.
    Bill Lloyd wrote:
    There is a java to IDL mapping, which is quite complex. To use it, you
    must
    have an ORB which supports, at minimum, CORBA 2.3. ORBs I know of which
    support this include Orbix 2000 for Java, Visibroker 4.0 for Java, and
    Orbacus 4.0 for Java.
    Also, check out the June 2000 "Java Report" which has an article onthis.
    >>
    To be perfectly honest, though, the best solution is to write a bridge,in
    Java. One side is IDL, which CORBA clients use. The implementation ofthat
    IDL makes RMI requests to get the necessary info. This solution willwork,
    guaranteed. The portion of the spec for the java to IDL mapping isstill
    quite new, and I would expect some, uh, "unexpected features" at thistime.
    >>
    -B
    "Aleksey Bukavnev" <[email protected]> wrote in message
    news:[email protected]..
    Hi!
    Can someone answer one badly important question?
    Is it possible to access EJB's from CORBA clients directly, as if the
    beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
    CORBA/Java server application as a liason between CORBA client and EJB
    server!
    I'm using WebLogic Enterprise 5.0.1.
    Thanks in advance.
    Aleksey.

  • Error while accessing EJB method from JSP

    Hi,
    I am trying to access a bean from a JSP and have the foll. code piece:
    String url = "t3://localhost:7001";
    public Context getInitialContext() throws Exception {
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    return new InitialContext(p);
    String getStackTraceAsString(Exception e)
    // Dump the stack trace to a buffered stream, then send it's contents
    // to the JSPWriter.
    ByteArrayOutputStream ostr = new ByteArrayOutputStream();
    e.printStackTrace(new PrintWriter(ostr));
    return(ostr.toString());
    %>
    <%
    String op="";
    try {
    // Contact the AccountBean container (the "AccountHome") through JNDI.
    Context ctx = getInitialContext();
    out.println("initial context got !!");
    DemoHome home = (DemoHome) ctx.lookup("demo.DemoHome");
    out.println("home got !!");
    %>
    <p>
    <%
    Demo ac = null;
    try {
    ac = (Demo) home.create();
    out.println("create called!!");
    if (ac==null)
    out.println("ac is null!");
    catch (Exception ee) {
    out.print("exception 1");
    %>
    <p>
    <%
    try {
    out.println("going to call method!");
    if (ac!= null)
    op = ac.demoSelect(); /* FAILURE POINT */
    else
    out.println("ac is null->error!!");
    out.println(ac.demoSelect());
    out.println("string got!!");
    out.println(op);
    catch (Exception e) {
    getStackTraceAsString(e);
    e.printStackTrace();
    out.println("error 2");
    catch(Exception e)
    out.println("error 3!");
    It gives an error on trying to access the method "demoSelect".
    e.printStackTrace gives the output:
    java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated in EJB 1.1. EJB 1.1 compli
    ant containers are not required to implement this method. Use java:comp/env instead.
    <<no stack trace available>>
    JSP output is as foll.-->
    getting initial context initial context got !! home got !!
    create called!!
    going to call method! error 2
    What is wrong???
    pls help!

    Greetings,
    Hi,
    I am trying to access a bean from a JSP and have the
    foll. code piece:
    <%
    String op="";
    try {
    // Contact the AccountBean container (the "AccountHome") through JNDI.
    Context ctx = getInitialContext();
    out.println("initial context got !!");
    DemoHome home = (DemoHome) ctx.lookup("demo.DemoHome");
    out.println("home got !!");Though it doesn't seem to be the problem in this case, good EJB coding practices dictate that your code should be narrowing the home reference before calling any of it's methods (i.e. create(...) )... WebLogic may allow handling of its protocol objects in their native state, but other vendors do not... your application is not portable without narrowing.
    It gives an error on trying to access the method "demoSelect".
    e.printStackTrace gives the output:
    java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated inThe error is not in your JSP, but in the bean... it seems your bean is attempting to acquire its "environment properties" in the pre-1.1 style, when...
    EJB 1.1. EJB 1.1 compliant containers are not required to implement this
    method. Use java:comp/env instead. ...instead, it should be looking them up in its JNDI namespace.
    What is wrong???
    pls help! Regards,
    Tony "Vee Schade" Cook

  • Accessing EJB components from a Remote Client

    Hi,
    When an web component (Servlet/JSP/Java appl.) need to invoke an business method from an EJB, it first lookup for the registered name from the Application server and obtain the remote reference i.e. the EJB Remote interface. To do this, the client must have got the client-jar file containing the stub. Now, if in a distributed environment, my client is in a different machine and need to access the J2EE server across network, what would be the scenereo.
    Is it so, for every EJB the client need to call, it must have got the client-jar file in it's local classpath ? this seems to be not at all feasible.
    Is it so, the client loads the Stub acroos the network while obtaining the remote reference ?
    Please inform me, what actually happens when a client invokes a EJB call deployed in any application server, across the network !!!
    Regards,
    Kaustuv Bhattacharya

    Greetings,
    Hi,
    When an web component (Servlet/JSP/Java appl.) need to
    invoke an business method from an EJB, it first lookup
    for the registered name from the Application server
    and obtain the remote reference i.e. the EJB Remote
    interface. To do this, the client must have got the
    client-jar file containing the stub. Now, if in aFor web components running in the same application context, the client-jar is not required - the server-jar also contains the necessary stubs. However, for application clients, the client-jar is required...
    distributed environment, my client is in a different
    machine and need to access the J2EE server across
    network, what would be the scenereo.The client-jar must be distributed with your application, or accessible from a shared network resource, either way...
    Is it so, for every EJB the client need to call, it
    must have got the client-jar file in it's local
    classpath? this seems to be not at all feasible.Yes, the client-jar must be included in the client's classpath... Why isn't it feasible? The client-jar(s) can easily be distributed with your application. The necessity to include them in the application's CLASSPATH does not necessitate their inclusion into the client-machine's CLASSPATH. Simply include the jar(s) as part of the JVM's -cp option.
    Is it so, the client loads the Stub acroos the network
    while obtaining the remote reference?A copy of the remote interface's stub file is included for casting purposes. However, a copy of the stub containing the correct communication parameters (such as TCP/IP port number, reference ID, etc. per vendor implementation...), for the remote reference does get downloaded.
    Please inform me, what actually happens when a client
    invokes a EJB call deployed in any application server,
    across the network !!!The exact details are vendor specific and depends on the actual protocol in use by the stub-layer. However, the general behaviour is in-line with RMI(-IIOP) communication.
    Regards,
    Kaustuv BhattacharyaRegards,
    Tony "Vee Schade" Cook

  • About accessing Client Webcam From Applet

    Hello friends
    I have Written an applet that will be downloaded on client side and access client webcam and show the Images coming of the Client webcam on the Client side only .but when i test that programm on LAn it works fine
    But when i upload it on my compnies server and try to run it through Internet It is not working
    Any Help about this topic please mail me at
    [email protected]
    thanks & regards
    Harit Bhatt

    Hi ,
    Pls let us know what is the error or message that u get in ur applet console.
    I thing it might be due to the proxy server security restrictions thru with ur trying to access the net.
    Regards
    Jeyanth

  • Access native methods from an applet

    hi all
    I am developping a applet which has to access the native method which is c++ code. but it does not work at all, even though it can be compiled well.
    it returns
    java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.MemoInfo)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkLink(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at InfoShow.<clinit>(InfoShow.java:24)
         ... 11 more
    who can give me some suggestions on accessing native method from applet! thx
    regards
    beginner

    you don't have access to native code from an applet unless you've modified your policy file or you're using a signed applet.

  • How read a file from applet?

    Hello.
    I have an applet which is in a signed jar file. And a configuration xml file. All I want to do is to put it near the jar file and access to it from applet. But applet cannot find it. I just want to read it simply. Also I don�t want to put it in a specified location on the server and want to have it near the jar file.
    Thanks very much.

    Check the API doc for Applet (that's java.applet.Applet). You call myApplet.getDocumentBase() to get the base URL (directory). I believe the base URL returned is actually the base URL of the HTML doc which your applet is embedded in. Add your xml filename to the end of the path. Then look at the API doc for java.net.URLConnection. You can call myURLConnection.getInputStream() to get an input stream of your xml.
    Nick

  • Tunneling vs. Web Service to access EJB's through firewall

    I need to be able to access EJB's from a client application when the server is
    behind a firewall. Seems like I have two options:
    1) Use WebLogic's built-in http-tunneling support.
    2) Use WebLogic to generate a web service for each bean and then modify the client
    application to use the generated SOAP stubs instead of having direct EJB references.
    Now I know either option will result in slower performance as compared to direct
    EJB references, but I'm not sure which is worse. Has BEA done any comparison
    of the two approaches to know which one is expected to perform better than the
    other? Any guidence someone can provide is greatly appreciated.
    thanks,
    Dan

    Rob Woollen <[email protected]> wrote:
    It depends :>
    If performance is your primary concern that it would be best to
    benchmark both. I suspect the performance difference will greatly
    depend on what types you are marshalling.Yep, I was curious about the same thing and tried some benchmarking - depending
    on what was marshalled, or course, SOAP performance hit vs binary protocol was
    not as bad as i expected it to be.
    However, a web service client would offer some nice advantages. Your
    client application would be a lot more flexible.But there will be some functionality loss over RMI.
    -- Rob
    Dan Branley wrote:
    I need to be able to access EJB's from a client application when the server is
    behind a firewall. Seems like I have two options:
    1) Use WebLogic's built-in http-tunneling support.
    2) Use WebLogic to generate a web service for each bean and then modify the client
    application to use the generated SOAP stubs instead of having direct EJB references.
    Now I know either option will result in slower performance as compared to direct
    EJB references, but I'm not sure which is worse. Has BEA done any comparison
    of the two approaches to know which one is expected to perform better than the
    other? Any guidence someone can provide is greatly appreciated.
    thanks,
    Dan
    Dimitri

  • AM and accessing EJB's directly

    We are protecting our web applications using AM. There are also several batch jobs running that use direct ejb access. We want to authenticate/authorize access to these ejb's as well. Has anyone tried this? Is there a way to do this without coding a new JAAS login module?
    Message was edited by:
    Stalis
    Message was edited by:
    Stalis

    Please reference a later posting on this very same question.
    -- Lou Caraballo
    Sr. Systems Engineer
    BEA Systems Inc., Denver Telco Group
    719-332-0818 (cell)
    720-528-6073 (denver)
    Aleksey Bukavnev <[email protected]> wrote in message
    news:[email protected]..
    Thank you!
    Aleksey.
    Bill Lloyd wrote:
    There is a java to IDL mapping, which is quite complex. To use it, you
    must
    have an ORB which supports, at minimum, CORBA 2.3. ORBs I know of which
    support this include Orbix 2000 for Java, Visibroker 4.0 for Java, and
    Orbacus 4.0 for Java.
    Also, check out the June 2000 "Java Report" which has an article onthis.
    >>
    To be perfectly honest, though, the best solution is to write a bridge,in
    Java. One side is IDL, which CORBA clients use. The implementation ofthat
    IDL makes RMI requests to get the necessary info. This solution willwork,
    guaranteed. The portion of the spec for the java to IDL mapping isstill
    quite new, and I would expect some, uh, "unexpected features" at thistime.
    >>
    -B
    "Aleksey Bukavnev" <[email protected]> wrote in message
    news:[email protected]..
    Hi!
    Can someone answer one badly important question?
    Is it possible to access EJB's from CORBA clients directly, as if the
    beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
    CORBA/Java server application as a liason between CORBA client and EJB
    server!
    I'm using WebLogic Enterprise 5.0.1.
    Thanks in advance.
    Aleksey.

  • How to access EJB deployed in JBOSS 4 from Creator

    Hello.
    I am trying to access EJBs deployed on JBOSS in order to develop a web app client, when I import the EJB set from Creator (sessions and entities packages in a jar file) I got the following error message....."No EJB set found in file....." .
    I presume there is an kind of xml file description specific for Sun App Server missing. I would like to know if there is other way to expose EJB in creator?....maybe write a config file by hand.
    I already read the tutorials related to EJB but those only use pre build EJB jars for Sun App Sserver.
    Also I read all the posted about JBoos and EJB in this forum but those are pretty general.
    By the way I have Delegate classes to access the EJB. How do I register my delegates in Creator in order to expose their methods?
    I�ll really appreciate some light in this matter.
    Thanks in advance!!!

    Hi,
    The below forum thread may help you :
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=51321
    Thanks,
    Runa.

  • Access EJB from Servlet that in different archive?

    <font class="mediumtxt">package kyro.ejb.session;
    import javax.ejb.*;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name="StandAlone")
    @Remote(StandAlone.class)
    public class StandAloneBean
    implements StandAlone, StandAloneLocal
    public StandAloneBean() {
    public String sayHello() {     
    return "sayHello";
    I want to access ejb from servlet that .war and .jar not in single .ear. I want to try that just with annotation not xml descriptor cause is easy to understand for me. I use Glassfish. But i can't lookup that ejb. How can i lookup that ejb with jndi? Can't you give me example of servlet to access that? I not use JNDI.properties, are that caused i can't access my ejb? I just thing .war and.jar in one server, are i have to used JNDI.properties. can you explain how to use JNDI.properties in servlet or separate file?
    </font>

    But i can't lookup that ejb. How are you trying and what exception is occurring?
    How can i lookup that ejb with jndi? [https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html|https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html]
    m

  • Help needed to access Oracle from Applet.

    Please help. I have spent days reading info on the web and I simply cannot access to Oracle from an applet to work. Oracle is on a different IP than the Web Server. For my testing I am running the html directly from my local file system.
    Here are the steps I have taken:
    1. Create a key: "%JAVA_HOME%/bin/keytool" -genkey -alias MyAlias -keypass MyKPass -keystore C:\Keys.bin -storepass MySPass
    2. Sign my jar: "%JAVA_HOME%/bin/jarsigner" -keystore C:\Keys.bin -storepass MySPass -keypass MyKPass -signedjar myjar-signed.jar myjar.jar MyAlias
    3. Sign Oracle's Jar: "%JAVA_HOME%/bin/jarsigner" -keystore C:\Keys.bin -storepass MySPass -keypass MyKPass -signedjar ojdbc14-signed.jar ojdbc14.jar MyAlias
    4. Applet Tag (at this time I have the two jars in the same folder as the HTML and JS files):
        <applet id="MyApp"
      codebase=""
      archive="myjar-signed.jar,ojdbc14-signed.jar"
      code="com/company/applets/Test.class"
      mayscript
      width="50" height="50">
        </applet>5. Javascript:
      document.observe("dom:loaded", function() {
      alert("Applet: " + $('MyApp').getVersion());
      $('MyApp').getConnection(url, user, pswd);
      alert("Applet: " + $('MyApp').getVersion() + "Got Connection.");
      $('MyApp').testConnection();
      alert("Applet: " + $('MyApp').getVersion() + "Connection Tested.");
    });Execution:
    1. The applet loads, The browser asks if I want to trust it, I say yes.
    2. The '$('MyApp').getVersion()' works.
    3. The '$('MyApp').getConnection(url, user, pswd);' fails. Java Code:
      public void getConnection(String url, String user, String pswd)
          throws Exception {
        try {
          System.out.println("Driver...");
          DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
          System.out.println("Connection...");
          _conn = DriverManager.getConnection(url, user, pswd);
          ...The driver registers, but the getConnection fails with a security error.
    After much reading, I used policytool to update the policy file. It added:
    keystore "file:/C:/Keys.bin", "jks";
    grant signedBy "MyAlias" {
      permission java.security.AllPermission;
    };This did not make any difference. Both IE and FF get the same error.
    The JRE being used is 1.6.0_14.
    Any help solving this would be MUCH appreciated.
    Thanks.

    I have simplified the problem, and now it has nothing to do with Oracle. It is a certificate/signing problem.
    Here are the steps I took to set the test up:
    Certificate:
    "%JAVA_HOME%/bin/keytool" -genkey -storepass MyStorePswd -keyalg RSA -alias MyRsa -dname "CN=Company.com, OU=IT, O=Company Inc, L=Atlanta, ST=Georgia, C=US, DC=mailexpress, DC=com" -validity 999
    "%JAVA_HOME%/bin/keytool" -selfcert -storepass MyStorePswd -alias MyRsa -validity 999
    "%JAVA_HOME%/bin/keytool" -exportcert -storepass MyStorePswd -alias MyRsa -rfc -file MyRsa.cer
    "%JAVA_HOME%/bin/keytool" -importcert -keystore "C:\Program Files\Java\jre6\lib\security\cacerts." -storepass changeit -alias MyRsa -file MyRsa.cer
    Jar Signing:
    "%JAVA_HOME%/bin/jarsigner" -storepass MyStorePswd -keypass MyStorePswd -signedjar Text-Project-signed.jar Text-Project.jar MyRsa
    "%JAVA_HOME%/bin/jarsigner" -verify Text-Project-signed.jar
    Result: jar verified.
    HTML:
        <applet id="MyApp"
                codebase="file:/c:/projects/Text-Project/js/Memory"
                archive="Text-Project.jar"           <== unsigned test  OR
                archive="Text-Project-signed.jar"    <== signed   test
                code="com/company/applets/MemTest.class"
                mayscript
                width="50" height="50">
        </applet>
    JavaScript:
    document.observe("dom:loaded", function() {
      alert("Applet: " + $('MyApp').checkSecurity());
    Function in the Applet:
      public String checkSecurity() {
        System.out.println("Security Check...");
        try {
          AccessController.checkPermission(new FilePermission("MemTest.js", "read"));
          AccessController.checkPermission(new FilePermission("MemTest.js", "write"));
          AccessController.checkPermission(new java.net.SocketPermission("192.168.1.121", "resolve"));
        } catch (Exception e) {
          e.printStackTrace();
          return e.getMessage();
        return "Security Checked OK";
      }Results (Internet Explorer):
    1. Unsigned JAR, No policy:
    Result = java.security.AccessControlException: access denied (java.io.FilePermission MemTest.js read)
    (as expected)
    2. Unsigned JAR, Policy = permission java.security.AllPermission:
    Result = Security Checked OK
    (as expected)
    3. Signed JAR, No Policy: Popup states: signature verified; do you want to run the application.
    Result = java.security.AccessControlException: access denied (java.io.FilePermission MemTest.js read)
    (not expected)
    Something is wrong with the certificate or signing process. Any ideas ?
    Thanks.
    Edited by: javadude.101 on Jul 29, 2009 12:29 PM

  • Issue in accessing EJB from plain java

    Hi,
    I am new to OAS. I am using OAS 10.1.2.
    I want to access EJB which runs inside OAS, through a plain java program which runs from outside the OAS environment (standalone java program).
    I am confused on what to use. RMIInitialContextFactory or ApplicationClientInitialContextFactory for the context in the java program.
    what should be the provide URL ?
    java.naming.provider.url","ormi://hostname:18140/
    is it "ormi" or something else? what is the port number should i use. there are many ports in this OAS. i see that in the console("Ports") link.
    also let me know what should i mention in the EJB xml descriptor.
    Is this lookup to be done by retrieving from jndi?
    pls help.
    Thanks,
    Sukumar
    with this confusion i developed an EJB with the following details
    ejb-jar.xml
    <ejb-ref>
         <ejb-ref-name>ejb/testDetails</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.xxx.xxx.testDetailsHome</home>
    <remote>com.xxx.xxx.testDetails</remote>
         </ejb-ref>
    orion-ejb-jar.xml
    <entity-deployment name="ejb/testDetails" location="ejb/testDetails"
    Client Java program
    public class testDetailsClient
    public static void main(String [] args)
    testDetailsClient testDetailsClient = new testDetailsClient();
    try
    Context context =getInitialContext();
    testDetailsHome testDetailsHome = (testDetailsHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/testDetails"), testDetailsHome.class);
    testDetails testDetails;
    catch(Throwable ex)
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    //env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url","ormi://host_name:18140/"); //23791 18140
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "abc123");
    InitialContext context = new InitialContext(env);
    return context;
    if i execute this, it says
    javax.naming.NameNotFoundException: java:comp/env/ejb/testDetails not found
    18140 is Application Server Control RMI port.
    if i run the same code with ApplicationClientInitialContextFactory, it throws exception saying
    java.lang.InstantiationException: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.administration.ApplicationResourceFinder.getEJBHome(ApplicationResourceFinder.java:268)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:161)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.testdetails.testDetailsClient.getInitialContext(testDetailsClient.java:89)
         at com.testdetails.testDetailsClient.main(testDetailsClient.java:20)
    pls help

    Hi,
    you do not have to package your EJB and PAR together! You can deploy them separately and then reference the J2EE Application from your PAR or vice versa to access it.
    For instance you can access the EJB from your PAR as described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    Or you can access a Portal application from J2EE like described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Even if you package your PAR in to the same EAR with your EJB they will result in two different containers on the J2EE Engine and you will have to reference them as described in the link above to access the functionality of one component from the other.
    Best regards,
    Stefan Brauneis

  • How to access ejb jar in ear package from other war web package?

    How to access ejb in jar packed in ear package from other war web package?

    Typically you would just look the EJB Home up in JNDI. If you're
    looking for example code, the medrec example in WLS 8.1 or petstore has
    plenty of webapps calling EJBs.
    -- Rob
    CottonXu wrote:
    How to access ejb in jar packed in ear package from other war web package?

  • WHY can't I access my database from an applet???????????

    The security code won't let my applet access its own database (from its own server)..
    I'm using getDocumentBase()
    to try and tell it that it is my own damn file..
    I keep getting :
    java.securityAccessControlException: access denied <java.util.PropertyPermission jdbc.drivers write>
    ...etc.
    This applet crap is really starting to piss me off. I can see why they came out with JSP.
    All I need to do is access my database, update it, etc. It kind of defeats the purpose of being able to do jdbc from applets if you can't even access the database on your own damn server.
    If you all don't have a clue, I'm freakin switching to PHP--I'm tired of this crap-I was thinking Java was a damn good language until I hit applets.

    The simple answer to your question is: Because of security concerns.
    The somewhat longer answer is that directly accessing a database from an applet is generally not a good idea. A lot of security-critical code like DB username/password must be hidden in the applet which potentially can be downloaded (and disassembled) by anyone that hits your webpage. Maybe you do an intranet solution with trusted users but that is not what applets were originally designed for.
    The clean way is to make your applet talk to a servlet that talks to your database.
    If that is not the way you want to do it, make sure that all client policy files (yes, on the browser machine) contain the permissions that your applet needs.

Maybe you are looking for