Issue with Webservice Creation using Session Beans.

Hi All,
I want to expose my Session beans as webservice.
I'm using Weblogic Application Server.
When I do the modeling using JDeveloper, I'm unable to convert the Session bean to webservice.
Any information on this is highly appreciable.
Thanks & Regards,
Kumar Madhavan.

I can't give you much of a walk through, as I have just started it myself, but I'm using a universal unique identifier to represent each client. Whenever a client posts data from a jsp or applet the uuid is also sent. I use POST to pass all my parameters. If the server hasen't received data in say 5 minutes from the client then it is assumed the client went offline. Its working for me so far.
COn

Similar Messages

  • Can I connect with Database using Session Bean

    Hi,
    I am new to EJB. I have small doubt.
    can I connect with Database using Session Bean.
    Regards,
    Murali.

    Double post of http://forum.java.sun.com/thread.jspa?threadID=687239&tstart=0

  • Is it possible to connect database using session bean

    Dear all,
    Is it possible to connect database using session bean without using entity beans like cmp,bmp.
    if ur answer is yes, then pls tell me where to put the select statement and transaction attribute like(6 types).
    if u have sample code, then it is good for me.
    Hope I will get answer.

    Sure it is.
    Try something like this (and maybe get a book on JDBC):
    String name;
    try {
         InitialContext ic = new InitialContext();
         DataSource ds = (DataSource) ic.lookup(Constants.MY_DATASOURCE);
         Connection connection = ds.getConnection();
         String sql = "SELECT * FROM TABLE";
         PreparedStatement statement = connection.prepareStatement(sql);
         ResultSet rs = statement.executeQuery();
         while (rs.next()) {
              name = rs.getString("NAME");
         if (rs != null)
              rs.close();
         if (statement != null)
              statement.close();
         if (connection != null)
              connection.close();
    catch (NamingException e) {
         // Can't get JDBC datasource
         // ... do something with this exception
    catch (SQLException e) {
         // SQL exception from getter
         // .... do seomthing with this one too
    }

  • Using Session Beans on a read only database

    Hi,
    i am working on a weblogic 6.1 server and have to access a read only database
    using session beans. The transaction attributes of all session beans (we are using
    no entity beans) are set to NOT_SUPPORTED but every time a method is accessed
    an error message is thrown
    BEGIN TRANS in read only database .....
    Is there a way to avoid this?
    Regards
    Edmund

    I guess it is NotSupported. If not try Never.
    --Jay   
    www.architectslobby.org
    An exclusive community for Enterprise Architects

  • Compatibility issue with developer 6i using (64 bit) OS

    Hi All,
    I am using oracle 9iR2 (32 bit) on Linux Red Hat (32 bit) with developer 6i. Now i want to upgrade OS Red Hat (64 bit) and migrate database 10gR2 (64 bit).Is there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
    Thanks

    Is there any compatibility issue with developer 6i using 64 bit Red Hat OS / Oracle Database ?
    No, as long as developer 6i is at least patch 16. We use it.

  • Example of using session bean with webservices

    Hello,
    I am working with netbeans 5.5 (with JAX-WS 2.0 library) and using Tomcat.
    I have created webservices and everything is working well so far. However, each webservice is making a connection to my database.
    I would like to use a session bean so that I make the connection only once (at the begining of the client session for example) and store it into my session bean.
    I am a newbie in those things, I search on the Web and on this forum some code examples. The only thing I have found is this article http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html
    When I tried this, the session doesn't seem to work at all : I get the same result (counter=1) twice.
    Does anybody have a complete example of how to use a session with webservices please?
    Thanks a lot!

    Sorry, I was not very clear in my last message.
    I need all my webservices to share the same bean during one user session.
    Then, if a page calls 2 different web services, only 1 database connection is made instead of 2. And if the user opens other pages which call other webservices, they will use the connection kept into the session bean.
    Anyway, I tried to do like it is said in your website but I can not build my project. I have an error : java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/.../build/web/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. I do not understand because I have downloaded the jax-ws 2.1.1 api and no other libraries are imported in my project. :-(
    I wonder if it is not related to netbeans...

  • Regarding PO creating with condition record Using Session method

    Hi All,
    I am facing the following problem during po creation using BDC session method.
       If there is error in any of the record in the PO upload file and if we jump to next record during batch input session, system changes data of previous correct record.
    Example u2013 Consider following data
    Matl code     Matl Description     Qty     UoM     Price
    98652565     Floater08 EPS Insert -with sta     15000     EA     171
    60890125     INSERT (PACKAGING) Wellpappe T     14000     EA     52.3
    65646353     INSERT CASE PACKAGING, univers     10000     EA     56.9
    98725563     Shipper-2nd-NA-Bubble TS.1850     9000     EA     213.4
    Consider that record 2 (60890125) contain wrong data. If we skip this record and move to next record 65646353, system executes previous correct record (98652565) and changes net price of that record (here its 171) to 56.9. If record 3 is also wrong, it will capture price from record 4 and will put it for record 1.
    If anyone know the solution, Please let me know.
    Thanks in Advance.

    Hi Prasad,
    You may not be clearing some workarea in the program while looping or while sending data to screens, clear workareas when required.
    If you still face the same issue, try posting the code here, lets see, whats the problem is.
    Rgds,
    Sripal

  • Simple WebService Creation using JDeveloper 11.1 Technology Preview 2

    Hi,
    I like the way JDeveloper simplifies the web service creation using the wizards and allows to test the web services from the IDE itself.
    I have the following issues when I tried the step-by-step tutorial (http://www.oracle.com/technology/obe/obe11jdev/11/ws/ws.html) to build a web service. I greatly appreciate if some one can help me with these issues. This tutorial basically provides how to create a simple hello world kind of web service using JDev. Some of the steps are failing in my case.
    Failure 1) Unable to find the WSDL document
    When I invoke the "Test Web Service" menu item HTTP Analyzer is unable to locate the dynamically generated WSDL. I did try with and with-out proxy settings both the cases it failed. However I can see the WSDL if I go to the given WSDL URL in my web browser. I suspect I am missing some thing in Jdeveloper configuration. So I had to manually save the WSDL from the browser to go to further steps.
    Failure 2) Failure in the Response message
    When I invoke the request message I am getting the following error in the response:
    "The selected message is not a SOAP message". However, if I use the browser to test the web service, it is working fine.
    I greatly appreciate if you can provide me some insight into why JDeveloper is failing in these cases.
    Thanks
    Sunil

    It started working after I restarted the JDeveloper with no proxy settings. Seems to be after changing proxy settings JDev need to be restarted to take the preference changes to be effective in this case.
    Another interesting aspect that I noticed was, when HTTP analyzer is running it dynamically sets the proxy in the preferences settings as localhost with the HTTP analyzer port.
    But anyway now I am able to run and test this webservice within the JDev itself.
    Regards
    Sunil

  • Creation of session bean

    Hi all,
    I am trying to create a DC webservice, while creating the stateless session bean in package, I am getting the error "Not able to create session bean".
    How can I solve this issue?
    Basically the problem is with the ejb-jar.xml.
    Thanks
    Vivek

    Hi Sriram,
    I have created another webservice locally and in that I am able to create the session bean. I am getting the problem only while creating the bean in the EJB module in DC.
    Thanks
    Vivek

  • How can i design a EJB application using session Beans?

    Hello,
    I am designing a Find application using EJB. Here a user is prompted a search page, where he can enter the search criteria's. Then on click of submit, the query is formed at the server side depending on what criteria's were selected. Then a jdbc query is performed and the results are returned back to the user. Here no session is maintained for the users. Can anyone suggest me how to design this application using EJB. Should i use entity beans for this or session beans will suffice? Should the jdbc query be performed in the bean itself or should it be outside in a helper class? Please kindlu suggest me the design for this application...
    Regards,
    Subbu

    Hi,
    First of all, I'm unable to figure out why you need to use EJB for this scenario. You can write a helper class to frame and execute the query.
    If you really want to use EJB, then I suggest you use a stateless Session Bean with transaction attribute as TX_NOT_SUPPORTED. From the session bean, you can call the helper class. But, by avoiding the session bean, you can eliminate remote calls, thus improving your performance. Also, check if the database & the db driver you are using supports sql caching.
    Regards,
    Raj.

  • Hot delpoyment with TopLink and Stateless Session Beans

    What is the recommended procedure for making hot deployment of Stateless session beans work with toplink in WLS 7.0sp1 and oc4j (9.0.3)
    My current setup is as follows using WLS 7.0sp1:
    A stateless session bean is accessing toplink enabled persistent java classes via the SessionManager. I'm currently using the class loader of the stateless session bean:
    * Method in stateless session bean
    * Return the TopLink Session (based on the wls stateless session bean demo)
    public Server getSession() {
              return (Server)SessionManager.getManager().getSession("ejb_sessionbean", this.getClass().getClassLoader());
    Everything is working as such. My session bean can read and write the persistent java classes. However if I redeploy the stateless session bean jar file the toplink session is not reinitalized. This means that new settings in the session.xml are not used. I addition I get other errors.
    I'm having toplink on the server classpath. The toplink enabled persistent classes are in the stateless session bean jar file.
    Thanks
    Henrik

    What is the recommended procedure for making hot deployment of Stateless session beans work with toplink in WLS 7.0sp1 and oc4j (9.0.3)
    Everything is working as such. My session bean can read and write the persistent java classes. However if I redeploy the stateless session bean jar file the toplink session is not reinitalized. This means that new settings in the session.xml are not used. I addition I get other errors.
    I'm having toplink on the server classpath. The toplink enabled persistent classes are in the stateless session bean jar file.Henrik,
    This is a recent post note I found on the same topic:
    It all hinges on whether the TopLink ServerSession class has
    been loaded by a classloader which is actually thrown away
    during the hot deployment process. If this is the case, then
    hot deployment causes the ServerSession to go out of scope
    and finalize methods take care of logging it out properly.
    If you deploy your TopLink Project on the Sytem class path then
    it definately won't work. You'd have to restart the server every time.
    But if the TopLink Project is deployed inside of an .ear file
    and if you pass the correct ClassLoader to the
    SessionManager.getSession( .... ) call then TopLink Session will
    be re-started when you hot deploy the .earBased on this, the solution might be to deploy your EJBs in an ear file. Everything else looks OK. Can you try this and let us know?
    Thanks,
    Pete Farkas

  • Issue with index creation of an infocube.

    Hi,
    I have an issue with creation of index's for a info cube in SAP BI. when i create index's using
    a process chain for the cube it is getting failed  in the process chain. when i try to check the index's  for this
    cube  manual the following below massage is shown.
    *The recalculation can take some time (depending on data volume)*
    *The traffic light status is not up to date during this time*
    Even i tried to repair the index's using the standard program "SAP_INFOCUBE_INDEXES_REPAIR" in SE38
    to repair the index so it is leading to dump in this case.
    Dear experts with the above issue please suggest. 
    Regards,
    Prasad.

    Hi,
    Please check the Performance tab in the Cube manage and try doing a repair index from there.
    This generates a job so check the job in SM37 and see if it finishes. If it fails, check the job log which will give you the exact error.
    These indices are F fact table indices so if nothing works, try activating the cube by the pgm 'RSDG_CUBE_ACTIVATE' and see if that resolves the issue.
    Let us know the results.

  • Problem with connecting from Netweaver Session Bean to SAP R/3

    Hi,
    i just want a connection to RFC in SAP R/3 and with help of sap ("Proxy generation" etc) and wizard in NWDS i get the rfc. Now i want to connect and use it (like in handbook) but: Every time i create and use jcoclient.connect() system gets an error like:
    "Class File Editor
    Source not found
    The jar file jrfc.jar has no source attachment."
    I have add all files that are used to "Used DCs" or bind library into projekt as "Third party library", but the error is still there.
    Any idea? Do i have to make something else? Some failure made?
    thx
    Here is text for connection:
    Created on 26.06.2008
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    package com.XXXXXXXXXXXXXXXXX;
    import com.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX;
    import com.sap.aii.proxy.framework.core.ApplicationFaultException;
    import com.sap.aii.proxy.framework.core.SystemFaultException;
    import com.sap.mw.jco.JCO;
    @author XXXXX
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    public class MyMainClass extends Object
         public static void main(String[] args)
              throws ApplicationFaultException, SystemFaultException
              JCO.Client jcoclient =
                   JCO.createClient(
                        "XXX", //Client
                        "XXX", //User
                        "XXX", //Password
                        "XXX", //Language
                        "XXX", //Server
                        "XXX", //System
                        "XXX"); //Group
              jcoclient.connect();
              jcoclient.disconnect();
    Edited by: Torsten on Aug 27, 2008 10:43 AM
    Where can we download SAP NW7.0 (2004s) as Java Trial for testing? We only find ABAP Trial... Link? thx

    So we tested some things that are described in the SDN or by SAP with Connectors.
    We tested JCO version 2.0.12, 2.1.18 and 3.0 in J2EE Projects in netweaver and in Eclipse (Standalone).
    For version 2.0.12 there is a failure that this version is not compatible with the other things in netweaver.
    This version is for standalone and integrated sytems.
    For version 2.1.18 is only described as standalone and so failure happened in netweaver that other classes are coruppted or missed. The internal test in "content administrator" (Ping and Test) do not work and had the same error.
    For version 3.0 (that displace the other two versions) there is many to do in  settings and coding that we do not have tested yet because project is not that small to write it for JCO 3.0 only for testing. When we only displaced files in netweaver the server do not start any more.
    So:
    Is there a way to call R/3 from session bean and 1. create an JCO client or 2. add a client to the "standard" pool of netweaver to use it?
    Any ideas? help? links?
    Project have to be complete in september...
    Our combi is SAP Netweaver 2004 SP21 on Windows XP SP2 / Server 2003 Standard SP1 with JVM 1.4.2_16... need of any more info?
    thx

  • Issue with "read by other session" and a parallel MERGE query

    Hi everyone,
    we have run into an issue with a batch process updating a large table (12 million rows / a few GB, so it's not that large). The process is quite simple - load the 'increment' from a file into a working table (INCREMENT_TABLE) and apply it to the main table using a MERGE. The increment is rather small (usually less than 10k rows), but the MERGE runs for hours (literally) although the execution plan seems quite reasonable (can post it tomorrow, if needed).
    The first thing we've checked is AWR report, and we've noticed this:
    Top 5 Timed Foreground Events
    Event     Waits     Time(s)     Avg wait (ms)     % DB time     Wait Class
    DB CPU           10,086           43.82     
    read by other session     3,968,673     9,179     2     39.88     User I/O
    db file scattered read     1,058,889     2,307     2     10.02     User I/O
    db file sequential read     408,499     600     1     2.61     User I/O
    direct path read     132,430     459     3     1.99     User I/OSo obviously most of the time was consumed by "read by other session" wait event. There were no other queries running at the server, so in this case "other session" actually means "parallel processes" used to execute the same query. The main table (the one that's updated by the batch process) has "PARALLEL DEGREE 4" so Oracle spawns 4 processes.
    I'm not sure how to fix this. I've read a lot of details about "read by other session" but I'm not sure it's the root cause - in the end, when two processes read the same block, it's quite natural that only one does the physical I/O while the other waits. What really seems suspicious is the number of waits - 4 million waits means 4 million blocks, 8kB each. That's about 32GB - the table has about 4GB, and there are less than 10k rows updated. So 32 GB is a bit overkill (OK, there are indexes etc. but still, that's 8x the size of the table).
    So I'm thinking that the buffer cache is too small - one process reads the data into cache, then it's removed and read again. And again ...
    One of the recommendations I've read was to increase the PCTFREE, to eliminate 'hot blocks' - but wouldn't that make the problem even worse (more blocks to read and keep in the cache)? Or am I completely wrong?
    The database is 11gR2, the buffer cache is about 4GB. The storage is a SAN (but I don't think this is the bottleneck - according to the iostat results it performs much better in case of other batch jobs).

    OK, so a bit more details - we've managed to significantly decrease the estimated cost and runtime. All we had to do was a small change in the SQL - instead of
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y' AND S.DIFF_FLAG IN ('U', 'D'))
      ...(which is the query listed above) we have done this
    MERGE /*+ parallel(D DEFAULT)*/ INTO T_NOTUNIFIED_CLIENT D /*+ append */
      USING (SELECT
          FROM TMP_SODW_BB AND DIFF_FLAG IN ('U', 'D')) S
      ON (D.NCLIENT_KEY = S.NCLIENT_KEY AND D.CURRENT_RECORD = 'Y')
      ...i.e. we have moved the condition from the MERGE ON clause to the SELECT. And suddenly, the execution plan is this
    OPERATION                           OBJECT_NAME             OPTIONS             COST
    MERGE STATEMENT                                                                 239
      MERGE                             T_NOTUNIFIED_CLIENT
        PX COORDINATOR
          PX SEND                       :TQ10000                QC (RANDOM)         239
            VIEW
              NESTED LOOPS                                      OUTER               239
                PX BLOCK                                        ITERATOR
                  TABLE ACCESS          TMP_SODW_BB             FULL                2
                    Filter Predicates
                      OR
                        DIFF_FLAG='D'
                        DIFF_FLAG='U'
                  TABLE ACCESS          T_NOTUNIFIED_CLIENT       BY INDEX ROWID    3
                    INDEX               AK_UQ_NOTUNIF_T_NOTUNI    RANGE SCAN        2
                      Access Predicates
                        AND
                          D.NCLIENT_KEY(+)=NCLIENT_KEY
                          D.CURRENT_RECORD(+)='Y'
                      Filter Predicates
                        D.CURRENT_RECORD(+)='Y' Yes, I know the queries are not exactly the same - but we can fix that. The point is that the TMP_SODW_BB table contains 1639 rows in total, and 284 of them match the moved 'IN' condition. Even if we remove the condition altogether (i.e. 1639 rows have to be merged), the execution plan does not change (the cost increases to about 1300, which is proportional to the number of rows).
    But with the original IN condition (that turns into an OR combination of predicates) in the MERGE ON clausule, the cost suddenly skyrockets to 990.000 and it's damn slow. It seems like a problem with cost estimation, because once we remove one of the values (so there's only one value in the IN clausule), it works fine again. So I guess it's a planner/estimator issue ...

  • ClassCastException while using session bean in OC4J

    I am facing the same problem while deploying a stateless session bean in Oracle 9i AS 1.0.2.2.1. The details are given below.
    The following code snippet is used in the client to prepare for the lookup:
    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");
    //the following line can also have the actual machine name instead of "localhost"
    env.put(Context.PROVIDER_URL, "ormi://localhost:23893/myejbs");
    Context ctx = new InitialContext(env);
    System.out.println("Getting Home....");
    Object obj=ctx.lookup("Grouping");
    System.out.println("Home Object Is : "+obj);
    GroupingHome groupingHome = (GroupingHome)obj;
    System.out.println("Got Home");
    Grouping grouping = groupingHome.create( );
    graphs=grouping.<mehtods>();
    I've edited the config/server.xml file to have the following line:
    <application name="myejbs" path="C:\oracle\ora102\j2ee\home\applications\classes\myejbs" auto-start="true" />
    which points to the directory where the class files reside
    I've also change the port in the config/rmi.xml file to 23893.
    Now... the problem that I am facing is - while I am running a client from outside the server JVM i.e standalone client... which uses the Grouping interfaces, it works fine. giving me the desired result. But the moment I place the code in a service client deployed in the server or a jsp, I get a ClassCastException for GroupingHome whereas the SOP that I have given after lookup shows that I have found - "Grouping EJBHome". The funny thisng is that bith the working client and the JSP are using sme set of interface class files - Grouping.class (Remote) and GroupingHome.class.
    Where am I going wrong?? If anybody knows, or Giri has found an answer to his query... please post a reply.
    Thanks.
    PS: I've tried new InitialContext(); solution but it didn't work. I have also narrowed the home object with javax.rmi.PortableRemoteObject.narrow(obj,GroupingHome.class) but to no avail :(.

    Hi Gauarv,
    Did you not see my reply in the following post?
    Re: 502 service temporarily unavailable
    If I'm not mistaken, this is exactly the same question as you asked
    there.
    By the way, is there some reason you are still using OC4J version
    1.0.2.2? Is there something stopping you from upgrading to the later
    versions (9.0.2 and 9.0.3)?
    Good Luck,
    Avi.

Maybe you are looking for

  • HOW DO I CHANGE THE FONT OF "Message to Display" IN THE Prompt User for Input

    Hi, HOW DO I CHANGE THE FONT OF "Message to Display" IN THE  Prompt User for Input? Thanks for your help  XN 

  • Process of login with ADF security

    Hi, I was looking at how to implement the process of Login with the ADF security using JDev 11g and I feel very good... My question is if it is possible to use this tool in case of use a container as Tomcat 6.x or JBoss. If it is possible to use ADF

  • CrystalReports XI release 2 Downloaded service pack setups don't work

    Hi I am an existing customer using Crystal Reports Developer XI Release 2. I tried to install latest Crystal Reports XI Release 2 service pack5 for windows and it did errored out between the install saying a cab file was corrupted. Tried couple times

  • Building SDK 1.4.0

    Has anybody ever built/compiled Java SDK 1.4.0 source code in Red Hat Linux (version 7.3 or 9)? Any idea where I can get some info about this? TQ

  • Error deploying dimension

    Hi I've installed OWB 9.0.4.8.21 on Win2K sp3 Using Deployment Manager I try upgrade dimension and getting error after deployment: oracle.wh.repos.sdk.exceptions.WBException oracle.wh.repos.sdk.exceptions.WBException      at oracle.wh.ui.runtime.WHRu