Oracle sample: EJB Hotel --- is it runable?

oracle offers four EJB hotel example code, which one is runable?

All the EJB Hotel Samples are runnable. These show different ways of building the same system using EJBs.
a. OneEJBHotelSample shows how a single session bean can be used to build the system
b. ThreeEJBHotel shows shows how the same system can be built using session and entity beans
c. AQHotel shows how to use Advance Queing with EJBS for building the same system
Once again, all the samples are runnable. If you have any questions, please post it in the OTN Sample code discussion
forum.
Cheers !
--Rajesh
oracle offers four EJB hotel example code, which one is runable?

Similar Messages

  • EJB Hotel samples

    Hi,
    I would like assistance in getting the EJB hotel samples from OTN to work with JDeveloper 3.2 against an 8.1.7 database.
    The instructions seem to be for JDeveloper 3.1. I tried following them and got the travel schema loaded into the database but I am stuck at the part where you deploy stuff from JDeveloper. It appears that the menu items referred to in the instructions are not the same ones in JDeveloper 3.2. Also the HotelSystem.ejb file shows up with an icon that has a question mark on it. Has anybody tried to get these to work with JDeveloper 3.2 and oracle 8.1.7? I'm really interested in this example to work because it has both a GUI client and a servlet client sharing the same business logic code. Alternatively, if anyone knows of another example like this (GUI client and web client), I'd appreciate it if you sent me a pointer to it. Thanks in advance.

    OTN developers are updating the Hotel sample apps to run under the current product versions. Work is ongoing, and when they finish you will be able to download revised files from OTN (they have not announced a release date). You might get a more immediate answer by posting your question in the Sample Code forum. The developers monitor that forum, and may be able to help you right away.
    Regards,
    -rh
    null

  • EJB Hotel Sample Application - error running client

    Hi
    I am trying to run the GUI client interface in the EJB Hotel Enquiry and Reservation Application (using a single EJB). I have deployed the EJB jar file and had no errors but when I run the GUI client I get the following error whilst trying to read the list of hotels:
    Error while invoking EJB procedure :RemoteException :
    com.evermind.server.rmi.OrionRemoteException: Invocation error: java.lang.NoSuchMethodException; nested exception is:
    java.lang.NoSuchMethodException
    Could anyone please suggest where to start looking ?
    TIA
    Trevor

    Hi,
    I am able to run this sample successfully. Can you try bouncing OC4J and then run the client application again ? Let me ]
    know if that works.
    Cheers,
    --Rajesh                                                                                                                                                                                                                                                                                                                                                   

  • [b]EJB Hotel RA Client Error - HELP[/b]

    1. Travel schema installed fine
    2. Web Client can successfully be run and all the buttons
    work fine
    3. The only file I modified was in config properties.
    Provider_Url = ormi://localhost:8888/OneEJBHotel
    4. in oc4j directory: principals file:
    user id is "admin", and password was given as
    "admin"
    4. deployment from jdeveloper is fine as follows:
    ---- Deployment started. ---- Jan 24, 2003 6:24:08 PM
    Wrote EJB JAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel.jar
    Wrote WAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.war
    Wrote EAR file to C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.ear
    Invoking OC4J admin tool...
    C:\jdeveloper\jdk\jre\bin\javaw.exe -jar C:\jdeveloper\j2ee\home\admin.jar ormi://DLEE/ admin **** -deploy -file C:\oc4j\samples\ejb\OneEJBHotel\src\oracle\otnsamples\OneEJBHotel\OneEJBHotel-Web.ear -deploymentName OneEJBHotel
    Auto-unpacking C:\oc4j\j2ee\home\applications\OneEJBHotel-Web.ear... done.
    Auto-unpacking C:\oc4j\j2ee\home\applications\OneEJBHotel-Web\OneEJBHotel-Web.war... done.
    Copying default deployment descriptor from archive at C:\oc4j\j2ee\home\applications\OneEJBHotel-Web/META-INF/orion-application.xml to deployment directory C:\oc4j\j2ee\home\application-deployments\OneEJBHotel...
    Auto-deploying OneEJBHotel (New server version detected)...
    Exit status of OC4J admin tool (-deploy): 0
    C:\jdeveloper\jdk\jre\bin\javaw.exe -jar C:\jdeveloper\j2ee\home\admin.jar ormi://DLEE/ admin **** -bindWebApp OneEJBHotel OneEJBHotel-Web http-web-site /OneEJBHotel
    Exit status of OC4J admin tool (-bindWebApp): 0
    Use the following context root(s) to test your web application(s):
    http://DLEE:8888/OneEJBHotel
    Elapsed time for deployment: 14 seconds
    ---- Deployment finished. ---- Jan 24, 2003 6:24:22 PM
    5. System Configuation
    jdeveloper: 9.0.3.1035
    DB: oracle 92010
    oc4j: 9.0.3.0.0
    6. When run from jdeveloper client: run Client.jpr
    the following errors were generated:
    Process exited with exit code 0.
    C:\jdeveloper\jdk\bin\javaw.exe -ojvm -classpath C:\oc4j\samples\ejb\OneEJBHotel\src\classes;C:\oc4j\samples\ejb\OneEJBHotel\config;C:\oc4j\samples\ejb\OneEJBHotel;C:\oc4j\samples\ejb\OneEJBHotel\src\web;C:\jdeveloper\jdev\lib\jdev-rt.jar;C:\jdeveloper\j2ee\home\lib\activation.jar;C:\jdeveloper\j2ee\home\lib\ejb.jar;C:\jdeveloper\j2ee\home\lib\jaas.jar;C:\jdeveloper\j2ee\home\lib\jaxp.jar;C:\jdeveloper\j2ee\home\lib\jcert.jar;C:\jdeveloper\j2ee\home\lib\jdbc.jar;C:\jdeveloper\j2ee\home\lib\jms.jar;C:\jdeveloper\j2ee\home\lib\jndi.jar;C:\jdeveloper\j2ee\home\lib\jnet.jar;C:\jdeveloper\j2ee\home\lib\jsse.jar;C:\jdeveloper\j2ee\home\lib\jta.jar;C:\jdeveloper\j2ee\home\lib\mail.jar;C:\jdeveloper\j2ee\home\oc4j.jar oracle.otnsamples.OneEJBHotel.client.EJBHotelSample
    javax.naming.NamingException: Lookup error: java.io.IOException: Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791; nested exception is:
         java.io.IOException: Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:350
         void oracle.otnsamples.OneEJBHotel.client.EJBHotelSample.getHotelSystemBean()
              EJBHotelSample.java:132
         void oracle.otnsamples.OneEJBHotel.client.EJBHotelSample.main(java.lang.String[])
              EJBHotelSample.java:147
    Process exited with exit code 0.
    Thanks for help!
    David

    David,
    config.properties is used only by the client.jpr. Not by the Web.jpr
    config.properties file has been provided for looking up resources[EJB, Datasources] from JNDI tree of OC4J.
    Since servlet and other resources are in the same container[Single JVM] there is no need to specify the username, password, Provdier_URL at the time of lookup.
    Look at the init method of EJBHotelServlet.java :
    Context ctx = new InitialContext();
    // Acquire the home interface handle and call the create
    //method on it
    homeInterface = (HotelSystemHome)ctx.lookup("OneEJBHotel");
    Here servlet looks up EJB without any authentication information, as servlet and EJB are in the same container.
    Whereas Stand alone client is running outside the OC4J.
    So the stand alone client need to authentcate itself for looking up the resources from JNDI tree.
    Look at the getHotelSystemBean method of EJBHotelSample.java :
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, prop.getProperty("Initial_Context_Factory"));
    env.put(Context.SECURITY_PRINCIPAL, prop.getProperty("Principal"));
    env.put(Context.SECURITY_CREDENTIALS, prop.getProperty("Credential"));
    env.put(Context.PROVIDER_URL, prop.getProperty("Provider_Url") );
    // Associate the properties with the context
    Context ctx = new InitialContext(env);
    // Acquire the home interface handle and call the create
    //method on it
    homeInterface = (HotelSystemHome)ctx.lookup("OneEJBHotel");
    Here stand alone client looks up EJB by specifying the authentication information, as stand alone client and EJB are running in different JVM's.
    Hope this helps...
    Cheers
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • EJB Hotel Update for EJB1.1

    It would be real nice for OTN to post a complete update for the EJB Hotel Application updated for Oracle 8.1.7 and EJB 1.1 specs with XML deployment descriptors and all.
    Thanks

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MM:
    It would be real nice for OTN to post a complete update for the EJB Hotel Application updated for Oracle 8.1.7 and EJB 1.1 specs with XML deployment descriptors and all.
    Thanks<HR></BLOCKQUOTE>
    Thanks for the request. I'll pass it along. The team has several projects slated already, so no promises right now.
    Regards,
    -rh
    null

  • Error in Oracle Sample Custom Element Form FORM_LINK_URL

    Hi All,
    I've found the Oracle Sample Sites project very helpful in quickening the process of building new sites.
    http://blogs.oracle.com/ecmalerts/entry/site_studio_10gr4_sample_site
    However, the Element Definition ELDEF_CUSTOM_LINK (which calls the Custom Element Form FORM_LINK_URL) seems to have a problem with 11g which I've not yet worked out.
    When trying to use in Contribution Mode, the Custom Form locks the whole Contribution page and no elements are able to be accessed.
    There are no JavaScript errors and no resource loading errors (I've checked everything in Firebug).
    I suspect that possibly the API has changed since these were written... Has anyone a working version of this Custom Form, or can point me in the direction of a solution to resolve this as I am keen to look at and use the custom URL picker it enables.
    Thanks

    Hi Check these -
    1. Check these URL's are working
    http://pptaw0054.lotte-ppta.com:8889/forms/frmservlet
    http://pptaw0054.lotte-ppta.com:8889/forms/lservlet
    2.If Webutil installed? Then do proper configuration for "WebutilArchive"
    WebutilArchive=frmwebutil.jar,jacob.jar
    3.If Jinitiator is used,check if all corresponding jar files are downloaded onto user machine.Because all required class as shown in the error are there in jinitiator jar files.Also check all jar files that you have mentioned in archive_jinit are downloaded onto user machine.
    DO like this if using webutil archive_jini=frmall_jinit.jar,colorpicker.jar,keyfilter.jar,my_icons.jar,frmwebutil.jar,jacob.jar
    4.Enable all activex settings of your browser and do a proxy bypass setting in the browser as well..
    5. Check if you have download rights for downloading JAR files mentioned in archive_jini
    Edited by: anandk on Jul 24, 2012 1:18 PM

  • All Oracle Sample Schemas and all Oracle Built-in Packages in XE?

    Hi,
    I am trying to install Oracle 10g on my home system to improve my knowledge of PL/SQL. Because I'm doing it at home, I have to solve DBA issues I'm somewhat clueless about.
    I would like to install Oracle 10g Express Edition and include the built-in packages (DBMS_OUTPUT, UTL_FILE, DBMS_UTILITY, DBMS_JOB, DBMS_JAVA, DBMS_RANDOM, etc.) as well as the Oracle sample schemas (HR, OE, PM, SH, and IX). None of these, except HR, is included in the express edition.
    If necessary, I'd like to be able to install these things after installing the express edition. How can I do this?
    Thanks,
    Mike

    Hi Mike,
    checking the documentation is always helpful:
    http://www.oracle.com/pls/xe102/homepage
    http://download-uk.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_programs.htm#i2432
    You can always do a quick search on the documentation homepage, e.g. for utl_file:
    http://www.oracle.com/pls/xe102/search?remark=advanced_search&word=utl_file&format=ranked&book=&preference=
    There shouldn't be a need to install any packages. They should come preinstalled already.
    If not, you can find them here:
    C:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN
    Just be very careful before trying to install something into the data dictionary. If you are not experienced, you might mess up your database.
    For example, utl_file is installed but invisible to most users, e.g. HR.
    Look at this example:
    SQL> conn hr/oracle1
    Connect durchgef³hrt.
    SQL> desc utl_file;
    ERROR:
    ORA-04043: Objekt "SYS"."UTL_FILE" ist nicht vorhanden
    SQL> conn sys@XE as sysdba
    Kennwort eingeben:
    Connect durchgef³hrt.
    SQL> desc utl_file;
    PROCEDURE FCLOSE
    Argument Name                  Typ                     In/Out Defaultwert?
    FILE                           RECORD                  IN/OUT
       ID                           BINARY_INTEGER          IN/OUT
       DATATYPE                     BINARY_INTEGER          IN/OUT
       BYTE_MODE                    BOOLEAN                 IN/OUT
    PROCEDURE FCLOSE_ALL
    SQL> grant execute  on utl_file to HR;
    Benutzerzugriff (Grant) wurde erteilt.
    SQL> conn hr/oracle1
    Connect durchgef³hrt.
    SQL> desc utl_file;
    PROCEDURE FCLOSE
    Argument Name                  Typ                     In/Out Defaultwert?
    FILE                           RECORD                  IN/OUT
       ID                           BINARY_INTEGER          IN/OUT
       DATATYPE                     BINARY_INTEGER          IN/OUT
       BYTE_MODE                    BOOLEAN                 IN/OUT
    PROCEDURE FCLOSE_ALL
    PROCEDURE FCOPY
    ...So, after granting execute privileges on utl_file to HR, the user HR can now access utl_file. No need to install it.
    The default packages are installed in the schema SYS.
    Regards,
    ~Dietmar.

  • How to install oracle 'sample' database?

    hi
    i want to know how to install the oracle sample database.i am using oracle 9i installed in win XP pro.I have already installed an empty database named 'orcl.world' by following the steps given in 'oracle by example' link http://otn.oracle.com/obe/paa/index.html/
    But its empty and i wanted to install the sample database provided by oracle in order to start practising PL/SQL.
    thanks!

    I'm assuming you want to install the sample schemas since you already installed the database. The standard install includes these sample schemas, but if you're sure you don't have them, you can take a look at this link which will walk you through the steps http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96539/installa.htm#4371
    HTH -kk

  • Missing Oracle Sample Schemas - How Download complete Files

    Dear DBA's
    I appreciate if someone could tell me how setup the ORACLE SAMPLE SCHEMAS, because all my demo folders in 10g and 11G
    $ORACLE_HOME/demo/schema/hr or oe or any other chema there are fiesl missing,
    for instnace looking at the Procedure in doc
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28328.pdf
    it says to run "hr_main.sql" script in folder $ORACLE_HOME/demo/schema/human_resources
    But I can't find any file"hr_main"
    then for PM Schema it's supposed to have a file pm_main.sql !!!! I can't find .....
    The same for SH (Sales History) they say to run the "sh_main.sql" but i can't find anything like "Main"
    Can you please help me to compltely setup the sample schemas ?
    Txs

    I am having the same problem.
    I am running XE and the only sample schema that exists there is HR.
    OE and SH...are not there
    I downloaded companion CD 10 minutes ago from
    http://www.oracle.com/technetwork/database/10201winsoft-095341.html
    and searched through the whole companion and no
    files like :
    sh_main.sql
    mksample
    nothing!
    User Steve Callan placed a data pump file on
    http://www.dbasupport.com/oracle/ora11g/Installing-Oracle-Database-Sample-Schemas-using-Data-Pump.shtml
    but he created it without version parameter, so people who are running data pum from older versions cannot import it.
    I made a comment on the article he posted .
    user13106173 pointed out a link where you can get OE and HR, but I need SH sample schema as well
    So please can somebody direct me to anyplace I can get ALL THE Sample schemas

  • Data Types from Oracle Sample Schema

    Hi,
    I was trying to push some data from an Oracle Sample schema (Schema: OE Table: Customers) to a target schema. The interface was erroring out because of undefined data types in the model.
    I chkd the model, only to find that some of the data types were undefined.
    I DESCribed the table in the using SQL Client, The data types returned were
    CUST_ADDRESS_TYP
    PHONE_LIST_TYP
    MDSYS.SDO_GEOMETRY
    I DESCribed the datatypes, They seem to be flexfields of some kind,
    Please advise on how to define these data types into ODI:
    Heres the DESC output
    SQL> desc customers;
    Name Null? Type
    CUSTOMER_ID NOT NULL NUMBER(6)
    CUST_FIRST_NAME NOT NULL VARCHAR2(20)
    CUST_LAST_NAME NOT NULL VARCHAR2(20)
    CUST_ADDRESS CUST_ADDRESS_TYP
    PHONE_NUMBERS PHONE_LIST_TYP
    NLS_LANGUAGE VARCHAR2(3)
    NLS_TERRITORY VARCHAR2(30)
    CREDIT_LIMIT NUMBER(9,2)
    CUST_EMAIL VARCHAR2(30)
    ACCOUNT_MGR_ID NUMBER(6)
    CUST_GEO_LOCATION MDSYS.SDO_GEOMETRY
    DATE_OF_BIRTH DATE
    MARITAL_STATUS VARCHAR2(20)
    GENDER VARCHAR2(1)
    INCOME_LEVEL VARCHAR2(20)
    SQL> desc CUST_ADDRESS_TYP;
    Name Null? Type
    STREET_ADDRESS VARCHAR2(40)
    POSTAL_CODE VARCHAR2(10)
    CITY VARCHAR2(30)
    STATE_PROVINCE VARCHAR2(10)
    COUNTRY_ID CHAR(2)
    SQL> desc phone_list_typ;
    phone_list_typ VARRAY(5) OF VARCHAR2(25)

    To create MDSYS.SDO_GEOMETRY datatype, goes to Topology module, Oracle Techonology, Datatypes, and add a new datatype GEOMETRY. (try to fill all information fields with GEOMETRY and see what happens maybe you have to ajust this after but it is a start point).
    add information in from and to tabs according your source and target desired tech.
    Reverse againg your model, or change the datatype in the model datastore. Re-run your interface

  • How do I generate the sample EJB Client

    The online documentation says, by right clicking on EJB in system navigator, I should be able to see the context menu for creating a Sample EJB Client. However, I only see "New Java Client" and that too is disabled. Can somebody tell me how do I generate the Sample EJB Client.
    Thanks
    vimal

    The right-mouse option is on each individual session bean.
    "New Sample Java Client..."

  • Oracle Sample Code Login Issue

    I want to login to Oracle sample code.When i clicked the 'login' link from oracle sample code home page it is redirecting me to a page to 'Create User'. I gave my OTN username and password,but not accepting and showing invalid username/password message. Please help me to solve this.

    Hi,
    I had this issue, so i created a new user like 'user_ext' by providing a valid email id. Then try to login with the new user id created

  • Set SECURITY_PRINCIPAL,SECURITY_CREDENTIALS in sample EJB client to what?

    Hi!
    I'm getting an:
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; ...
    from a sample client class that JDeveloper generated from an Entity Bean that it generated from a Table.
    I haven't successfully been able to the Oracle 9i IAS on a separate machine, so I'm using JDeveloper's embedded OC4J for now.
    In the Database Connection is specified the DB user and passwd, in ejb.jar and orion-ejb.jar i created a role "serious-user" and specified that it can access all the Bean's methods.
    I'm not sure if the DB access is refused because something is wrong or missing about those role definitions or because I'd need to instanciate some session or the like..
    so far, I only have: Entity Bean, sample client generated from it, ejb-jar.xml and orion-ejb-jar.xml .
    the generated sample code says this:
                   Hashtable env = new Hashtable();
                   env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
                   env.put(Context.SECURITY_PRINCIPAL, "admin");
                   env.put(Context.SECURITY_CREDENTIALS, "welcome");
                   env.put(Context.PROVIDER_URL, "ormi://localhost:23895/current-workspace-app");
    Is the security principal supposed to be changed to the role I've defined? What about the security credentials?
    challenged,
    Lukas
    Btw: Something might be wrong with my Jdeveloper/OC4J setup ..
    In a different project, trying to retrieve the ServletContext from a Servlet's init() method gets me a null pointer exception.

    I'm having the exact same error message with my Sample Client. And I get this error even though I have made sure to run the Entity Bean, and the Session Bean. When I run these EJBs, i get no errors and it looks like the embedded OC4J is getting launched.
    So there must be something else going on, at least for me. But What??
    Also, where do you specify whether you want to Run the client against a standalone OC4J instance or the Embedded OC4J instance?
    Thanks and whoever answers my question will receive my undying gratitude as well as a few good karma points.

  • Error while retreiving data from oracle using EJB.

    HII All,
    I m getting this error while trying to retreive data from oracle DB using EJB.
    An error has occurred. Maybe the request is not accepted by the server:
    Exception in method empName.
    HTTP/1.1 500 Internal Server Error
    Connection: close
    Server: SAP J2EE Engine/6.40
    Content-Type: text/xml; charset=UTF-8
    Set-Cookie: <value is hidden>
    Date: Mon, 24 Jul 2006 10:50:11 GMT
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Exception in method empName.</faultstring><detail><ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException xmlns:ns1='http://sap-j2ee-engine/client-runtime-error'>Exception in method empName.</ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Thanks in advance
    Devendra Phate.

    Hi Devendra,
    this error message does not tell me much. Pleas either start debugging or watch your logs for more detailed messages.
    Regards,
    Benny

  • Beginners Guide Oracle Sample Database

    Hi!
    In the "Oracle Database 10g: A Beginer's Guide" in Chapter 2 a sample database is discussed with the tables customers, products, sales and costs. You need have it to try it the examples. How can I obtain it?
    I have Oracle10gRelease2(10_2_0_1_0) installed on Windows XP Pro SP2.
    Thanks,
    Hans

    Hi
    What is the link of:
    "Oracle Database 10g: A Beginer's Guide"?
    Maybe this is only a sample schema in a database, not a sample database.
    Create a new one and you will have this sample schema and tables.
    Ott Karesz
    http://www.trendo-kft.hu

Maybe you are looking for