Can JDO replace Entity beans.

I feel that while designing a J2EE application, using the Java Data Objects alongwith Entity beans is somewhat redundant. Is it so or there is any reason behind this architecture?

EJB's strength is component transactions. JDO's strength is data object encapsulation. JDO holds forth the potential to standardize OR mapping. The design decision tree is as follows:
1. Will EJB manage connections and transactions or will the app do it manually?
2.1 If the app manages connections and transactions, will it use JDBC or an OR mapping toolkit?
2.2 If the app uses EJB, will the EBs be BMP or CMP?
2.2.1 If the app uses BMP, will it use JDBC or an OR mapping toolkit?
3. If the app uses an OR mapping toolkit, will it use JDO?
Session Bean encapsulates business logic and and can be used for that purpose even if JDO is used rather than EBs.

Similar Messages

  • JDO or Entity Beans?

    I read on an article : "
    1. entity beans are slow (due to RMI calls).
    2. EJBQL is a weak language; complex operations are not permitted.
    3. it is difficult to map into an entity bean complex data.
    You should utilize JDO instead of Entity Beans."
    What do you think about these statemets?

    1. With local interfaces you can eliminate many RMI calls. Many
    containers had optimized this anyway prior to EJB 2.0
    2. EJBQL is new and will be enhanced rapidly as it is adopted. The
    latest draft addresses these issues.
    3. EJB relationships help in this area although they will also require
    time to mature.
    I feel JDO has its place. I especially like JDO where many rows are
    required - it can be an excellent active/passive caching mechanism. But I would pursue EJB for bringing up the state of a business process/transaction.

  • Urgent: Can't lookup entity bean

    Dear all,
    I define a business process in workflow engine, which invoke a java class to get
    DB data through CMP entity bean. The entity bean was packed in to a ear and was
    workable/callable within the same ear.
    However, when the workflow engine can't invoke the entity bean, the workflow engine
    always throw exception as following.
         javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    Unable to resolve 'app/ejb/ConsignmentEntityBean.jar#Consignments/local-home'
    Resolved: 'app/ejb' Unresolved:'ConsignmentEntityBean.jar#Consignments' ; remaining
    name 'ConsignmentEntityBean.jar#Consignments/local-home'
    I think the problem may occur in deployment/configuration. Since the problem is
    very urgent, anyone can help me? To all developers, How do you package/deploy
    Entity Bean in Integration Server?
    Thx,
    Philip

    I solved this.
    Since I was testing the action code only, I didn't define a navigation entry corresponding to the action string returned for this button:
    <h:commandButton value="Add" style="height:21px; width:51px;font-size:8pt; font-color: black;" action="#{resourceBean.addAction}">
    </h:commandButton>After I added a nav definition, it worked. I don't know why at this point. I suspect a key step in the lifecycle was pre-empted...someone else can probably explain why. If I get a chance to research it after I'm done with my project, I'll update this post.
    Thanks.
    -L

  • Can Statefull or Entity Bean be Asynchronous Subscribers for a Topic (JMS)

    Hi,
    Please Help me if any body Knows if we can implement a Statefull or Entity
    Bean to an Asynchronous subscribers for a JMS Topic.
    Thanks in advance
    LJS Narayana

    Yes.
    LJS Narayana wrote:
    Hi Mr. Seth,
    Thank u, But One more thing Then to do so i hope we should have the beans
    reference to call upon like handle of the Session Bean or Entity Beans Key
    is that right??
    "Seth White" <[email protected]> wrote in message
    news:[email protected]..
    No. You probably want to have a message driven bean that calls thesession
    or entity bean instead.
    Seth
    LJS Narayana wrote:
    Hi,
    Please Help me if any body Knows if we can implement a Statefull or
    Entity
    Bean to an Asynchronous subscribers for a JMS Topic.
    Thanks in advance
    LJS Narayana

  • Can Entity Bean with Home Business Method replace Stateless Session Bean?

    Since Entity Bean can have business methods in the Home Interface, can we use Entity Bean with Home Business Methods to replace Stateless Session Bean?
    I am assuming we can get better performance by doing this since the overhead of creating Component Object can be avoided as compared to stateless session beans.

    Requires-new makes the container start a new transaction. Only use that flag
              at the point that you are certain that a NEW transaction should BEGIN. I
              suggest you use Required as your default for all methods in the application,
              and only change that to anything else when you are certain that you should.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "A.J,LEE" <[email protected]> wrote in message
              news:3ba5adb2$[email protected]..
              >
              > I find it result in "dead lock"
              > when I call RequiresNew attributed CMP method in session Bean.
              > Then, Is it possible to use CMP which is set with "RequiresNew"
              transaction attribute?
              >
              > I Wonder why.
              >
              > Thanx in advance.
              

  • How to mapping Entity beans to existing database tables.

    dear all
    how can i mapping Entity beans to existing database tables and not to create new table in Orion.
    thanks for any input.
    seabin

    * You define the name of the table that an Entity EJB maps to in orion-ejb-jar.xml. For eg:<entity-deployment name="MyEntityEJB" data-source="MyDS" table="MY_DB_TABLE" ...>* If you don't want to let Orion create the tables for your EJBs, have the following entry in either of the files given below:<orion-application autocreate-tables="false" ...>1) <orion-home>/j2ee/home/config/application.xml (global effect)
    2) orion-application.xml file of that particular application (application specific)
    HTH.

  • Session bean with 2 entity bean

    i have a phonebook manager (session bean) taht controls the category of contacts such as group a , group b, group c and group d. where group a b c and d are all entity beans.
    may i know how to control a session bean so that it can diferent which entity beans to invoke ?

    Group might be a table in a database,
    GroupEJB referes to Entity Bean.
    with the following fields. Group Id , Group disciption. where group ID is primary Key.
    Use a session bean and create your group A B C D.( EJB create method).
    Simple i guess.
    Enjoy
    Zoha.

  • WLS 5.1.0 SP 12 ejbc throws NoSuchMethodError on entity beans

    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

    Do all the examples fail to build, or just the EJB CMP examples? I ask
    because in 5.1, there's a separate WebLogic_CMP_RDBMS.jar that's part of
    the install process, but it's only used for CMP. If the other examples
    work, then that's likely to be your problem.
    -- Rob
    Erik Horstkotte wrote:
    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

  • Can't deploy Simple 2.0 CMP Entity Bean into Sun One Server 7

    Dear all:
    I use JBuilder9 + SunOne Plug-in to
    build a Simple Entity Bean, but I can't
    deploy it into SunOne 7 Server that return
    error message:
    Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- Error while processing CMP beans.
    But I use JBuilder9 + JBoss 3.x Plug-in
    that corrent run on JBoss 3.2 RC
    All code are generated by JBuilder9 EJB Designer
    and only have PK finder.
    Our deploy description flile are:
    ejb-jar.xml=============================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <display-name>Enterprise1</display-name>
    <ejb-name>Enterprise1</ejb-name>
    <home>untitled1.Enterprise1RemoteHome</home>
    <remote>untitled1.Enterprise1Remote</remote>
    <local-home>untitled1.Enterprise1Home</local-home>
    <local>untitled1.Enterprise1</local>
    <ejb-class>untitled1.Enterprise1Bean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>untitled1.Enterprise1PK</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Enterprise1</abstract-schema-name>
    <cmp-field>
    <field-name>inDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>sndSeq</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgSnd</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>msgRcv</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>brkId</field-name>
    </cmp-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Enterprise1</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    =================================
    sun-ejb-jar.xml=====================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd'>
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>Enterprise1</ejb-name>
    <jndi-name>Enterprise1Remote</jndi-name>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>IPLANET</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>jdo/sample-cmp</jndi-name>
    <default-resource-principal>
    <name>mv01</name>
    <password>mv01</password>
    </default-resource-principal>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    ===========================
    sun-cmp-mappings.xml===============
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 OR Mapping //EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-cmp-mapping_1_0.dtd'>
    <sun-cmp-mappings>
    <sun-cmp-mapping>
    <schema>META-INF/mySchema</schema>
    <entity-mapping>
    <ejb-name>Enterprise1</ejb-name>
    <table-name>TSE_MSG_T</table-name>
    <cmp-field-mapping>
    <field-name>inDate</field-name>
    <column-name>INDATE</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>sndSeq</field-name>
    <column-name>SNDSEQ</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgSnd</field-name>
    <column-name>MSGSND</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>msgRcv</field-name>
    <column-name>MSGRCV</column-name>
    </cmp-field-mapping>
    <cmp-field-mapping>
    <field-name>brkId</field-name>
    <column-name>BRKID</column-name>
    </cmp-field-mapping>
    </entity-mapping>
    </sun-cmp-mapping>
    </sun-cmp-mappings>
    =========================

    I remember getting errors like that. The only thing I see is in the map file. When I
    did mine I used TABLENAME.CMPFIELD to map columns to CMP attributes.
    TSE_MSG_T.INDATE
    TSE_MSG_T.SNDSEQ
    for column names in the sun-cmp-mappings.xml file.
    For any other errors set the logging for server1 or which one you are using to "finest".
    Try the deploy, shut down the server, and when you view the log, start at the bottom
    and keep scrolling up to the top of each stack trace and you should get a more
    specific error explanation at about the 3rd or 4th stack trace.

  • Using JDO under BMP entity beans

    I have an entity bean that is a BMP which uses JDO under the hood. The Oc4J document says that "Bean-managed persistence entity beans manage the resource locking within the bean implementation themselves" in the advanced subject chapter. Ok can someone in oracle add an extra line eloborating on that statement ?
    I am stuck in trying to pass a test that can do concurrent modify of an entity bean. I had 2 or more threads trying to modify one single BMP entity bean object concurrently. The database vendor recognizes one bean had the lock and deny locks to any other beans. Who should block the call to the database until one thread releases the lock on the object ? The developer ? J2EE container ? Database ?
    J2EE tenet "Developers are shielded from concurrency and threading issues while implementing business logic" Does that still hold ??
    An object Person's salary value and his benefit information are tried to be modified at the same time by different external system(salary administrator, benefit's administrator). But I dont want the user to see the lock on the object error, but instead I require a pessimistic lock on the BMP. Why does Oc4J not support pessimistic concurrency option for BMP ?

    Kurien,
    If you wish to bring something to the attention of the "Oracle dev team", I suggest you try Oracle's "MetaLink" Web site:
    http://metalink.oracle.com
    It is the official Oracle support Web site.
    These forums are for the Oracle community. Oracle Corporation employees are not obliged to even visit these forums.
    By the way, I am not an Oracle employee.
    Good Luck,
    Avi.
    P.S. For your information, you may find Debu Panda's blogs of help:
    http://radio.weblogs.com/0135826/

  • Entity Beans /JDO and Datawarehousing

    Hi,
    Currently i'm involved in a project, in which we want to generate some very basic custom reports, like turnover calculations etc.
    These reports will be publish on a intranet environment.
    My questions are:
    How do Entity Beans perform when handling large tables (like a few million of rows).
    What about transactions? The datawarehouse will not be updated by the application. Is it therefore advisible to turn it of, in order to gain performance?
    I'm am completely new to JDO, would JDO be a better alternative compared to entity beans when working with large resultsets?
    I hope someone can help
    Thanks and Regards,
    Velli

    hello
    I strongly suggest to use JDBC instead of EJB/JDO. EJB's are great if you need transactions and has a lot of concurrent access. But they are very slow if you read huge data, because for every row an EJB instance is created. For reports you would need to iterate all those instance, in short, performace would be very bad.
    Turning off transactions wont help. Some containers (WEBLogic) allows to configure entity beans as "read only", thus improving performance by data caching in EJB instances. So... if you really need EJB then you can use that.
    However this would not be very effective too, if you really have millions of rows, because it's not possible to keep them all in RAM.
    For several thousands of records it would be very good, but not millions.
    Furthermore, several design patterns suggest to use JDBC in such sitoation. For more information you can read:
    + http://java.sun.com/blueprints/patterns/FastLaneReader.html
    + book "EJB design patterns" (You can find it at TSS)
    + book "Bitter Java"
    Maris Orbidans
    System.out.println(out2.readOutputValue());

  • Entity Bean can only use container-managed transaction demarcation?

    In <<Designing Enterprise Application with J2EE 2nd>>
    Section 2.3.3.3 Enterprise Bean Transactions,it says:Entity beans can only use container-managed transaction demarcation.
    That means,i can not get UserTransaction from EJBContext.
    Is that true?

    Yes this is the requirement of the specs. Your ejb code generator should give you the error if you use usertransaction.
    --Ashwani                                                                                                                                                                                                                                                                   

  • Can CMT Session Bean call BMP Entity Bean in WebLogic 6.0?

              Hi
              Does anybody successfully use CMT Session Bean calling BMP +CMT Entity bean in
              WebLogic6.0? I have the following problem.
              Any idea will be appreciated.
              --Winston
              Let's say we have a Session bean SB, it uses container to manage the transaction.
              A method of SB will call an Entity Bean EB which adopts bean-managed persistence.
              Both SB and EB use CMT and all of their methods use "required" in the descriptor
              file.
              1. If the connection con.getAutoCommit() is true in the EB, then the transaction
              within SB cannot be rolled back as the ejbCreate() has already commit into the
              database.
              2. On the other hand if Connecton of EB con.getAutoCommit() is false, then container
              cannot successfully commit the transaction from SB's method, as EjbCreate and
              EjbStore() in EB are likely using the different database connections, which causes
              EbjStore() fail and the following error message will be sent to the Console:
              ============================================================
              "<Jul 9, 2001 4:16:48 PM PDT> <Error> <EJB> <Exception during commit of transacti
              on transaction=(IdHash=7738920,Name = [EJB TraderBeanImpl.buy()],Xid=105:5e6719a
              ded42e332,Status=Rolled back. [Reason = weblogic.utils.NestedRuntimeException:
              E
              rror writing from beforeCompletion - with nested exception:
              [java.rmi.NoSuchObjectException: Exception from ejbStore:javax.ejb.NoSuchEntityE
              xception: ejbStore: AccountBean (4003) not updated]],numRepliesOwedMe=0,numRepli
              esOwedOthers=0,seconds since begin=0,seconds left=30,SCInfo[examplesServer]=(sta
              te=rolledback),properties=({weblogic.transaction.name=[EJB TraderBeanImpl.buy()]
              })): java.rmi.NoSuchObjectException: Exception from ejbStore:javax.ejb.NoSuchEnt
              ityException: ejbStore: AccountBean (4003) not updated
              at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRunti
              meUtils.java:57)
              at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:364)
              at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManag
              er.java:211)
              at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(Serv
              erSCInfo.java:511)
              at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(Se
              rverSCInfo.java:78)
              at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAn
              dChain(ServerTransactionImpl.java:893)
              at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(
              ServerTransactionImpl.java:1229)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
              sactionImpl.java:168)
              at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:2
              01)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl.buy(TraderBeanEOI
              mpl.java:37)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl_WLSkel.invoke(Tra
              derBeanEOImpl_WLSkel.java:76)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:373)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:237)
              at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestH
              andler.java:118)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
              .java:17)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              --------------- nested within: ------------------
              weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion - wit
              h nested exception:
              [java.rmi.NoSuchObjectException: Exception from ejbStore:javax.ejb.NoSuchEntityE
              xception: ejbStore: AccountBean (4003) not updated]
              at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManag
              er.java:220)
              at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(Serv
              erSCInfo.java:511)
              at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(Se
              rverSCInfo.java:78)
              at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAn
              dChain(ServerTransactionImpl.java:893)
              at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(
              ServerTransactionImpl.java:1229)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
              sactionImpl.java:168)
              at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:2
              01)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl.buy(TraderBeanEOI
              mpl.java:37)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl_WLSkel.invoke(Tra
              derBeanEOImpl_WLSkel.java:76)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:373)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:237)
              at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestH
              andler.java:118)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
              .java:17)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion
              : sync = weblogic.ejb20.internal.TxManager$TxListener@356eb0
              Error writing from beforeCompletion - with nested exception:
              [weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion -
              wi
              th nested exception:
              [java.rmi.NoSuchObjectException: Exception from ejbStore:javax.ejb.NoSuchEntityE
              xception: ejbStore: AccountBean (4003) not updated]]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(
              TransactionImpl.java:1261)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
              sactionImpl.java:218)
              at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:2
              01)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl.buy(TraderBeanEOI
              mpl.java:37)
              at examples.ejb.basic.statefulSession.TraderBeanEOImpl_WLSkel.invoke(Tra
              derBeanEOImpl_WLSkel.java:76)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:373)
              at weblogic.rmi.internal.BasicServerAdapter.invoke(BasicServerAdapter.ja
              va:237)
              at weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestH
              andler.java:118)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
              .java:17)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >"
              

    We did receive a 4.5.1 / 5.1 interoperability patch - but it wasn't quite 'seamless'.
    We never tried to use it.
    SOAP? Isn't that around 50 times slower than RMI?
    Mike
    "Gary Mui" <[email protected]> wrote:
    We ran into this issue last fall and got some feedback from weblogic
    support. They originally said that it could be done (as well as different
    versions talking to one another via JMS) but it turned out that they
    were
    incorrect and ended up saying that it is not possible. Before 6.0 went
    GA,
    BEA said that there would be a interoperability patch to do this, but
    I've
    never seen nor heard of anything regarding it. As a workaround, we
    implemented 4.5.1 / 6.0 communication via SOAP.
    Mike Reiche wrote in message <3b1bcaec$[email protected]>...
    I have the same question - and more. Last year we were told that wecould
    not use
    RMI (and ejbs) between 4.5.1 and 5.1. Which seems kinda weird becauseI've
    heard
    of people using WL ejbs from Tomcat. This issue has caused us to avoidusing
    WL ejbs in any future development which has any chance of ever beingused
    by any
    app server (WL included) that is not under the direct control of thedata
    center.
    I've been trying to convince the Architecture team here that we canuse WL
    EJBs
    and we can call them from other app servers - but can't seem to getany
    supporting
    statement from BEA (maybe I haven't tried hard enough).
    Anyway, a response from BEA would be appreciated.
    - Mike
    "Madhu K" <[email protected]> wrote:
    Is it possible to call a (stateless session) bean deployed in weblogic
    6.0
    from a bean in weblogic 5.1? I have two versions of weblogic running
    on two
    different hosts and I have to call a bean that is running in 6.0 from
    5.1.
    Are there any limitations?
    Appreciate any feedback/suggestions.
    Thanks,
    Madhu

  • Can I deploy the entity bean in different jar files?

    I have an application EAR, which contains several JARs. I have an entity bean A that has relationships with 2 other different entity beans B and C in the same DB. Now, I have to deploy this entity A together with B in AB.jar, and A with C in AC.jar. Both AB.jar and AC.jar are modules of the same application EAR file. They all use the same data sources to the same database, and named by different <ejb-name>.
    I have no problem with deploying the app to WebLogic 8.1. But the JSP page accessing entity A got errors. Sometime, it got error complaining that the container-generated ejbFindAccount mehtod is abstract.
    My questions are,
    Can an entity bean be defined twice in 2 different jars?
    When container load AB.jar and AC.jar, does it generate the finder methods twice?
    I guess there are some name conflicts going on here. What should I do to avoid it?
    Any comments are very much appreciated.

    Thanks for your answer, but how can I use it in connection with relationships?
    <!-- ********************************************************************** -->
    <!-- Relationship: View to FrameworkUser                                             -->
    <!-- ********************************************************************** -->
    <ejb-relation id="View-FrameworkUser">
         <description></description>
         <ejb-relation-name>View-FrameworkUser</ejb-relation-name>
         <ejb-relationship-role>
              <ejb-relationship-role-name>Views-have-FrameworkUser</ejb-relationship-role-name>
              <multiplicity>Many</multiplicity>
              <relationship-role-source>
                   <ejb-name>View</ejb-name>
              </relationship-role-source>
              <cmr-field>
                   <cmr-field-name>frameworkUser</cmr-field-name><!-#- getter/setter -#->
                   <cmr-field-type>java.util.Collection</cmr-field-type>
              </cmr-field>
         </ejb-relationship-role>
         <!-#- *************** -#->
         <ejb-relationship-role>
              <ejb-relationship-role-name>FrameworkUser-has-Views</ejb-relationship-role-name>
              <multiplicity>One</multiplicity>
              <relationship-role-source>
                   <!-#- *******REFERENCE******** -#->
                   <ejb-name>ejb_foo_jar2_ejb.jar#FrameworkUser</ejb-name>
                   <!-#- *******REFERENCE******** -#->
              </relationship-role-source>
         </ejb-relationship-role>
    </ejb-relation>
    ...this obviously doesn't work...
    Do I have to write a new <entity> where I define the referenced entity?

  • How can I control the EJB's Transaction with entity bean

    If I use entity bean, the Transaction is managed by container.and I want to create JDBC Connection by myselft ,not the Datasource,how is the transaction is controlled by the container,if transaction is not controlled ,how can I control it??

    Hi,
    If you want to control the transaction your self then you need to use javax.transaction.UserTransaction interface and methods defined by it.
    Hope this helps
    Vishal

Maybe you are looking for