Why to Use EJB rather then Direct Connection To Oracle Thru webDynpro?

Hi
  Experts,
   I want to know that why to use EJB to connect to oracle rather then direct connection via WebDynpro.
   Please Give Me References to how to connect to oracle with EJB or WebDynpro.I want to tell you that i know JDBC,JAVA and basic web Dynpro.
  Please Reply Me Dear Friends...ASAP.

EJB are better for a project beacuse the application is scalable, have less maintainence and have better performance.
Have you gone throght these:
Connect Oracle 9.2 DB to Web AS 6.40
web dynpro - database connection
web Dynpro application connecting to oracle
/people/ramesh.jandhyala/blog/2007/01/02/webdynpro-and-oracle-using-dtos
Regards,
Ashwani Kr Sharma

Similar Messages

  • HT204350 Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?

    You can get a thunderbolt to firewire adapter. You can then get a firewire 400 to 800 cable and put the old computer in target mode. Then you can follow these instructions.
    http://support.apple.com/kb/HT4889
    Choose migrate from other disk or volume.

  • Why we use EJB

    please tell me that , why we use EJB , i searched it on google but didn't find the answer .
    Please help me out
    Thanks in advance ...

    http://en.wikipedia.org/wiki/Ejb
    http://en.wikipedia.org/wiki/Enterprise_JavaBean
    http://www.developer.com/java/ejb/article.php/1434371/Introduction-to-EJBs.htm
    http://www.roseindia.net/ejb/
    http://openejb.apache.org/hello-world.html

  • Why to use EJB Reference

    hi all,
    when i have an enterprise application with a session bean and a webapp,
    i can access the session bean either over an ejb-reference in the webapp or directly access the jndi entry. what is the advantage of using ejb references? here an example of what i mean (both from within a webapp):
    ctx.lookup("myBean"); // without ejb ref
    ctx.lookup("java:comp/env/ejb/myRef"); // with ejb ref
    I get back the same, so whats the difference?
    rgds

    With ejb-reference a container optimizes access to collocated beans. For example, say you have a deployment where beans A and B are both replicated in two different containers, for performance and/or availability reasons. For optimal use every instance of A in container would use instances of B also in container one. Likewise for container two. An EJB container can enforce this locality constraint using ejb-links, but not always using direct JNDI names.

  • Direct connect to Oracle using Delphi

    How I can direct connect and transfer data from Oracle Database using Delphi.
    Not via ODBC driver!!!

    There are several BDE replacements that allow you to connect to
    Oracle from Delphi with out BDE or ODBC
    DOA- Direct Oracle Access from Allaround Automation ~$200.00
    http://www.allroundautomations.nl/index.html
    NCOCI8 is freeware.
    Goto to www.kylecords.com and they list BDE replacements.
    I use DOA and their PL/SQL developer systems from Allaround
    Automations and they are both excellent systems with excellent
    support.

  • Help needed - why we use ejb-ref element in ejb-jar.xml

    hi all
    can anyone tell me what is the purpose of this element in the ejb deploy descriptor? thanks

    Suppose u have bean A, which needs to look up another bean B. Normally you wud need to use the jndi lookup using the initial context to access the bean B's home interface. If you use ejb-ref element you dont need to know the JNDI name of bean B. You can use ejb-ref-name instead. So you can say this is a short cut method of looking up and getting a reference to a bean's home object.

  • Using jdk1.3.1 and connecting to oracle database

    The following is my program of servlet connecting to database and viewing the data from table,
    I am getting an error of SQLException caught which i wrote in my second catch block.I didn't understand what to do.Is that i have to download jdbc seperately with jdk1.3.1 or it is there in the kit.Please give me reply.I also created my dsn ,i have my odbc loaded in my pc.
    Thanks
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class EmpServlet extends HttpServlet
    public void init(ServletConfig sc) throws ServletException
         super.init(sc);
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,
    IOException
         Connection con=null;
         Statement st=null;
         ResultSet rs=null;
    res.setContentType("text/html");
    PrintWriter out=res.getWriter();
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:plk","scott","tiger");
    st=con.createStatement();
    rs=st.executeQuery("select uname,upwd from userinfo");
    out.println("<html><title>empservlet</title>");
    out.println("<body>");
    out.println("<ul>");
    while(rs.next())
    out.println("<Li>" rs.getString("uname") " " + rs.getString("upwd"));
    out.println("</ul>");
    out.println("</body></html>");
    catch(ClassNotFoundException e)
              out.println("could not load database driver");
    catch(SQLException se)
              out.println("sql exception caught");
    finally
         con.close();
    }

    Instead of using the odbc driver to connect to the Oracle server, why don't you use the JDBC driver from Oracle?
    By using the ODBC driver, you need to configure two things in addition to your Java program - ODBC setup (to setup the DSN) and also the SQLnet (to connect to the oracle server).
    However, with the Oracle JDBC thin client, you just have to configure in your java program.
    I hope this helps.

  • Why I use bing rather than google?

    What are the benefits of searching information in bing rather than google?

    read this:
    http://tech-beta.slashdot.org/story/11/08/14/0419213/bing-more-effective-than-google

  • How to use ikons rather then actual photos on e-mails?

    How do I use ikons instead of actual photos (jpg's) as attachments on E-mails? The same is applicable to "written attachments", I would like to attach them as file ikons. How can this been done?
    Thanks,
    Hank

    Hey Hank Wefers,
    Thanks for using Apple Support Communities.
    Mail (Mavericks): Add attachments
    http://support.apple.com/kb/PH14914
    Add photos and other files:
    Drag files from the Finder, iPhoto, or another app into your message. Or click the Attach icon to choose a file. For photos, you can click the Photo Browser icon and drag a photo into your message. By default, Mail inserts images in their actual size.
    Mac OS X Mail: About PDF attachments
    http://support.apple.com/kb/ta22343
    Control-click the icon or visible portion of the PDF and choose "View in Place" or "View as Icon" as appropriate from the shortcut menu. Note that this only affects how you see the PDF in this message's window, it is not a permanent change.
    Have a nice day,
    Mario

  • Any way to use Microsoft's DLLs to connect to Oracle Database?

    I'm using an application originally targetted at SQL Server. The application allows both OLE DB and ODBC, and allows you to provide a query and a connection string. I'm wondering if it's possible to point the database client application, which knows NOTHING about Oracle, to communicate with an Oracle Database (perhaps by manipulating the Driver and/or Provider in the connection string). The application uses Microsoft's built-in OLE DB and ODBC classes found in System.Data.
    Is there a way to get this to work, or will the application need to be recompiled to use ODP.NET data providers?
    P.S. If so, and I do need to use the "Driver" connection string parameter, what is the name of the DLL used as the OLE DB driver? The ODAC package is described as containing "Oracle Provider for OLE DB 11.2.0.2.0". I don't see it.
    Edited by: notfed on Dec 13, 2011 2:51 PM

    And...the answer is yes.
    Example connection string:
    "Provider=OraOLEDB.Oracle;Data Source=DB11G;User Id=username;Password=password;"
    Sample query:
    "select * from mytable"

  • Cannot connect to Oracle thru OracleConnection

    Hi,
    I'm new somewhat new to this forum, so fwiw, I have searched through this forum trying to find a similar solution to this problem, but to no avail, so I figured I would post it. If this is a FAQ, then my apologies and point me there!
    I recently did some housekeeping on my pc and uninstalled OracleXe (using a doc i found on the web) and then reinstalled Oracle XE.
    According to the registry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE\ODP.NET\Version, I'm using the OracleDataAccess.dll 10.2.100 to connect.
    my version of XE, again looking at the registry here, HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE\Version is 10.2.0.1.0
    I have a project which has been running for sometime and it no longer works, I decided to create a simple console sample to see if the problem could be isolated. Here's a snippet of it for ref, only thing left out is curly braces, main and namespaces.
    // i have this in tnsnames.ora and set this up with database web page
    strin connStr = "Data Source=HR;User Id=hr;Password=hr;";
    OracleConnection ocn = new OracleConnection( connStr );
    try {
    ocn.Open();
    catch ( OracleException oex ){
    Console.WriteLine("error was: {0}", oex.Message );
    When i run this code an exception is thrown when Open is called, but the exceptions message is blank!
    I've tried a few things to figure this out. I checked if I could connect using sqlplus > hr/hr@HR and that works fine. Thinking it might be GAC related, I took a sneak peek at the GAC and I do see a 10.2.100 dll in there as well as the various resource dlls for that version. In addtion there is a Policy 9.2 Oracle.DataAccess 10.2.100 too.
    I turned on tracing, set values in the odp.net registry entry (under Oracle\KEY_XE
    I set tracelevel to 1 and traceoption to 0. The file it emits contains entries and exits and some warn entries..
    Any ideas as to what might be wrong ?
    thanks for any help you can provide,
    Sincerely,
    J

    update: Solved!
    Thanks for the help.
    I guess in the end, it was that a reboot was required because
    when I came in today and gave it a run through, it was doing considerably better.
    Ming, thank you,
    it turned out that this was not the problem.
    thanks,
    sincerely,
    J__

  • How do you promote a static route over a directly connected?

    Hi all,
    I have a need for a static route to be used instead of a directly connected route. (Long story - involving firewalls and anti-spoofing.. but can go further if required)
    I am using a Cisco 3750 switch. I notice directly connected routes have a metric of 0, and the highest metric I can give a static route is 1.
    Therefore, how is it possible for me to make the switch use the static route and not the directly connected?
    Any help would be appreciated!
    Cheers,
    Ben

    Hi Rick,
    Thanks for your patience.
    Maybe I should start again.
    Initially we had 16 VLANs within the 10.0/16 address space. We have some Cisco 3750's connected by dark fibre accross a couple of kms and then lower access switches all hanging of these by some means. The network is flat.
    We have a checkpoint firewall hanging off one of the 3750s connected using a TRUNK port. The firewall has an IP address on all VLANs and is used to route traffic between VLANs based on its ruleset.
    So if I have a user in VLAN 10 who wants to talk to VLAN 20, they travel to the firewall, if a rule permits the access, the firewall routes the packet on to VLAN 2 and the switches deliver at Layer 2.
    The switches all have their default VLAN 1 disabled, and have an IP address on our management VLAN to allow us to manage the switches.
    Its quite important that this IP is on a secured management VLAN as we don't want just anyone being able to snoop switch logins etc..
    If we need to login to a switch, the firewall routes our traffic from whatever VLAN we are on to the Management VLAN.
    One of our VLANs (the Desktop VLAN) is quite large (approx 1300 hosts) and suffers a great deal from too much arp broadcast traffic.
    As we have a flat switched network across several kms, the cost of putting in routers to subnet this large VLAN is excessive.
    However, the 3750's we have are perfectly capable of routing between VLANs, so we decide to create a load of new VLANs instead of subnetting our large VLAN. We don't want to use the firewall to route between these new VLANs as thats just giving the firewall more to do, and previously all these hosts were on a single subnet, so we have no need for any strict security - at most we can use ACLs on the switches if we even need that!
    So far so good.
    With 1300 hosts, we obviously can't make sudden topology changes. Therefore we need to be able to route between the Desktop VLAN and the new VLANs.
    We therefore introduce the static routes between the firewall and the switches.
    So the firewall says:
    route 10.1.0.0/16 via Multilayer switch IP on 10.1.0.0/16
    The multilayer switch says:
    route 10.0.0.0/16 via Firewall IP on 10.1.0.0/16
    This allows routing perfectly between the Desktop VLAN and the new VLANs.
    However the moment we enable ip routing on the switches we break access between the desktop VLAN and the Management VLAN.
    A packet leaves the desktop VLAN through the default gateway on the firewall. This is then routed to the Management VLAN. The return packet doesn't use the Management VLAN default gateway (firewall), it follows the static route on the switch and ends up at the firewall on 10.1.0.0/16. This is subsequently dropped as the firewall knows the packet hasn't come from the 10.1.0.0/16 network, it originally came from the desktop VLAN on 10.0.0.0/16.
    It might seem we can define a route on the switch to say:
    route 10.0.50.0/24 (management VLAN) via 10.0.50.254 (firewall). However, this would result in all packets from 10.1.0.0/16 being dropped by the firewall.
    The other problem is that if we are on a new VLAN and want to talk to the management VLAN. The packet goes to its default gateway on the switch. The switch says - "I have an IP on the management VLAN, its directly connected" - therefore it ignores the static route, and passes the packet on its way. We have now bypassed the firewall, which is bad.
    Incidentally the return packets get routed through the firewall and dropped, as the original packet didn't come through the firewall, there is no entry in the state table for its return.
    I think if we turned off the management interface on the switch and managed it through the interface on 10.1.0.0/16, I assume everything would work. However, we don't want to do this for a whole load of other reasons I wont go into.
    Im sure there must be a fairly simple solution - I just don't have enough experience!
    Cheers,
    Ben

  • Using Datasource in OC4J  to connect to 9iDb(ArrayIndexOutOfBoundsException

    Hi all,
    I've been encountering a certain ArrayIndexOutOfBoundsException when attempting to connect to Oracle 9i
    via a defined datasource.
    I've taken the following troubleshooting steps but to no avail:
    1. Verified username and password
    2. Verified URL by having a test class to establish a direct connection using this URL
    3. Verified that both classes12.jar and ocrs12.jar are defined in the classpath
    3. Updated classes12.jar and ocrs12.jar from the OTN to copies stipulated to be compliant with 9.2.0.1
    (this was based on a post on the net with reference to similar error messages:http://www.orafaq.net/msgboard/java/messages/1488.htm)
    It would be great if anyone could have some input on this problem.
    Thanks!
    WK
    My development environment:
    Oracle Database 9.2.0.1
    oc4j
    The following configuration and code snippets are provided for reference:
    data-sources.xml
         <data-source
              class="com.evermind.sql.DriverManagerDataSource"
              name="OraclePool"
              location="jdbc/OracleCoreDS"
              xa-location="jdbc/xa/OracleXADS"
              ejb-location="jdbc/OracleDS"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="USER"
              password="PASSWORD"
              inactivity-timeout="30"
              url="jdbc:oracle:thin:@localhost:1521:OracleDb"
    />
    Client Code:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource)ic.lookup("jdbc/OracleDS");
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
    String strQuery = "SELECT id FROM TBL_PART";
    ResultSet rset = stmt.executeQuery (strQuery);
    Error:
    java.lang.ArrayIndexOutOfBoundsException
         at oracle.security.o3logon.C1.r(C1)
         at oracle.security.o3logon.C1.l(C1)
         at oracle.security.o3logon.C0.c(C0)
         at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper)
         at oracle.jdbc.ttc7.O3log.<init>(O3log.java:290)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:118)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.DriverManagerConnectionPoolDataSource.getPooledConnection(DriverManagerConnectionPoolDataSource.java:24)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.OrionPooledDataSource.getPooledConnection(OrionPooledDataSource.java:273)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.PooledConnectionUsage.getPooledConnection(PooledConnectionUsage.java:21)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.OrionPooledDataSource.getConnection(OrionPooledDataSource.java:145)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.DriverManagerXADataSource.getAutoCommitConnection(DriverManagerXADataSource.java:226)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.LogicalDriverManagerXAConnection.intercept(LogicalDriverManagerXAConnection.java:88)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.FilterConnection.createStatement(FilterConnection.java:324)
         at com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].sql.FilterConnection.createStatement(FilterConnection.java:325)

    Hi WK,
    According to your stack trace, you are using a very old version of OC4J. I suggest updating to the latest, production version: 9.0.3
    Also, I seem to recall reading somewhere (I think it was in this forum), that "DataSource" is not serializable, and therefore cannot be transferred to the client.
    I use "DataSource" in my BMP entity beans to interact with the database -- this works fine. I have not tried getting a "DataSource" from a remote client, though.
    And also you may need to pass some "properties" to your "InitialContext" constructor -- depending on the type of client you are using (which I could not ascertain from your post).
    Hope this has helped you.
    Good Luck,
    Avi.

  • Changing a WD External HD from Time Capsule Disk to Direct Connection

    I was using a WD 1T hard drive connected to my Time Capsule USB port. It was set up as Allow file sharing with Time Capsule password. I would like to stop using it here and directly connect it to my Macbook Pro (by firewire). When I try to do this, I can see the drive but get a message that I do not have user permissions to access it. Is there a way around this? Do I need to reformat the WD drive in Disk Utility to be able to use it directly again?
    Thank you.

    Note: Mac 3 had a single user on it, my son. He was the admin. I created a new non-admin acct and moved all his stuff there (Not sure I did it the right way so it took a long time.). Now I am admin on that Mac. Not sure if that is relevant here (leading to the problem identified above) but thought I would mention it. 
    Thanks in advance for your help.
    The fact that you cannot access the backup now only on this Mac does suggest this is part of the issue. Did you do this before or after the issue with access?
    Permissions can be pretty tricky things.. certainly to do backups or to retrieve them from an existing backup created with different user permissions might be a mess.. Pondini is perhaps the only one who can tell you the ins and outs of that.
    On the more general note.. lots of people are having issues with USB drive on the TC from Lion.. for many it stops working forever the moment the disk spins down from a reboot.. making it useless.
    But it is dog slow for everyone.. The reality is USB is less than half its native speed on the TC cf on the computer.. and it wasn't that fast to begin with.
    Plug the hard drive directly into the computer and mount the sparsebundle and see if the TM then can access it.. but you might need to use your admin login not your son's.
    Personally if the TC disk is not big enough.. replace the TC with a larger disk version.. or the disk in the present one.. do not use disks hanging off TC. It has enough reliability issues without adding to them.

  • How to Retrive data from db using EJB in WebDynpro

    hi...
    i m using EJB's for backend connection in WebDynpro .in which i m able to store data in sapdb .for this i followed one tutorial which i have mentioned bellow which works perfectly.Now in the same Tutorial i want to retrive the data from database and disply it in WebDynpro
    i .e i want to disply bonus when i give ssn no and also i want to disply all data in db.
    Please help me as i m totaly new to this environment and also first time i m working on EJB.its very urgent
    Thanks and Regards
    Sonal<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c</a>

    hi...
    i m using EJB's for backend connection in WebDynpro .in which i m able to store data in sapdb .for this i followed one tutorial which i have mentioned bellow which works perfectly.Now in the same Tutorial i want to retrive the data from database and disply it in WebDynpro
    i .e i want to disply bonus when i give ssn no and also i want to disply all data in db.
    Please help me as i m totaly new to this environment and also first time i m working on EJB.its very urgent
    Thanks and Regards
    Sonal<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c</a>

Maybe you are looking for

  • How can I emulate Windows on a PowerBook G4 12-inch?

    Hi, To emulate Windows as described below, do I need a virual Windows software or is there a setting I can use? Quote: IBD Charts are viewable on a Macintosh computer if it is configured to emulate a 32-bit Windows environment (either hardware or sof

  • Package SRW in Webbased Reports 6.0.5.35

    Hi ! Is is possible to use the Functions in the built-in Package SRW from Reports running in the Web ? srw.run_report and srw.message seem to not do anything anymore ? Any mention of this in (the) documentation ? cheers, Jens null

  • HT5699 The no of israel is not ok

    You blok me becouse I forgot my first car and the work place

  • URGENT: ora_hash AND hash collision

    We need to compare two tables residing in two different database instances(both on Oracle 10g ver2). I have heard of the ora_hash SQL function provided as part of Oracle 10g. However, i need to enquire as to what is the probability for a hash collisi

  • 10.5.4 and Photoshop/InDesign Problems

    After the previous problems that presented in the upgrade to 10.5.3 our company decided to test the upgrade to 10.5.4 before upgrading. We have experienced a strange thing happening to files located on the server. If you are in InDesign and you have