OAS and EJBs

I have an EJB that I want to run 24hours, that will do something say every 5 minutes. From what I understand, since OAS currently can only create session EJBs, once the above EJB is created, the link to it is lost (I have it automatically starting up through OAS).
Am I correct that with the current OAS, you can't have a java app running that you can later connect to and execute it's methods?

Am I correct that with the current OAS,
you can't have a java app running that you
can later connect to and execute it's
methods?No, this is not correct.
The Session based EJB simply means that the
EJB does not retian it's state when shut down (not made persistant). However, while it is up and running (e.g. a shopping cart), it can/does have a state and that EJB is available for clients to invoke the various methods. For example, a Business Components for Java Application deployed as an EJB (Session) onto OAS, this application can service multiple clients.
-John
null

Similar Messages

  • How to get Connection with Oracle8i In OAS through EJB?

    I've created a EJB in OAS,and invoked its method successfully.However,when I added a method using JDBC to get connection to Oracle8i,it failed.The source code is as below:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection l_connection = DriverManager.getConnection(......);
    then there is an Exception about omg.CORBA;
    but using the code in an application to connect to Oracle8i directly is ok.
    Would you please give me some advices?
    null

    Were you able to fix your problem?
    I am getting a similar error. I am using the Reference Implementation from J2EE SDK.
    I can connect to Oracle8i with JDBC in a Java Application but when I put my code in my Entity Bean, I get a NoClassFoundError on the oracle.jdbc.OracleDriver.
    Any suggestions?
    Al
    [email protected]

  • Want to run servlets, jsp and ejb

    Hi there, I have just installed Oracle9iAS on my PC and want to check how to use OAS with servlets, JSPs and ejbs, so can any one tell me where can I find some worked examples and step by step deployment process, any help would be appreciated, regards, Shabbier

    If you have installed Oracle9iAS, you should be able to get to the welcome page at
    http://<machine_name>:7778/
    You can see J2EE demos off that page.
    Also, you can find info about oracle9iAS and documentation
    at http://otn.oracle.com/products/ias/content.html
    OC4J info can be found at
    http://otn.oracle.com/tech/java/oc4j
    -Prasad

  • Diff b/w bc4j model and ejb model in adf11g

    hi all,
    iam murali iam new for adf 11g i have some dout's in adf11g ,can u please solve my probleam
    what is the difference b/w bc4j componet and ejb componet,how to develop ejb application in adf11g.

    ,how to develop ejb application in adf11gTake a look at this tutorial for starters:
    http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/ejb/ejb.html

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,
              I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
              XDoclet.
              In my current project I have the following piece of code
              in one of my message driven beans (code cited as pseudocode
              without unnecessary details):
              * @ejb.bean name="MyMessageProcessor"
              * display-name="Display name for a MyMessageProcessor"
              * jndi-name="ejb/MyMessageProcessor"
              * description="Bean MyMessageProcessor"
              * destination-type="javax.jms.Queue"
              * transaction-type="Container"
              * acknowledge-mode="Auto-acknowledge"
              * subscription-durability="Durable"
              * generate="false"
              * @ejb.transaction type="Required"
              public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
              public void onMessage(Message msg) {
                   try {
                        //obtaining connections to two different databases via JNDi
                        java.sql.Connection connOne =
                        ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                        java.sql.Connection connTwo =
                             ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                        // performing some UPDATEs and INSERTs on connOne and connTwo
                        // calling some other methods of this bean
                        //creating the reply JMS message and sending it to another JMS queue
                        Message msgTwo = this.createReplyMessage(msg)
                        this.queueSender.send(msgTwo);
                        //commiting everything
                        this.queueSession.commit();          
                   } catch (Exception ex) {
                   try {
                        if (this.queueSession!=null) this.queueSession.rollback();
                   } catch (JMSException JMSEx) {};     
                   this.context.setRollbackOnly();
              Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
              connection pool with non-XA jdbc driver. Everything worked fine
              including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
              to database and the incomming message was thrown back to the my bean's
              queue).
              When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
              participate in a global transaction. When I changed both datasources
              to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
              EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
              and the JMS message wasn't resent to the JMS queue.
              So here are my questions:
                   1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
                   Are there any global server configurations, which may influence this situation?
                   2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
                   (of course, if necessary)?
                   3. Are there any JMS Queue settings, which would disable the container to send message back to the
                   queue in case of setRollbackOnly()? How should be the Queue configurated?
              As I am new to the topic and the deadline for the project seems to be too close I would be grateful
              for any help.
              This message was sent to EJB list and JDBC list.
              Sincerely yours,
              Marcin Zakidalski

    Hi,
              I found these information extremely useful and helpful.
              The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
              Anyway, I still have some problems. I have made some changes to the
              code cited in my previous mail. These changes included changing QueueSessions
              to non-transactional. I also set the "Honorate global transactions" to true.
              I am using XA JDBC driver. After setting "Enable local transactions" to false
              (I did it, because I assume that JDBC transactions should be part on the global
              EJB transaction) I got the following error:
              java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
              driver supports performing SQL operations with no global transaction, explicitly allow it by setting
              "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
              transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
              complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
              I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
              the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
              My questions are as follows:
              1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
              thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
              from doing that? Can using setAutocommit(true/false) change the situation for better?
              2. How to encourage the JDBC driver to be a part of EJB transaction?
              3. As I have noticed each of ejb method has its own transactions (transactions have different
              Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
              way that if already started transaction exists it is used by the called method?
              4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
              impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
              enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
              solved programmically?
              Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
              I am loosing the ability to perform all actions in one transaction.
              Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
              Marcin

  • OC4J 9.0.3 and EJB 1.1 deployments???

    I can not deploy my ejb1.1 beans on 9.0.3 container.
    OC4J crashes with an XML parse error as a null pointer exception.
    If I remove my O-R mappings from my orion-ejb-jar.xml file, the container starts up ok (app wont run as it needs the mappings)
    9.0.3 docs claim I should be able to use my 1.1 ejb in this ejb 2.0 container.
    Solaris release notes for 9.0.3 claim I must migrate to ejb2.0
    Someone else posted this same question but got no replies.
    Anyone else deployed ejb1.1 with OR mappings in 9.0.3 successfully yet?
    thanks

    I have tried migrating to an ejb2.0 set of beans and ejb-jar.xml file.
    With no <query> tags installed for my finders I notice that a typical finder produces this:
    <!-- Generated SQL: "select Isp.isp_Id from Isp -->
    This is vastly different from the 1.1 orion-ejb-jar.xml which would list ALL column names in the finder - hence how am I going to do a findAll? The currently generated sql is way off. Deployment of the "ormap" demo also shows a lack of column names in the generated SQL finder methods in orion-ejb-jar.xml.
    Further, as soon as I introduce the query in the 2.0 version of ejb-jar.xml, the container dies with a null pointer exception. Removing this from the ejb-jar and bean deploys. Useless, cause theres no finders though.
    Also, attempts to add to the <finder-method query=...> tag yield container crashes with null pointers too.
    This is not very robust to say the least. Can you provide names of jar files that would cause such exceptions?
    When NO query tag is inserted in the ejb-jar file, attempts to run a sample client using findByPrimaryKey return successfully but use of findAll causes timeouts similar to whats described in
    "finders giving "timeout expired waiting for an instance" after 0, 1, or 2 calls" in this same forum.
    Heres the query out of the ejb-jar.xml file...
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    SELECT OBJECT(o) from IspTb o
    </ejb-ql>
    </query>
    IspTb is the <abstract-schema-name> Tables exist in db.
    The full error...which prevents deployment of the ejbs and hence no rewrite of the orion-ejb-jar file.
    =========
    10/23/02 1:54 PM: javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
    10/23/02 1:54 PM: java.lang.NullPointerException
    10/23/02 1:54 PM: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
    10/23/02 1:54 PM: at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:135)
    10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
    10/23/02 1:54 PM: at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:135)
    10/23/02 1:54 PM: at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getClass(PersistenceDescriptor.java:767)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getStateClass(PersistenceDescriptor.java:753)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getCMPFieldType(PersistenceDescriptor.java:1302)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.initializeFieldInfo(PersistenceDescriptor.java:1052)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getPersistentFieldInfo(PersistenceDescriptor.java:805)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:151)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
    10/23/02 1:54 PM: at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
    10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
    10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
    10/23/02 1:54 PM: at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:551)
    10/23/02 1:54 PM: at com.evermind.server.Application.postInit(Application.java:431)
    10/23/02 1:54 PM: at com.evermind.server.Application.setConfig(Application.java:136)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
    10/23/02 1:54 PM: at java.lang.Thread.run(Thread.java:479)
    10/23/02 1:54 PM: javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getClass(PersistenceDescriptor.java:770)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getStateClass(PersistenceDescriptor.java:753)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getCMPFieldType(PersistenceDescriptor.java:1302)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.initializeFieldInfo(PersistenceDescriptor.java:1052)
    10/23/02 1:54 PM: at com.sun.enterprise.deployment.PersistenceDescriptor.getPersistentFieldInfo(PersistenceDescriptor.java:805)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:151)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
    10/23/02 1:54 PM: at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
    10/23/02 1:54 PM: at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
    10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
    10/23/02 1:54 PM: at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
    10/23/02 1:54 PM: at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:551)
    10/23/02 1:54 PM: at com.evermind.server.Application.postInit(Application.java:431)
    10/23/02 1:54 PM: at com.evermind.server.Application.setConfig(Application.java:136)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1635)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1585)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1240)
    10/23/02 1:54 PM: at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
    10/23/02 1:54 PM: at java.lang.Thread.run(Thread.java:479)

  • ABAP Objects and EJB

    Hi every one,
    Can <b>ABAP Objects and EJB</b> be compared?
    -Naveen.

    Hi Naveen,
    Check this guide- might be useful-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dc09af90-0201-0010-d09b-bd611a11070b
    Regards,
    Moorthy

  • Using SWING and EJB

    Had nebody used Swing for GUI and EJBs for business logic. HEre i need to use Swing for gui rather than JSPs.
    Can nebody help??

    My question is ...
    How do u call EJBs from swing based applets..
    In J2EE transaction management cud be done at server side but how will we manage with the swing app??

  • OC4J EJBQL and EJB 2.0 features

    Hello Debu Panda and All
    I've got all howtos and I mangaged to get some parts of OC4J [Oracle9iAS (9.0.3.0.0) Containers for J2EE (build 020323.1689)] working.
    There are still some issues that are stalling our development. Could you please comment on them, maybe providing an estimate of when they will be solved/implemented?
    First of all, a little background. Our application uses many Java Swing application clients that connect to the EAR application in the container.
    The ear application has the following structure:
    All database access (Oracle 8i, located in its own server) is done exclusively by means of CMP entity beans. A entity bean may access other entity beans. There are workflow session beans (stateful and stateless) that access the entity beans. All clients see only the workflow session beans (session beans fagade).
    Our applicatoin is complex, having more than 80 session beans and more than 25 entity beans (not counting entity beans that exist only to represent relationships among entity beans).
    There goes the questions:
    1) It seems that entity beans cannot currently be referenced by remote interfaces. We couldn't deploy our application using it. Since we could use only local interfaces fot entity beans, thats what is been done now.
    2) There is no CMR supported. Is this true?
    3) EJBQL seems to be very limited. In the howto examples there are EJBQL statements that compare two numbers. However, when we tried to use String comparisons, it didn't work. Here is the statement:
    "SELECT DISTINCT OBJECT(p) FROM Person p WHERE p.name = ?1"
    If I compile, package and deploy the ear applicatin with the above EJBQL statement, OC4J generates an exception when executing the finder method. The exception is:
    "java.rmi.NoSuchObjectException: Session has timed out
    at com.evermind.server.ejb.StatefulSessionEJBObject.throwPassivisat
    ception(StatefulSessionEJBObject.java:188)
    at Cad023Remote_StatefulSessionBeanWrapper0.obterPessoasPorParteNom
    023Remote_StatefulSessionBeanWrapper0.java:754)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:8
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)"
    If I remove the where clause, the expection is gone. However, I get all records. ;-)
    4) It seems that all EJBQL clauses must be capitalized. Is this true?
    FINALY)
    Is there a newer OC4J build that could use to get the development going? Do you know where there will be one? Is there any way of contacting the OC4J development team to report bugs?
    If you would like, we could discuss it in private e-mail (please use my private mail [email protected]).
    Thanks for your attention,
    Luis Fernando Soeiro
    Hi !! OC4J 9.0.3 developer's preview has most features of EJB 2.0. We are working on updating on our docs and samples for EJB 2.0
    Please look at the following URL that has some How Tos on EJB 2.0 features such Local Interfacea, EJB QL, etc : http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-how-to.html#ejb
    regards
    Debu Panda
    Oracle --------------------------
    Luis Soeiro <mailto:[email protected]> <mailto:[email protected]>Type : Question Date : Apr 11, 2002 15:15 PT Hello
    Some colleagues and I are trying to port a large project from JBOSS to OC4J. We used JBOSS 3.0 (beta) in order to evaluate EJB2.0 features and see if we could use it. We already have OC4J in production, but only as a JSP/Servlet container. The next step would be to deploy our EJB application to OC4J.
    We have read the material and it is written that OC4J (developers preview) is EJB 2.0 compliant. However, the specific documentation and the examples don't show how to specify OC4J specifc XML files. We absolutely need CMR and Local Interfaces, because we don't have the time required to downgrade our JBoss EJB2.0 application to the EJB 1.1 specification. We have over 80 Session Beans and over 20 Entity Beans.
    Is there anybody there that can confirm that OC4J developer's preview is really EJB2.0 compliant? If so, could you send me some pointers to information about OC4J container specifc deployment descriptors? The docs listed at the web site don't have EJB2.0 features listed, nor does the Oracle samples.
    Thanks for your attention,
    desperately,
    Luis Fernando Soeiro

    HI,
    I worked out CMR and EJB-QL with single bean.
    Using CMR, it is possible to get one bean reference through other bean, but
    When I tried EJB-QL with bean to bean navigation then I run into problem.

  • Global transactions in OSB and EJB 2.1

    Hi,
    My team is working in a SOA service based on OSB 11g (11.1.1.5) using DB JCA Adapter and EJB 2.1 over WLS 10g(WLI environment). The logic of the service works in this way:
    1. A table in a database (XE) is polled by the DB Adapter which starts the service (1 row = 1 message).
    2. The message contains a collection of items to be inserted in another Oracle database.
         Once a message/row is picked, and after some steps (logging, validation,etc), there is a for..each action which extracts each item of the collection and executes a service callout action to a business service.
    3. This business service uses EJB protocol to call an EJB (2.1 + WLS Extensions). The EJB is deployed in another domain (WLS 10.3.0/10g and Oracle BEA drivers)  and only executes an store procedure with the parameters based on the message and inserts these values in a table.
    4. Once the for...each finishes, there is a call to another proxy service which marks the message/row as "processed" in the source table. This update is done via DB JCA also.
    5. In case of an error, the error handler of the proxy service calls the proxy service mentioned above to mark the row as "Failed" (in fact there is a retry mechanism, but it's not important for now).
    The service requires to work inside a global transaction. The main requirement is that the collection of items should be processed as "All or None", so basically we're using the options to manage the global transaction. However, the problem is that it's failing to rollback the whole insertion of items when an error is simulated. It only rolls back the last insertion/execution of SP.
    Additionally, the proxy service that should mark the row as FAILED, never updates this one, and the tables stay locked until we modify one of the store procedure in order to avoid the simulated error and commit the transaction.
    The EJB uses WLS extensions with the annotations to "transaction required". The proxy service has the option transaction required also. The database drivers are all XA and we're testing against Oracle11g XE (however, the EJB destiny will be Oracle 8i in production).
    We have tried different alternatives, splitting the logic in different proxies (Proxy services for JCA, Proxy with For Each for EJB, etc), isolating the specific part with the EJB call, without success.
    The security between domains is set as Global Trust.
    Do you have any idea, example or suggestion about this problem? Is EJB really supported in Global Transactions and XA?
    Thanks in advance.

    where do you find the J2EE Connector 1.5 compliant
    Resource Adapter?I wrote the compliant adapter myself. Hey Steve,
    Were you able to find a solution for this problem. I am struggling with the same problem with the RI Beta implementation.
    Sandeep

  • ADF and EJB. Why so little samples / information

    Hi All,
    I was wondering if other JDev / ADF developers have the same feeling as me in regards to ADF / EJB.
    There is barely enough information and examples on using ADF with EJB. Seems that most examples and blogs are related to BC instead.
    I was reading an article (sorry, don't have the link to it) not long ago that an Oracle Executive was asked if BC or EJB was Oracle's future and EJB was the answer. However, that doesn't seem to be the what most blogs and sample are about.
    I know that BC has tight integration with ADF, but it's not a standards based back-end framework. We are locked in the ADF UI for all of our development, but not touching BC at all. All code is EJB compliant.
    So, my request is:
    - comments? do other developers out there feel the same way?
    - bloggers, the great articles from "Frank Nimphius" and "Andrejus Baranovskis", not to mention others, can you guys post a little more on using ADF with EJB?
    BTW: great article on that "http://www.oracle.com/technology/products/jdev/tips/fnimphius/ControlHintsWithPojos/controlHintsWithPojos.html" (How-to find and set control hints on POJO entities in bean Data Controls)
    Thanks and Regards
    Jonny Oenning

    Hi!
    I rised this issue long time ago - with TP3 I noticed regression in EJB/JPA support with ADFm (binding layer as referred by Shay). Following the development, I draw this conclusions:
    1. Oracle is oriented toward J2EE standards, including the strategic orientation to EJB/JPA. The team that managed JDev 11g initial development phases was oriented toward EJB (but was replaced/fired sometime between TP2 and TP3).
    2. Oracle decided that FMW 11g stack products as well as EBS migration from PL/SQL to EJB is not feasible in short time frame (I think that was poor judgment). So, the BCs got the push over the EJB and TP3/4 was biased toward BCs. Even the default Fusion technology stack is changed - in TP1/2 the Fusion Web project was ADF RC + EJB buy default and then changed to ADF RC + BC4J. Also the development guides were "rephrased".
    3. As BC4J are proprietary Oracle technology, the are lacking many J2EE standard features and many strong points of the modern multi-tier architecture. Many developers are witnessing the performance / scalability issues as the BC4J are basically a mutant: they are SQL based concept wrapped into EJB for deployment! But they are not relaying on proven scalable J2EE technologies (like JPA/JTA, object caching etc.). They are trying to reinvent the wheel, decalratively offering the heaven of J2EE multi-tear architecture to old fashion SQL-focused architects/developers. But it is just a marketing - the truth is that BC4J are not and cannot be the replacement for proven J2EE architecture. They are trying to mimic the concepts of J2EE (like object-entity mapping, like JTA/JPA, like scalability and caching, transparent web-services exposition etc.) but they are lagging behind even J2EE 1.4 and we are facing the J2EE 6 in few months!
    4. Oracle is aware that EJB is the future but they are trying to bridge the gap between their legacy code written mainly in PL/SQL. So they developed and they are developing the JDeveloper 11g in fashin that should support and serve for their primary goals - migration of their own old PL/SQL based products to new, J2EE, world (of BEA!).
    So, anyone who is expecting the that Oracle JDeveloper is what they are marketing (full scale J2EE IDE) - is going to waste some time and money waiting the Oracle to finish it's half-way migration from PL/QL and Forms/Reports to PL/SQL + ADF RC! In few years from now.
    Thus, if you need efficiency in J2EE standards development - try something else than JDeveloper. Or, as suggested by Shay, don't use overmarketed ADFm as it is not compatible with EJBs in scalable / clustered deployment! Yes, that is proven issue (but I wont elaborate here as it is already well elaborated in this forum in another tread but the Oracle guys wisely neglected that issue).
    And beside few very very old and for me useless blog entries (one of which is not working in 11g as you may read in comments) there will be no much support for EJBs in this release of JDeveloper - I can bet!
    But, as final message to the public, I'm still stuck with JDev and EJBs as. When you develop you own patterns, it is still the best combination for developing the scalable, high performance apps on Oracle FMW 11g platform - mandatory including several grid technologies that are making the difference in scalability of true J2EE apps and quasi-J2EE "Fusion" apps based on BC4Js "silently" wrapped in EJBs for deployment.
    Regards,
    PaKo

  • Using JMX to read ejb manifest jar and ejb-jar.xml in ejb jar inside ear

    Hello,
    I have an ear deployed on weblogic console. I need to check contents of manifest file and ejb-jar.xml of a jar that is present in the deployed ear.
    Currently I am using below code to access jar inside ear deployed :
    Hashtable env = new Hashtable(5);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    url);
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    Context ctx = new InitialContext(env);
    mBeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    String type = "EJBComponentRuntime";
    Set beans = mBeanHome.getMBeansByType(type);
    try{
    for(Iterator it=beans.iterator();it.hasNext();)
    EJBComponentRuntimeMBean rt = (EJBComponentRuntimeMBean)it.next();
    if(rt.getParent().getName().equals("xxx")){
    System.out.println(rt.getName());
    l.add(rt.getName());
    Here xxx is the ear. Now I need to get inside the jar (represented) by variable rt and access its manifest file,ejb-jar.xml
    Does anyone have an idea how to do this?
    regards
    Sameer

    Isn't it possible to put them there manually? :)

  • SAS9.1 Persistence and EJB lookups (not registered in JNDI?)

    I am trying to deploy a very basic EJB3 module to test my learning. The module deploys via the Admin Console without apparnet error. Unfortunately, when using the generated test page for the web-service, I am having total failure which seems to be around the persistence unit and EJBs not being created in the JNDI.
    I have an @Stateless/@WebService bean:
    package com.flexit.buslogic;
    import java.util.logging.Level;
    import javax.ejb.Stateless;
    import javax.ejb.EJB;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import com.flexit.persistence.eao.OwnerFacade;
    @WebService
    @Stateless
    public class CreateOwner {
         @EJB
         private OwnerFacade ownerFacade;
         public CreateOwner(){}
         @WebMethod
         public Integer addOwner (
                   @WebParam(name="Name") String name){
             LogUtil.log("Add owner request " +
                        "received for "+name,
                        Level.INFO, null);
            return ownerFacade.findAll().size();
    }The OwnerFacade EJB injection fails with avax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJBIf I instantiate a 'normal' reference to OwnerFacade (ie OwnerFacade ownerFacade = new OwnerFacade(); I get a similar error in the OwnerFacade EJB in relation to an attempt to inject an EntityManager:
    package com.flexit.persistence.eao;
    import java.util.List;
    import java.util.logging.Level;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import com.flexit.persistence.LogUtil;
    import com.flexit.persistence.Owner;
    @Stateless
    public class OwnerFacade implements OwnerFacadeLocal, OwnerFacadeRemote {
         // fields
         @PersistenceContext(unitName="FlexIBuildPU")
         private EntityManager entityManager;
         public OwnerFacade () {
              if (entityManager == null) {
                   LogUtil.log("unable to get an Entity Manager Instance", Level.SEVERE, null);
    ...The constructor logs that the entityManager is, indeed, null.
    I have tried the code on SAS9 and 9.1 and using the default JavaDB and a MySQL connection pool (successful ping) and datasource (named 'jdbc/FlexDBDS') created through the Admin Console. The persistence unit is defined in a persistence.xml file in the META-INF folder:
    <?xml version="1.0" encoding="UTF-8"?>
         <persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
             http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
              <persistence-unit name="FlexIBuildPU" transaction-type="JTA">
                   <jta-data-source>jdbc/FlexDBDS</jta-data-source>
              </persistence-unit>
    </persistence>Can anyone please save me from tearing my hair out (more)?

    Have managed to resolve. There were two problems
    First I was attempting to access a session bean directly rather than via an interface (eejit!) - ie:
    @EJB OwnerFacade ownerFacadewhen it should have been:
    @EJB OwnerFacadeLocal ownerFacadeSecond, the persistence unit wasn't created properly. In playing around with persistence.xml I moved from:
    <?xml version="1.0" encoding="UTF-8"?>
         <persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
             http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
              <persistence-unit name="FlexIBuildPU" transaction-type="JTA">
                   <description>This unit manages BMS units, owners, offers, and acceptance.</description>
                   <jta-data-source>jdbc/FlexDBDS</jta-data-source>
                   <properties>
                          <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
                          <property name="toplink.ddl-generation" value="create-tables"/>
                     </properties>
              </persistence-unit>
    </persistence>to:
    <?xml version="1.0" encoding="UTF-8"?>
         <persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
             http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
              <persistence-unit name="FlexIBuildPU" transaction-type="JTA">
                   <description>This unit manages BMS units, owners, offers, and acceptance.</description>
                   <jta-data-source>jdbc/FlexDBDS</jta-data-source>
                   <properties>
                          <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
                          <property name="toplink.application-location" value="C:\ddl\flexdb\"/>
                          <property name="toplink.create-ddl-jdbc-file-name" value="create.sql"/>
                          <property name="toplink.drop-ddl-jdbc-file-name" value="drop.sql"/>
                          <property name="toplink.ddl-generation.output-mode" value="both"/>
                          <property name="toplink.ddl-generation" value="create-tables"/>
                     </properties>
              </persistence-unit>
    </persistence>It seems the very action of writing the sql to file helps with the binding. It seems so extraordinary that I think I must of made another mistake which was corrected along the way. In any event, the properties specifying output files may prove useful to others. :)

  • Database and ejb access in Input Processor, custom Validator

    Hi guys,
    I know the Portal docs recommend that database and ejb calls should be done in
    a Pipeline Component. Are transactions the only concern?
    I'd like to validate two fields. This can be easily accomplished by a an ejb
    method call that returns a boolean for one, and by running a simple select statement
    for the other. Are there any risks to creating custom validator classes to do
    this?
    Thanks

    David,
    Here are the characterstics of Pipelines and IPs:
    Inputprocessors:
    - Web App scope (classloaded by webapp classloader)
    - simple java class
    Pipelines/Pipeline Components:
    - Enterprise App scope (available to all webapps)
    - java class or EJB
    - can be transactional (can even rollback PipelineSession)
    - Pipelines executed from within the EJB container
    There is nothing illegal about putting EJB calls and JDBC calls into an Inputprocessor.
    For simple validation, this is probably okay. However, when doing heavy business
    logic, having the Pipeline manage a single transaction for your PCs is wonderful.
    PJL
    "David Sun" <[email protected]> wrote:
    >
    Hi guys,
    I know the Portal docs recommend that database and ejb calls should be
    done in
    a Pipeline Component. Are transactions the only concern?
    I'd like to validate two fields. This can be easily accomplished by
    a an ejb
    method call that returns a boolean for one, and by running a simple select
    statement
    for the other. Are there any risks to creating custom validator classes
    to do
    this?
    Thanks

  • Load-balancing and fail-over between web containers and EJB containers

    When web components and EJB components are run in different OC4J instances, can we achieve load-balancing and fail-over between web containers and EJB containers?
    null

    It looks like there is clustering, but not loadbalancing available for rmi
    from the rmi.xml configuration. The application will treat any ejbs on the
    cluster as one-to-one look-ups. Orion will go out and get the first ejb
    available on the cluster. See the docs on configuring rmi.xml (and also the
    note below).
    That is a kind-of failover, because if machine A goes down, and the
    myotherAejbs.jar are on machine B too, orion will go out and get the bean
    from machine B when it can't find machine A. But it doesn't go machine A
    then machine B for each remote instance of the bean. You could also specify
    the maximum number of instances of a bean, and as one machine gets "loaded",
    orion would go to the next available machine...but that's not really
    loadbalancing.
    That is, you can set up your web-apps with ejbs, but let all of the ejbs be
    remote="true" in the orion-application.xml file:
    <?xml version="1.0"?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application
    runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">
    <orion-application deployment-version="1.5.2">
    <ejb-module remote="true" path="myotherAejbs.jar" />
    <ejb-module remote="true" path="myotherBejbs.jar" />
    <ejb-module remote="true" path="myotherCejbs.jar" />
    &ltweb-module id="mysite" path="mysite.war" />
    ... other stuff ...
    </orion-application>In the rmi.xml you would define your clustering:
    <cluster host="230.0.0.1" id="123" password="123abc" port="9127"
    username="cluster-user" />
    Tag that is defined if the application is to be clustered. Used to set up
    a local multicast cluster. A username and password used for the servers to
    intercommunicate also needs to be specified.
    host - The multicast host/ip to transmit and receive cluster data on. The
    default is 230.0.0.1.
    id - The id (number) of this cluster node to identify itself with in the
    cluster. The default is based on local machine IP.
    password - The password configured for cluster access. Needs to match that
    of the other nodes in the cluster.
    port - The port to transmit and receive cluster data on. The default is
    9127.
    username - The username configured for cluster access. Needs to match that
    of the other nodes in the cluster.

Maybe you are looking for

  • Enhance Retro Pay for Global Legislation?

    Hi, Is 'Enhance Retro pay' process available fro Global legislation if yes then how to configure it. Regards Majid

  • Get question id's and its corresponding answer id for given Doc id's

    Hi, I am trying to write a program which gets the  Equality values (Questionaire - Erecruiting) like : 1) Gender 2) Care Resp 3) Care Type 4) Ethnic Origin 5) Religion 6) Disability 7) Sexual Orientation 8) Age Range And move it to an internal table

  • Extend Profit center validity periods

    Hi All, I have a requirement to extend  the Profit centers validity period. for example I have created the Profit center with validity date from 01.01.2010 to 31.12.9999. I have loaded the data with these dates, there is no issue in this. I have new

  • How to embed RSS to my page

    Hello, I would like to embed a RSS into my page as a region. Is there anyway to do that ? Thank you.

  • More than 1 pdf, more than 1 menu?

    Hello: As a test, been trying to get my DVD SP 2 project to open a pdf (in Apple DVD player before I burn) and I can't even get it to do this...but ultimately, I would like to have about 6 different folders containing maybe 14 total pdfs to be access