Deploy PetStore Webapps and EJBs to different tiers

Hi,
Basically, the PetStore example deploys JSP/Web/EJBs to one node in one petstore.ear.
I want to seperate the Web apps and EJBs to different nodes that running Weblogic
by re-packaging the ear file to get a war file and ejb ear file. I deployed this
war file to one node and ejb ear to another node. Is this the right approach?
If so, how the JSP knows that the EJBs are in different node now?
Thanks,
Cathy

Hi,
Basically, the PetStore example deploys JSP/Web/EJBs to one node in one petstore.ear.
I want to seperate the Web apps and EJBs to different nodes that running Weblogic
by re-packaging the ear file to get a war file and ejb ear file. I deployed this
war file to one node and ejb ear to another node. Is this the right approach?
If so, how the JSP knows that the EJBs are in different node now?
Thanks,
Cathy

Similar Messages

  • Servlet and EJB on different machine: Security propagation

    Hi all,
    I have an application, where my servlets and EJBS are deployed on the same machine.So
    when in my servlet a user need to authenticate himself, security credentials are
    propagated to the EJB automatically.I'd like to know in the case where the components
    are on different machine if I need to put the credential in my InitialContext
    when my servlet calls my EJB or if it is also done automatically.
    Cheers
    romain

    Say your stub is in a jar called stub.jar.
    You need to put that stub somewhere that it can be reached through a protocol for which Java has a URL type - so you can put it on a shared file system and use a file URL or behind an http server and use an http URL.
    Let's use http - put stub.jar at the docroot of a web server.
    Then, when you start your SERVER code, include this VM parameter:
    -Djava.rmi.server.codebase="http://<serveraddress>stub.jar"
    Now your client will be able to use http to load the stub file out of stub.jar through http.
    If you do use a file URL, make sure the shared directory you put your jar in is not on the client's classpath.

  • Deployment of same Ear/Ejbs behaving differently in different machines.

    I have configured an ejb and introduced only local interface for the same. All the localhome, localinterface and ejb implementation classes are packaged inside myejbs.jar. This is placed inside myapp.ear .
    //MyEjbLocal.java
    public interface MyEjbLocal extends  EJBLocalObject {
        public void someMethod() throws MyRemoteException;
    //MyRemoteException.java
    public class MyRemoteException extends RemoteException{
    }When try to deploy this under weblogic9.2, it fails with following exception,
    weblogic.ejb.container.compliance.ComplianceException: In EJB MyLocalSession, method someMethod() defined in the local interface must not include java.rmi.RemoteException in its throws clause.
         at weblogic.ejb.container.compliance.EJBObjectClassChecker.checkMethodsThrowRemoteException(EJBObjectClassChecker.java:182)
    Which is expected, since local interfaces should not throw RemoteExceptions, they should throw EjbException. ( as per specification ).
    But the question here is, the same ear is being successfully deployed in some other machines. Dont knw how....
    When I checked my server log I found out that, weblogic server is failing to deploy ejbs when it is trying to compile ejbs
    *'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1247035767016> <BEA-010087> <The EJB deployment named: myejbs.jar is being recompiled within the WebLogic Server. Please consult the server logs if there are any errors. It is also possible to run weblogic.appc as a stand-alone tool to generate the required classes. The generated source files will be placed in /data/weblogic92/user_projects/domains/mydomain/servers/myserver/cache/EJBCompilerCache/12z5b5x2cmp3g.>*
    But the same log is not present in other machines where it is deploying successfully.
    Any idea on what could be the reason??? Why it is not working in my system??
    All the machines are using same Weblogic version i.e. 9.2

    Thanks Guys.
    I have found the root cause of this issue i.e even though mapping program is same in 2 environments,standard functions(i.e concat Text function)  behaviour may change based on support package versions.
    As i explained in previous posts
    (QA mapping program not generating some of the node in IDOC as DEV does, basically its SOAP to IDOC mapping)
    QA(PI7.0 SP15) and DEV(PI7.0 SP10) have different Java support package stacks, especially SAP_XITOOL component.
    Untill PI7.0 SP10 concat standard function was working for Queue values but in next SP releases it wasn't working(SAP made it Value function i guess, no where its documented by SAP as far as i know).
    So I am sending this issue to SAP.
    Cheers,
    Jag
    Edited by: jag on Sep 18, 2008 11:24 AM
    Edited by: jag on Sep 18, 2008 11:39 AM
    Edited by: jag on Sep 18, 2008 11:42 AM

  • Same EAR deployed on Win2K and Solaris works differently

    Hi,
    Deplying the same EAR, using the same deployment ant script, on 2 WLS 7.0 SP4
    on respectively Win2K and Solaris 8. While the Win2K application works correctly,
    the Solaris deployed one throws a ClassNotFound exception. The CLASSPATH is the
    same on both systems. Is there any special requirement or any post-installation
    task to be performed for Solaris ?
    Kind regards,
    Nicolas DUMINIL

    Strange as it is, we still need a stack trace. ;)
    Do you have one for the solaris CNF exception?
    cheers
    mbg
    "Nicolas DUMINIL" <[email protected]> wrote in message
    news:3f8ad0b0$[email protected]..
    >
    Hi,
    As an XML application, the deployed application uses JDOM. In the beginingI used
    to deploy JDOM together with the application, in the same EAR andreferencing
    it from MANIFEST.MF. Later I noticed that JDOM deployment was notmandatory and
    I thought that the server already had it inside. At this time I wasdeveloping
    on Win2K workstations. Now I'm going live on a Solaris server and the JDOMdeployment
    suddenly became mandatory. So, to resume, I don't need to deply JDOM onthe WebLogic
    7.0 SP4 for Win2K and everything works fine, but I need to deploy JDOM onthe
    WebLogic Server 7.0 SP4 on Solaris in order to avoid ClassNotFoundexceptions.
    Strange enough isn't it ?
    Kind regards,
    Nicolas
    "Ali Akbar" <[email protected]> wrote:
    Hello Nicolas,
    There should not be any special requirement for Solaris platform. Can
    you
    please attach the stack trace?
    "Nicolas DUMINIL" <[email protected]> wrote in message
    news:3f8679c5$[email protected]..
    Hi,
    Deplying the same EAR, using the same deployment ant script, on 2 WLS7.0
    SP4
    on respectively Win2K and Solaris 8. While the Win2K application workscorrectly,
    the Solaris deployed one throws a ClassNotFound exception. The
    CLASSPATH
    is the
    same on both systems. Is there any special requirement or anypost-installation
    task to be performed for Solaris ?
    Kind regards,
    Nicolas DUMINIL

  • Webdynpro and EJB on different server

    I have a WebDynpro app that will be deployed to server A  and that has to access an EJB that will be deployed to server B, server A and server B don't from a cluster.
    I don't know how to call the EJB in my WebDynpro app via remote way.
    in WebDynpro app  call EJB code is:
         String result = null;
         Context ctx = null;
         Hashtable env = new Hashtable();
         PIEJB remote = null;
         PIEJBHome remoteHome = null;
         env.put(
              Context.INITIAL_CONTEXT_FACTORY,
              "com.sap.engine.services.jndi.InitialContextFactoryImpl");
         env.put(Context.PROVIDER_URL, "sapides:50304");
         env.put("force_remote", "true");
         try {
              ctx = new InitialContext(env);
              remoteHome =
                   (PIEJBHome) PortableRemoteObject.narrow(
                        ctx.lookup("PIEJBBean"),
                        PIEJBHome.class);
              remote = remoteHome.create();
              result = remote.getPIAvg("yesterday", "today").getValue();
         } catch (Exception e) {
              result = e.toString();
         wdContext.currentContextElement().setTest(result);
    when run this code,report error:
    java.lang.NoClassDefFoundError: com.xxx.piejb.PIEJBHome
    but i have add the piejb.jar in Used DC!
    can anyone tell me how to do?
    thanks advance!

    Hi Ha
    I just tested the link and it worked fine for me, if you want it, you can give an email and i'll send the pdf guide to you. Besides here you can find a guided example about calling the webserivces methods  from a WD on the Using the Car Rental Web Service with Web Dynpro, and on this one you can find information about the development of a webservices using an ejb.
    Hope it Helps
    Luis Barragá

  • Deploy problem - CSS and overall look different on development machine

    Hi.
    My ADF app looks nice on my development machine. However, when I deploy it to weblogic server, CSS or something seems to be missing (for example, I lost nice textfield look)
    Did I forget to turn on some deployment setting?
    BR
    Edited by: user509804 on 22.4.2011 12:54

    chk for all the files...it seems u hv missed out on some css

  • Automatic ejb redeploy when deploying a webapp

    Hi all,
    I' got a problem with bea 6.1 webapp deploy/redeploy.
    When, from console, I upload the war the server undeploy and redeploy an EJB,
    then try to deploy the war.
    The ejb is used by the webapp and in the war (in WEB-INF/classes) there are the
    EJB interfaces.
    Is this correct ?
    The real problem is that I have to deploy on a 2 node cluster. Deploying from
    console automatically target the admin server, the EJB fail the redeploy and the
    webapp is not deployed on the nodes.
    I tryed to undeploy the EJB before deploying the webapp and another EJB (not related
    to the webapp, developed here, not from bea) id redeployed ! :|
    Any idea ?
    Thanks
    Lorenzo

    Lorenzo,
    Have you considered using an Enterprise Application (EAR) which includes both your web
    app and your ejbs? This way you can undeploy and redeploy at the application level and
    let the server worry about the deployment order. See:
    http://edocs.bea.com/wls/docs61/programming/packaging.html#1029830
    You can turn off the automatic deployment to the admin server. Please read:
    http://edocs.bea.com/wls/docs61/adminguide/appman.html#1029683
    I hope this helps.
    Regards,
    Velvet
    Developer Relations Engineer
    BEA Systems
    "\"lorenzo bolzani\" lorenzo.bolzani-at-ethink.it" wrote:
    Hi all,
    I' got a problem with bea 6.1 webapp deploy/redeploy.
    When, from console, I upload the war the server undeploy and redeploy an EJB,
    then try to deploy the war.
    The ejb is used by the webapp and in the war (in WEB-INF/classes) there are the
    EJB interfaces.
    Is this correct ?
    The real problem is that I have to deploy on a 2 node cluster. Deploying from
    console automatically target the admin server, the EJB fail the redeploy and the
    webapp is not deployed on the nodes.
    I tryed to undeploy the EJB before deploying the webapp and another EJB (not related
    to the webapp, developed here, not from bea) id redeployed ! :|
    Any idea ?
    Thanks
    Lorenzo

  • Deploying EAR and EJB (ClassLoader Question)

    Hi,
    Have a few queries. Appreciate any quick answers.
    (a) To deploy a EAR or EJB jar to WebLogic server, is it necessary to include the jar location specifically in $CLASSPATH?
    I think not. Am I correct?
    (b) Is the bean/EAR deployed at module level? Is there a setting for this - is it at bean deployment descriptor? Where can I find this?
    If (say) I need to update an EJB, do I un-deploy, update and re-deploy it?
    Or must I restart the entire WLS container?

    --> An EAR includes one or more EJB files. You don't need to specify the location because it's contained at application.xml file inside the EAR.
    --> Each bean has a deployment descriptor. You can see it at META-INF directory
    If you need to update an EJB (that it is not part of and EAR), you are right.
    The WLS container not need to be restarted.
    Jin

  • Starting up j2ee and EJB deployment tool on Windows 98

    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

    You're going to have a lot of pain unless you upgrade to Windows 2000 or XP.
    In the mean time, set your environment size much larger (google for "Out of
    environment space") and use WinOne from http://www.cia.com.au/luke/ ...
    that's how I scraped by on Windows 98 for a while.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Tim" <[email protected]> wrote in message
    news:[email protected]..
    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

  • Packaging/deploying a webapp client to already deployed EJBs

    I have a webapp/ejb deployed on WLS 6.1. If it matters, the EJBs are
    deployed in jar files but the webapp component is deployed in exploded
    directory format.
    Now I want to deploy another webapp that uses the same EJBs. At this
    point in development, I am attempting to deploy this in exploded
    directory format as well. I have run ejbc manually against the original
    jars to create the EJB deployable units containing generated WL classes.
    This also created a ejb-client.jar, but it does not contain any impl
    classes for the home or remoted interfaces.
    I tried placing the ejb-client.jar in my WEB-INF/lib but it doesn't seem
    to be able to find the interface classes. Perhaps the exception I'm
    getting does not mean what I think it does. It is included below.
    I also tried adding the generated impl classes to the ejb-client.jar
    manually, but this didn't work either. I have read the
    packaging/deploying docs but don't seem to find this issue addressed
    directly. From all I know, I have done this correctly, but obviously I
    am missing something somewhere.
    Thanks in advance for your consideration.
    <May 10, 2002 1:53:57 PM CDT> <Error> <HTTP>
    <[WebAppServletContext(9605583,adminApp,/adminApp)] Servlet failed with
    Exception
    java.lang.ExceptionInInitializerError
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:42)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:30)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:277)
    at java.lang.Class.newInstance0(Class.java:301)
    at java.lang.Class.newInstance(Class.java:254)
    at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:342)
    at javax.rmi.CORBA.Util.<clinit>(Util.java:54)
    at
    javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
    at
    javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:61)
    at
    net.verizon.storm.util.DataBroker.initialize(DataBroker.java:102)
    at
    net.verizon.storm.util.DataBroker.getInstance(DataBroker.java:158)
    at
    net.verizon.storm.util.OrderDispatcher.<init>(OrderDispatcher.java:70)
    at
    net.verizon.storm.admin.OrderService.startOD(OrderService.java:159)
    at
    net.verizon.storm.admin.OrderService.processRequest(OrderService.java:104)
    at
    net.verizon.storm.admin.OrderService.doPost(OrderService.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Caused by: java.lang.RuntimeException: could not find or instantiate any
    UtilDelegate class
    at
    weblogic.iiop.UtilDelegateImpl.<clinit>(UtilDelegateImpl.java:72)
    ... 24 more

    Hi.
    I tried placing the ejb-client.jar in my WEB-INF/lib but it >>doesn't seem to beable to
    find the interface classes. Perhaps
    the exception I'm getting does not mean what I think it does. >>It is includedbelow.
    It seems fine since it is the way your webapp always to use its EJB client jar.
    I also tried adding the generated impl classes to the ejb-
    client.jar manually, but this didn't work either.Nope, you should never do this since Impl classes are used on Server Side ( webapp
    treated as client of EJB in this case ) only.
    It is so hard for us to analyze the problems without a test case, I would suggest
    you to create a support case via http://support.bea.com/welcome.jsp to BEA support
    for detailed work.
    Thanks.
    Ji Zhang
    Developer Relations Engineer
    BEA Support

  • In a single program how to lookup different EJB from different application

    Hi,
    I have deployed two applications app1 and app2 on oc4j.
    There is a stateless session bean in a1 called ejb1.
    And there is also a stateless session bean ejb2 in app2.
    I write a test jsp in app1 to lookup ejb1 and ejb2 as an application client. So I need to create an application-client.xml for it.
    <?xml version="1.0"?>
    <!DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
    <application-client>
    <display-name>ejbs</display-name>
    <ejb-ref>
    <ejb-ref-name>ejb1</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>class_of_ejb1Home</home>
    <remote>class_of_ejb1</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb2</ejb-ref-name>
    <ejb-ref-type>ejb2</ejb-ref-type>
    <home>class_of_ejb2Home</home>
    <remote>class_of_ejb2</remote>
    </ejb-ref>
    </application-client>
    However, When I run the test.jsp, It will report following error:
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2
    In fact, if I only lookup any of the ejb and the application-client.xml just specify only the according ejb-ref, everything is alright.
    But how to construct the application-client.xml so that it can suitable for 2 different ejb in different application? Do I miss something in doing it?
    Kindly advice!
    Queeny Tang

    Hi Debabrata Panda,
    I did add parent in web.xml, but it still encounter
    "Error reading application-client descriptor: No location specified and no suitable instance of the type 'class_of_ejb2' found for the ejb-ref ejb2"
    In my program, a jsp in app2 will lookup ejb1 of app1. In the same way, a jsp in app1 will lookup ejb2 of app2.
    if I declare in server.xml
    <application name="app2" path="../applications/app2.ear" parent="app1" auto-start="true" />
    <application name="app1" path="../applications/app1.ear" parent="app2" auto-start="true" />
    That will cause error reading application-client.xml for all
    ejbs.
    How to solve this.
    Thanks in advance!
    Yours Queeny

  • 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)

  • 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

  • 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

  • Can I upgrade graphics card of my Laptop?

    Hi folks, I want to know whether I can upgrade graphics card of my laptop. Now a days most of the high end games are not working in my laptop and I'm pretty disappointed. Please let me know whether I can do that. My laptop model is HP Pavillion DV5 1

  • Logic to print data in required format for XML

    Hi, Please find the xml format: <ListOf_ssFsInvoice> <ssFsInvoice> <ListOf_ssFsInvoiceLineItems> <ssFsInvoiceLineItems> <ListOf_ssFsInvoiceLineItemDetails> <ssFsInvoiceLineItemDetails> <ssDnrmPartBillingType>Paid</ssDnrmPartBillingType> <ListOf_ssFsI

  • Overlapping two JPanels on a JLayeredPane

    I am having some problems overlapping two JPanels on a JLayeredPane for some reason only one of them shows when I compile the program! Any help would be greatly appreciated The code is the following: import java.lang.*; import javax.swing.*; import j

  • Database Mirroring Login Accounts

    I need to setup database mirroring between 2 separate SQL 2012 instances. The documentation states that if the 2 server instances are running under different user accounts then these need to be manually created on both instances. Is this login accoun

  • How to play Vortex on my G5 30" display...anyone... anyone... ???

    DOES ANYONE KNOW HOW TO PLAY VORTEX FROM iTunes to 5th gen iPod back to powermac G5 out to my 30 display??????? help sufferer of small screen-itus need bigger more better ..... mahalo