Simple updates in EJB 3.0

Hello,
Is there an easy way to update an entity bean that wasn't fetched via a find by PK query, i.e. it's just marshalled from a remote payload in EJB 3.0? merge() does not seem to work with out you using the marshalled PK to fetch it and then manually setting each field. I'm looking for some thing like a toplink mergeClone or the like. Any input would be appreciated. Take care.

merge does not seem to work in my development environment. The updates are not persisted. According to the documentation I have found online (Jdeveloper), merge will only work for rows that are fetched via a PK query, thus:
MyCMPClass instance = receiveInstanceFromClient();
EntityManager manager = getEntityManager();
manager.merge(instance);will not work and would have to be replaced with,
MyCMPClass instance = receiveInstanceFromClient();
MyCMPClass dbRow = receiveInstanceFromDB();
dbRow.setField(instance.getField());
dbRow.setAllThisUselessMethodCalls(instance.getAllThisUselessMethodCalls());
EntityManager manager = getEntityManager();
manager.merge(dbRow);Are you saying the documentation I've received (along with my experience) in JDeveloper isn't compliant with EJB 3.0? Do I need to set some config/mapping file in order to achieve that performance in merge() (i.e. how do I get it work with rows NOT fetched via PK queries)? This feature is EXTREMELY frustrating so I'd love to hear some additional input.

Similar Messages

  • My mac book pro does not boot up correctly anymore after doing some updates. I did have my ipod charging to my mac book. I ran the simple updates and never go to the maverick update and now my computer will not boot correctly. Help!

    Please help my computer is not repsonding after doing some simple updates. I follow the instructions and which is simply click for the update to take place. I did what I was instructed to do. I did not do the new update for the Mavericks yet. I just did simple updates. The computer shutted down and restarted but would never get pass the grey screen with the spinning wheel and the booting bar that would not go past a certain point befor shutting off again. The computer is practically brand new. I purchased the computer from best by 2012 and the warrenty just ended the past October. I hardly use the computer maybe 4 times since I have had it because I have another main computer that I uses. However, I don't want to do a hard rest becuase I do have the entire adobe suits software that I paid for and don't want to loose. I have an appointment with apple today to see what they say but I hope that my computer that I hardly every use is not defected after doing a updated pushed by Apple. Any thoughts or suggestions???? Thanks in advance Apple Family :-)

    Well, I was at Apple for sometime on that day. I got a Genius that did not want to work. She basically jumped to the money to tell me that my hard drive was no good and that I was out of warranty (October 2013). I began to explain to her that I had only used the computer 5 times and that I don't use this computer as my main computer because I also have a Toshiba that is less expensive that I have had for several years and not one issue out of it. The rep told me that I could by a new hard drive for $161.00 and that I would loose all of my software and photos that I have on this computer. However, I told her that it's bazaar that it happens right after my warranty goes out and had I used it more often when in warranty before October then I would have been covered. Keeping in mind that I would still be very disappointed with the product because I would loose all of my information and it would not make sense to me why the hard drive fails on a very gently used computer. So I asked for a manager and it took her some time to get one. In the mean time I watched how the other Geniuses interacted with the other customers and seen that they were very engaging with convo and very help. I guess I just I got another lemon when I got my rep. When the manager finally came. I went from A-Z with the issues and that I felt that something could or should be done because the rep said that she did tests on my machine and it read to her that my hard drive was bad and there was nothing that could be done. I explained that I was not looking forward to paying for services to have my new computer repaired. The manager offered to give me 25% off the cost but I still didn't feel that it was effective. After he left and the rep wrote the notes in the system, I told her that I didn't think that all options had been exhausted and that there was something else that could be done. I told her to erase the machine and see if the updates could be installed and if the system would continue to do the same thing. The rep was hesitant and said that I would loose everything which we already know that we were at conclusion from the beginning. She assured me that I would happen again and that I would need a new hard drive. I just told her to erase the machine and get me another manager because I was just getting tired of her unhelpfulness and negative perspective. The new manager came and was very pleasant and I explained everything once again from A-Z. I informed him that I had the machine erased and that I need his help with options because I don't feel that the rep or the last manager was resourceful or helpful. He apologies for the actions of the reps and proceed to tell me that they will run all the updates in the store and that if it booted correctly that I should continue to use the machine with out adding the adobe software back on just incase that it crashes again and I'm out of money once again. However, if it does happen again and it is a hard drive issues that he would work with me to resolve the issues. As my computer went through the process of rebooting from out of the box stage another rep approached me because he could tell that I was upset and not happy. I told he what had happen and he said I think I can help you a little more. He said that I just want to run further testing on you computer for different components to make sure that everything would work properly and pin point any issues. I was delighted with that option. Anything would help at this time especially someone who is willing to help. The first test that he ran was to for the hard drive and he said that since it failed the test the first time could be because the software update glitch and did update correctly which would make the test faulty and be negative. As I sit with finger crossed the test came back as a pass test that my hard drive was not the issue and that the update was the cause and that I did not have to buy a new hard drive. I was happy that the computer was ok but I lost information. All of the updates were done in the store and everything works fine now. If I was not persistent about my gut feeling then I would had left out thinking that I had to pay for a new hard drive that I really didn't needed. Now I can invest that money in a external hard drive to start backing up my information. Lesson learned by I'm still on the fence about things but I hope all is well. I really went through a lot. No help or no service was not an option that I was taken.  I hope that it helps.

  • Dynamic update of EJB/Web deployment descriptors

    In 8.1SP3, is there any provision to allow for dynamic update of EJB/Web deployment descriptors? I'm specifically looking at env var changes.
    I noticed that there are some mentions of the ability to dynamically update deployment descriptors, but it appears that the general facility has been deprecated, and they've incorporated all of the WebLogic-specific descriptor information directly into the console.
    When I dig through the JMX namespace and some of the MBean classes, I also see mentions of "deployment descriptor editors", but it's not clear how to utilize that.
    I'm aware of the fact that my application would have to be aware of possible dynamic updates to the descriptors, so I'd have to be able to implement some sort of listener for that.

    I have the same question but for a different purpose. I am part of a hosting group and we have app teams that have defined init-params in the web.xml that have to be changed as the app is promoted up through test environments and ultimately to production - only we need to be able to do this WITHOUT "cracking open" the archive.
    I was hoping to be able to script something to do the update after deployment.
    So any help at all would be appreciated. In the meantime will continue to poke around in the WLST and MBean docs.
    Thanks,
    Ed

  • Can not execute a simple update query with ms access

    Hi
    I am trying to execute a simple update query , this is the code I am running : I get no exeptions but the db is not being updated .
    When I copy my query into access it works !
    The table / columns are spelled correctly and I am able to execute select queries.
    can anyone figure out what is going on
    Thanks shahar
    public static void main(String[] args) {
    MainManager mainManager = MainManager.getInstance();
    Log log = Log.getInstance();
    try {
    log.writeDebugMessage("befor executing query");
    //stmt.executeUpdate("update trainee set Trainee_Name = 'shahar&Rafi' where Trainee_Id = 1 ");
    //stmt = null ;
    PreparedStatement stmt1 = con.prepareStatement("UPDATE Trainee SET Trainee_Name =? WHERE Trainee_Id =?");
    String name = new String("Shahar&Rafi");
    int Id = 1 ;
    stmt1.setString(1,name);
    stmt1.setInt(2,Id);
    System.out.println(stmt1.toString());
    stmt1.execute();
    log.writeDebugMessage("After executing query");
    catch (SQLException e ){
    System.err.println("SQLException: " + e.getMessage());
    }

    Hi All,
    got the problem solved at last.
    first, in the SQL string all the values must be within " ' "
    for example:
    INSERT INTO Trainee(Trainee_Id , Trainee_password , Trainee_Address, Trainee_Name , Trainee_Phone , Trainee_Gender , Trainee_SessionTime , Trainee_Purpose , Trainee_HealthStatus , Trainee_StartDate , Trainee_Birthday) VALUES (6,'333','hhhh','rafi',048231821,true,63,4,true, ('Feb 22, 2002'), ('Feb 22, 2002'))
    second and more important,
    a 'dummy' sql select query must be performed after an update query
    example for code:
    try{
    DB.MainManager.getInstance().ExecuteUpdateQuery(A);
    DB.MainManager.getInstance().getStatement().executeQuery("SELECT * FROM Trainee");
    where A is the update query.

  • Webdynpro ABAP ALV tutorial - simple update or use changelog ?

    I was working through the alv tutorials for webdynpro abap, and while trying to complete the
    "Editing ALV in Web Dynpro for ABAP", I got to page 8 of the pdf document where it explains how to do the ONDATACHECK event handler, and it comments out the portion for updating/saving the data (as noted below), and does not explain anything further about the save.
    * save data to database
    {* update... => only simlate, to not change the flight data model
    * content!
    Now, I am new to webdynpro abap, and don't know if I am supposed to utlize the changelog for this, or if a simple update will work.
    Any Ideas ?

    Thank you for your answer - I am guessing from your response that a method would need to be built - similar to one which I found in the SWDP_DEMO_TUTORIALS for a webdynpro called WDT_TABLE (see below) - where a check of the table changes would need to be made before an update to the table - rather than a simple one line update statement placed at that point in the code.
    METHOD save_changes.
      DATA: table_node           TYPE REF TO if_wd_context_node,
            read_sbook           TYPE
    if_componentcontroller=>elements_sbook_node,
            aux_read_sbook       TYPE
    if_componentcontroller=>elements_sbook_node,
            wa_read_sbook        TYPE LINE OF
    if_componentcontroller=>elements_sbook_node,
            context              TYPE REF TO if_wd_context,
            change_line          TYPE LINE OF wdr_context_change_list,
            changes              TYPE wdr_context_change_list,
            aux_changes          TYPE wdr_context_change,
            lv_change_tab_size   TYPE sy-tfill,
            aux_string           TYPE string,
            lv_node_size         TYPE sy-tfill,
            aux_div              TYPE int4,
            aux_index            TYPE i,
            l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager,
            text                 TYPE string,
            it_int TYPE STANDARD TABLE OF i WITH KEY table_line.
    * check whether context has changed
      context = wd_context->get_context( ).
      changes = context->get_context_change_log( ).
      LOOP AT changes INTO aux_changes.
        IF aux_changes-change_kind = 'A' AND aux_changes-node_name = 'SBOOK_NODE'.
          INSERT aux_changes INTO TABLE wd_this->sbook_delta.
        ENDIF.
      ENDLOOP.
    * get the complete context in 'read_sbook' table
      table_node = wd_context->get_child_node( name = 'MY_BOOKING_NODE' ).
      table_node = table_node->get_child_node( name = 'SBOOK_NODE' ).
      table_node->get_static_attributes_table( IMPORTING table = read_sbook
    * get the size of table and changes
      DESCRIBE TABLE read_sbook LINES lv_node_size.
      LOOP AT wd_this->sbook_delta INTO change_line.
        APPEND change_line-element_index TO it_int.
      ENDLOOP.
      SORT it_int.
      DELETE ADJACENT DUPLICATES FROM it_int.
      DESCRIBE TABLE it_int LINES lv_change_tab_size.
    * get message manager
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
    * decide which way to update databse
      IF lv_change_tab_size <> 0.
        aux_div = lv_node_size / lv_change_tab_size.
        IF aux_div <= 3.
    * write complete table to database
          lv_change_tab_size = lv_node_size.
          CL_WDT_FLIGHT_MODEL=>write_sbook_complete( read_sbook ).
        ELSE.
    * write only the changed records to database
          LOOP AT it_int INTO aux_index.
            READ TABLE read_sbook INDEX aux_index INTO wa_read_sbook.
            APPEND wa_read_sbook TO aux_read_sbook.
          ENDLOOP.
          CL_WDT_FLIGHT_MODEL=>write_sbook_records_changed( aux_read_sbook )
        ENDIF.
        REFRESH wd_this->sbook_delta.
        REFRESH it_int.
        wd_this->sbook_changed = abap_false.
    * report message
        aux_string = lv_change_tab_size .
        IF lv_change_tab_size = 1.
          CONCATENATE aux_string 'record written to database' INTO text.
        ELSE.
          CONCATENATE aux_string 'records written to database' INTO text.
        ENDIF.
        CALL METHOD l_message_manager->report_success
          EXPORTING
            message_text = text.
      ELSE.
    *  report message
        CALL METHOD l_message_manager->report_success
          EXPORTING
            message_text = 'there are no changes to be written to database'.
      ENDIF.
    ENDMETHOD.

  • How update with EJB

    Hi all,
    is it possible to update with EJB CMP?? If yes... how?
    Thanks,
    Vito

    Hi Vito,
    Why not, we can do that. Please refer some of the awesome links as i am listing below,
    Concepts of CMP:
    http://www.caucho.com/resin-3.0/cmp/tutorial/index.xtp
    http://java.sun.com/products/jdo/JDOCMPFAQ.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d5db590-0201-0010-dd93-9ec216811b9e
    Some examples and source code :
    http://java.sun.com/j2ee/sdk_1.3/1.3_01/techdocs/release/CMP-RI.html
    http://java.sun.com/developer/technicalArticles/ebeans/EJB20CMP/index.html
    I hope these will be good enough clear your doubts, if feel necessary reply back.
    Regards,
    Guru.

  • How to execute simple update?

    I try to execute simple update from html form, for example: update &lt;table_name&gt; set comments = 'kuku' where id = :P4_ID; . I got my message OK , but nothing update. When I replace :P4_ID with 219 (some number ID) ,I will get update in the database. How to execute update , but use column value instead of the number.
    Thanks for help.

    "39195"
    Sounds like P4_ID does not have a value at the time when the update statement is run. So, the statement executed is:
    update <table_name> set comments = 'kuku' where id = NULL
    Can you verify this?
    Sergio

  • Updating an EJB jar file on WL7.0

    Hi
    Iam attempting to update an EBJ jar file without taking down my WL7.0 server.
    When I copy the jar file to the applications directory, I see the server accepting
    the update but when I run my client the update is not visible! Iseem to be still
    accessing the old ejb.
    From my understanding, if the server is running in development mode I should be
    able to copy the jar file with my update directly to the applications directory(
    overwriting old jar file) and be able to access the udated ejb.

    Hello Ron,
    An alternative would be to modify a REDEPLOY file if your application is deployed
    in exploded directory format. However, updating the EJB JAR should also do the
    trick. Try going into the Admin console and explicity redeploying the EJB JAR
    file after copying over the new JAR file. Let us know if any errors appear.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Ron Turner" <[email protected]> wrote:
    >
    Hi
    Iam attempting to update an EBJ jar file without taking down my WL7.0
    server.
    When I copy the jar file to the applications directory, I see the server
    accepting
    the update but when I run my client the update is not visible! Iseem
    to be still
    accessing the old ejb.
    From my understanding, if the server is running in development mode I
    should be
    able to copy the jar file with my update directly to the applications
    directory(
    overwriting old jar file) and be able to access the udated ejb.

  • Should I use dynamic SQL for simple updates?

    Please tell me, out of the two options given below, which option should i use to update columns in a table and why?
    what will be the performance difference between the two approaches?
    Please note: The options given below is just for an example
    procedure proc1(var1 varchar2)
    is
    begin
    update tab1 set col1 = var1;
    commit;
    end;
    procedure proc1(var1 varchar2)
    is
    sqlstr varchar2(1000);
    begin
    sqlstr := 'update tab1 set col1 = :v1';
    execute immediate sqlstr using var1;
    commit;
    end;
    Thanks
    Arun

    Arun G Nath wrote:.
    Should I use dynamic SQL for simple updates? No way, not a chance.
    Performance is not the issue (as long as you are using bind variables).
    But with dynamic SQL, you loose compile time checking; you do not know until runtime if the SQL is valid.
    You also loose the dependency between proc1 and tab1, which can be found only if you search user_source.
    (And in either case, you probably want to remove the commit)
    Regards
    Peter

  • Mapping for simple Update

    Hi ,
    I have the following qurey and i want to design a simple mapping of it.. I dont want the code to generate MERGE statement. I want to do it by generateing a simple Update statement.
    Update
    select
    a.customer_id tgt_customer_id,
    a.customer_name tgt_customer_name ,
    a.customer_address1 tgt_customer_address1 ,
    a.customer_address2 tgt_customer_address2 ,
    a.customer_address3 tgt_customer_address3 ,
    b.customer_id src_customer_id,
    b.customer_name src_customer_name ,
    b.customer_address1 src_customer_address1 ,
    b.customer_address2 src_customer_address2 ,
    b.customer_address3 tgt_customer_address3
    from customer_table1 a , customer_table2 b
    where a.customer_id = b.customer_id
    ) set tgt_customer_name = src_customer_name,
    tgt_customer_address1 = src_customer_address1 ,
    tgt_customer_address2 = src_customer_address2 ,
    tgt_customer_address3 = tgt_customer_address3
    Thanks,
    R-

    Hi,
    If you have set the lang as plsql, I dont think its possible to have a code with just update statement. In your case, I don't think merge statement will have any problem. Infact it will give you better performance.
    Hardeep

  • Need a simple  UPDATE statement for updating areas of the polygons

    Hi,
    I need a simple UPDATE SQL statement for updating areas of the polygons in a table shema.table (geom) with sdo_area function.
    Dejan

    Dejan,
    Maybe I don't understand your question but I will offer this:
    update SOME_TABLE t set t.areasqft = SDO_GEOM.SDO_AREA(GEOM, 0.005) where t.geom.GET_GTYPE() = 3
    This assumes a "feet" based SRID.
    r,
    dennis
    Edited by: user633187 on Dec 1, 2008 9:04 AM

  • Deadlocks with simple UPDATE statement

    I have in a C# program a dictionary and in SQL Server a stored procedure with a simple UPDATE statement. I process the dictionary in parallel. For each entry in my dictionary I call this stored procedure and I am getting deadlocks.
    This is the UPDATE statement:
    ALTER PROCEDURE [dbo].[UpdateImages]
    @ICRTCode nvarchar(max),
    @ICRTImage nvarchar(max)
    AS
    BEGIN
    UPDATE Images SET processed = '1', Image = @ICRTImage, ProcessDate = GETDATE() WHERE IDICRT = @ICRTCode
    END
    Can someone give me a hint as to why this would cause deadlocks? There are no other processes writing to this table. This is a table in a staging database.

    http://blogs.msdn.com/bartd/archive/2006/09/09/747119.aspx
    http://blogs.msdn.com/bartd/archive/2006/09/25/770928.aspx
    Try change the statement a little bit
    UPDATE Images SET processed = '1', Image = @ICRTImage, ProcessDate = GETDATE()
    FROM
    Images
    WITH (TABLOCK) WHERE IDICRT = @ICRTCode
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Help simple update query

    Hi all,
    I have a simple update query problem. I have four tables
    activist(activist_id,first_name,last_name,c_state),
    membership(activist_id,g_n_id),
    group_network(g_n_id,g_n_type_id),
    school_grop_det(g_n_id,state). For some records in activist table the c_state column is null, i want to update that column with state column of school_group_det table.
    Here is the query for the states which are null
    select distinct a.activist_id,a.first_name,a.last_name,
    a.c_state,sd.state from activist a,membership m,
    group_network g,school_group_det sd where
    a.activist_id=m.activist_id and g.g_n_id=m.g_n_id and
    g.g_n_id=sd.g_N_id and a.c_state is null and g.g_n_type_id='1001'
    order by a.activist_id
    I got the activist_id,first_name,last_name,c_state from activist and state from school_group_det. now i as i told you want to update the c_state with state column of school_group_Det table.
    Pleae any one help me
    Thanks
    Srinivas

    Hi all,
    I have a simple update query problem. I have four tables
    activist(activist_id,first_name,last_name,c_state),
    membership(activist_id,g_n_id),
    group_network(g_n_id,g_n_type_id),
    school_grop_det(g_n_id,state). For some records in activist table the c_state column is null, i want to update that column with state column of school_group_det table.
    Here is the query for the states which are null
    select distinct a.activist_id,a.first_name,a.last_name,
    a.c_state,sd.state from activist a,membership m,
    group_network g,school_group_det sd where
    a.activist_id=m.activist_id and g.g_n_id=m.g_n_id and
    g.g_n_id=sd.g_N_id and a.c_state is null and g.g_n_type_id='1001'
    order by a.activist_id
    I got the activist_id,first_name,last_name,c_state from activist and state from school_group_det. now i as i told you want to update the c_state with state column of school_group_Det table.
    Pleae any one help me
    Thanks
    Srinivas

  • How can I deploy a simple stateless ssion EJB and call it from a standalone client

    Hi,
    I'm creating s simple staless session EJB that has a method that takes a name and prints "Hello" + name. This EJB is in a package called "com.demos.mydemo.ejbs.hello"
    How can I deploy this to OC4J?
    How can I call it from a standalone client(no JSP, no servlets)?
    In Sun's J2EE is very easy to deploy and I don't have to know any XML stuff.
    can I use the .ear file created by the Sun's "deploytool" to deploy my EJB to OC4J?
    This is the code at I'm using and it works on Sun's j2sdkee1.2.1:
    ///////// Remote /////////
    package com.demos.mydemo.ejbs.hello;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface Hello extends EJBObject {
    public String sayHello(String name) throws RemoteException;
    ///////// Home //////////
    package com.demos.mydemo.ejbs.hello;
    import java.rmi.RemoteException;
    import javax.ejb.EJBHome;
    import javax.ejb.CreateException;
    public interface HelloHome extends EJBHome {
    public Hello create() throws CreateException, RemoteException;
    /////////// Bean class ///////////
    package com.demos.mydemo.ejbs.hello;
    import java.rmi.RemoteException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.ejb.CreateException;
    import javax.ejb.EJBException;
    import java.sql.Connection;
    import java.sql.SQLException;
    //import java.sql.PreparedStatement;
    import javax.sql.DataSource;
    import javax.naming.NamingException;
    import javax.naming.InitialContext;
    public class HelloEJB implements SessionBean {
    private SessionContext context;
    private Connection con;
    private String dbName =
    "java:comp/env/jdbc/Oracle";
    public HelloEJB() {}
    public void setSessionContext (SessionContext context) {
    this.context = context;
    public void ejbCreate() throws CreateException {
    try {
    makeConnection();
    catch (Exception e) {
    System.err.println("HelloEJB: exception in ejbCreate:" + e.getMessage());
    e.printStackTrace();
    throw new CreateException(e.getMessage());
    public void ejbActivate() {
    public void ejbPassivate() {
    public void ejbRemove() {
    try {
    con.close();
    catch (SQLException ex) {
    throw new EJBException("HelloEJB: exception in ejbRemove: " + ex.getMessage());
    public String sayHello(String name) {
    return "Hello " + name;;
    private void makeConnection() throws NamingException, SQLException {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup(dbName);
    con = ds.getConnection();
    catch (Exception e) {
    System.err.println("HelloEJB: exception in makeConnection:" + e.getMessage() );
    e.printStackTrace();
    //////////// EJB client that uses a stateless session bean
    package com.demos.mydemo.ejbs.hello;
    import java.io.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class HelloClient {
    public static void main(String[] args) {
    try {
    Context initial = new InitialContext();
    Object objref = initial.lookup("HelloSession");
    HelloHome home = (HelloHome)PortableRemoteObject.narrow(objref,HelloHome.class);
    Hello h = home.create();
    String msg = h.sayHello("John Doe");
    System.out.println(msg);
    //h.remove();
    } catch (Exception ex) {
    System.err.println("Caught an exception." );
    ex.printStackTrace();
    Thanks
    Nabil
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Nabil Khalil ([email protected]):
    I deployed and .ear file created by Sun's J2EE deployment tool on the OC4J. It looks that it was deployed fine -- did not get a deployment error.
    When I run the client I'm getting the following error: Caught an exception.
    javax.naming.CommunicationException: Can't find SerialContextProvider
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:60)
    at com.sun.enterprise.naming.SerialContext.<init>(SerialContext.java:79)
    at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:54)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:178)
    at com.equifax.fms.ejbs.hello.HelloClient.main(HelloClient.java:18)
    This makes me think that the client can't see the deployed EJB on the OC4J.
    How can I fix this problem?
    Thanks
    Nabil
    <HR></BLOCKQUOTE>
    Nabil -
    Your standalone client needs to obtain certain server-dependent properties. You can provide them in your code or grab them via a properties file.
    For Orion - you need essentially the following setup, filling in your own information...
    Define your standalone client class with "main" etc (this is orion specific - should work for 9i AS as well - perhaps there are some differences)
    public class SomeClass {
    try {
    Properties p = new Properties();
    p.setProperty("java.naming.factory.initial",
    "com.evermind.server.ApplicationClientInitialContextFactory");
    p.setProperty("java.naming.security.principal","server_admin_name");
    p.setProperty("java.naming.security.credentials","server_password");
    // THEN you can get your intitial context reference
    InitialContext initial = new InitialContext (p);...........
    Then go about your business.....
    A good book to get is called "Professional Java Server Programming J2EE Edition" - there happens to be a reasonable amount of Orion/OCJ4 centric information since one of the authors is Karl Avedal - one of the principals behind Orion. Go out to java.sun.com and look at some of the J2EE tutorials - unfortunately a lot of it is hidden behind the J2EE Deployer, but you will get a good sense of what goes into outside-the-container standalone clients.
    null

  • Difference between simple beans and EJB

    Anybody knows... the difference between the simple beans and EJB... Pls share with all. thanks a lot.

    The Verrrrrrrrry short scoop is that JavaBeans pretty much just adhere to a standard format, mostly getters and setters. EJBs work only within a specific framework - an EJB container, and have access to J2EE support. For a detailed look at EJBs, see my tutorial Getting Started with Enterprise JavaBeans Technology at the developerWorks Java zone:
    http://www-106.ibm.com/developerworks/edu/j-dw-java-gsejb-i.html
    Joe Sam
    Joe Sam Shirah - http://www.conceptgo.com
    conceptGO - Consulting/Development/Outsourcing
    Java Filter Forum: http://www.ibm.com/developerworks/java/
    Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
    Going International? http://www.jguru.com/faq/I18N
    Que Java400? http://www.jguru.com/faq/Java400

Maybe you are looking for

  • Value displayed in the cube but not in BEx query

    Hi gurus, I have the field for no. of orders  (ANZAU) in the datasource 2LIS_11_VAHDR. It is displaying all the values in the column as '1' in the RSA3 and also in the cube but when the same field is selected in the query there is no display of value

  • Sorting channels on Personalize Page

    Hello, I am trying to sort channels on a Personalize page alphabetically. This is the contentedit.jsp in JSPContentContainer. Later functionality is I'd like to be able to sort by another field. The channels are aquired and placed in a java.util.List

  • Passing array of Types to java class

    I am trying to pass a user defined type (that is an array) from PL/Sql to a javaclass. Here are the definitions that make-up the parameter to pass from PL/Sql to Java (uri_digest_array): CREATE OR REPLACE TYPE uri_digest as object (uri VARCHAR2(256),

  • Error Catching.

    I'm trying to pull in the local security policy on my servers and I'm running my script against all my servers.  For the most part all is fine but on some servers I get the following error message.  Can someone tell me what it means and is possible h

  • SSL Provider showing no sockets

    Hi Experts, I am facing the following issue: I am trying to setup SSL on a new system but when trying to apply the certificate to the 5xx01 port I am not seeing any sockets in the Visual Admin under SSL Provider --> Dispatcher 1234 --> Active / New S