Why BC4J if Entity EJB is available

Hi,
I've been working on learning the BC4J framework for the last couple of weeks and initially I was very pleasently surprised - it really looked like this was the way forward. BUT - now that I've matured past the 'trivial applications make me happy' stage, I feel like I've hit a brick wall - something as simple as adding a (row - or should I say object) method and actually getting it called from a client application seems to involve hours browsing the 'not so helpful' documentation, and it still does not work. So now I'm forced to rethink this approach and the recent annoucement of EJB 1.1 support in 8.1.7 made me pose the question:
What is BC4J except an attempt to patch up the missing entity bean support ? So far I've come up short and I would like to ask if there are others who think the same (or not - I'm just trying to get the picture so to speak :-)).
It will also be quite simpel to program the buisness classes in Java, class test them and then deploy - generating the home and remote interfaces automatically. So I fail to see what BC4J gives me that I do not get by going the entity EJB route.
What do you guys think - am I just rambling ?
br
Jacob

For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
If you've already tried a complete uninstall and reinstall try opening iTunes in safe mode (hold down CTRL+SHIFT) as you start iTunes, then going to Edit > Preferences > Store and turning off Show iTunes in the Cloud purchases. You may find iTunes will now start normally.
tt2

Similar Messages

  • Oracle Dabase Schema with OC4J CMP Entity EJB

    I have tables in a schema called vsxlib. My Entity EJBs that map to SQL SERVER tables (no schema) work perfectly. My Entity CMP EJBs that connect need to connect to the vsxlib schema only partially work.
    The findAll method works. When I add a where clause, I get no results back.
    When I try a findByPrimaryKey, I get a ObjectNotFoundException.
    Does OC4J version 9.0.3 support database schemas? There were examples posted at http://otn.oracle.com/sample_code/tech/java/j2ee/javacookbook/transactionsample/readme.html#descfiles say that they have an Entity bean working within a db schema.
    Could it be permission related????
    I even tried creating a synonym pointing to the table within the vsxlib schema.. No Luck.
    I had this same problem with JBoss3.2 and found out that they did not support db schemas. That is why I was wanting to switch to OC4J because I thought for sure, being an oracle product that it would support db schemas.
    Any help is greatly appreciated.

    Hi Alex,
    I think you may be misunderstanding the meaning of 'database schemas'. For your information, in the Oracle database, a schema is the same as a database user. For example all the database tables belonging to user SCOTT (TIGER) are said to be in the SCOTT schema.
    OC4J uses the term 'database schema' differently. Here it refers to the mapping of database datatypes to java classes. Look at the "j2ee/home/config/database-schemas" subdirectoryof the OC4J installation for more details. The "data-sources.xml" file has a 'schema' tag (not sure if that's the correct name) which points OC4J to the datatype mapping XML file -- usually one of those that come with the distribution. However, I use OC4J stand-alone version and I don't need to worry about the mappings at all -- OC4J already knows the mappings for an Oracle database (I assume).
    In order to access a particular Oracle schema, I merely have to log in to the database as the appropriate user. So, using the previous example, if I configure the "data-sources.xml" file to use 'scott' as the database login, then OC4J can access the SCOTT schema. You can find more details about Oracle's use of the term 'schema' in the Oracle documentation, which is available from:
    http://tahiti.oracle.com
    Hope this has answered your question.
    Good Luck,
    Avi.

  • Is there an MBean for a deployed entity EJB?

    Hi,
    I need to access the method invocation times, availability, remove count, create count etc. of a deployed entity EJB through JMX MBean, in JBoss.
    I have deployed the entity bean and the stateless DAO bean that operates on the entity bean. I do find an MBean for this DAO in the JMX-console of JBoss, but not an MBean for the entity EJB.
    a) Why do I not find an MBean for the same?
    b) How is it possible to get the MBean created for the entity EJB?
    Speedy help solicited.
    Thanks a bunch in advance guys !

    When executing an operation via JMX using JConsole, I get the following error:
    Problem invoking getManifest : java.rmi.UnmarshallException: Error unmarshalling return: nested is: java.lang.ClassNotFoundException: foo.bar.InernalServiceException (no security manager: RMI class loader disabled)
    Code snippet:
    public ArrayList getManifest(String s) throws InternalServiceException, MBeanException{
    String path = ".\\foo_services.jar"; // Invalid path on purpose to test exception...
    File file = new File(path);
    FileInputStream fileInput;
    try {
    fileInput = new FileInputStream(file);
    } catch (FileNotFoundException e) {
    String msg = "The manifest file is not found in the given path";
    if (logger.isErrorEnabled()) logger.error(msg);
    throw new InternalServiceException(msg, ErrorConstants.JMX_FILE_NOT_FOUND);
    If I throw new RuntimeException(msg, e) instead of InternalServiceException(msg, ErrorConstants.JMX_FILE_NOT_FOUND), it works and I get the appropriate exception.
    What is the reason for this?

  • Clustering read-only bean-managed entity ejbs

              I'm designing a data caching approach that relies on using read-only entity ejbs with bean-managed persistence. My design is based on the fact that WebLogic blocks on entity bean access by concurrent users for a given bean instance (unique primary key). I would like to keep only one entity bean instance active(timeoutSetting=0) for eacy primary key for all users to share. That way I only have to hit the database one time to initially populate data in the entity bean. I'm worried about this approach in a WebLogic clustered environment. From reading notes in this newsgroup and other doc, it appears that WebLogic might not use one instance of the entity bean (based upon unique primary key) in a clustered environment. Is that true (that being multiple users could get their own instance of the entity bean with the same primary key)?
              Thanks,
              Bryan
              

    Typically, the read-write EJBs are on each WL server instance, so there is
              no remote invocation -- it is all done by reference.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Bryan Dixon" <[email protected]> wrote in message
              news:[email protected]...
              >
              > I guess I'm confused about read-write (not read-only) entity beans being
              pinned or not. This is from WebLogic 5.1 EJB doc:
              > "read-write entity EJBs do not use a clustered EJBObject stub; a client's
              method calls to a particular EJB always go to a single WebLogic Server
              instance. If the server that a client is using fails, the client must
              re-find the entity EJB using the cluster-aware home stub."
              >
              > Doesn't that mean the entity bean instance for a primary key is pinned to
              a single WebLogic Server instance? Maybe I'm just misunderstanding
              terminology about what a "particular EJB" is - I was thinking it is an
              entity bean instance for a unique primary key.
              >
              > Thanks,
              > Bryan
              >
              >
              > "Cameron Purdy" <[email protected]> wrote:
              > >>I was thinking that read-write entity beans were pinned.
              > >
              > >Not unless you pin them. Basically, that means that the JAR/XML that
              > >contains/specifies the EJB only is on one server.
              > >
              > >> So if two separate weblogic instances in a cluster did a find on an
              entity
              > >ejb with the same primary key and then performed some business method on
              > >that entity ejb, would there really be two separate bean instances in
              each
              > >weblogic instance for the same primary key?
              > >
              > >If it is not pinned, yes.
              > >
              > >--
              > >Cameron Purdy
              > >Tangosol, Inc.
              > >http://www.tangosol.com
              > >+1.617.623.5782
              > >WebLogic Consulting Available
              > >
              > >
              > >"Bryan Dixon" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Toa, thanks again.
              > >>
              > >> There are a couple of things I'm not clear about though. One is that I
              > >want one instance of an entity bean per primary key, not a singleton of
              the
              > >entity bean itself. How would JNDI in a clustered environment help me
              > >there?
              > >>
              > >> The other question I have is about having multiple instances of an
              entity
              > >bean for the same primary key in the cluster. I was thinking that
              > >read-write entity beans were pinned. So if two separate weblogic
              instances
              > >in a cluster did a find on an entity ejb with the same primary key and
              then
              > >performed some business method on that entity ejb, would there really be
              two
              > >separate bean instances in each weblogic instance for the same primary
              key?
              > >>
              > >> Thanks again,
              > >> Bryan
              > >>
              > >> "Tao Zhang" <[email protected]> wrote:
              > >> >
              > >> >"Bryan Dixon" <[email protected]> wrote:
              > >> >>
              > >> >>The reason I was wanting one instance per primary key is that I want
              to
              > >use this entity bean to cache some data from database tables. This data
              > >doesn't change frequently, so we were wanting to get it from this entity
              > >bean's memory instead of constantly hitting the database. This data is
              > >global to all users, so we don't want to store it in stateful session
              beans.
              > >> >>
              > >> >>After reading more about the read-only cache-strategy it doesn't
              appear
              > >that any sycnhronization will occur if the entity bean for a given
              primary
              > >key is updated (state data is updated) in one weblogic instance, that
              change
              > >will not get synced up with other weblogic instances for that same
              primary
              > >key. Is that correct?
              > >> >>
              > >> >It's correct. If you do want to have exact one copy in the cluster.
              You
              > >can read Using JNDI in cluster environment.
              > >> >
              > >> >>If I deploy this entity bean with read-write cache-strategy the
              WebLogic
              > >doc reads as if I will get one instance per primary key that is pinned to
              > >one WebLogic instance and I won't get any fail-over or load-balancing on
              the
              > >ejbObject (the entity bean instance). Did I read this correctly? If
              that
              > >is the case, what is the advantage of setting up read-write entity beans
              to
              > >be clusterable - just the Home objects? I definitely could be
              > >misunderstanding something in the doc since I'm very new to clustering.
              > >> "Tao
              > >> >Zhang"
              > >> ><[email protected]> wrote:
              > >> >>>
              > >> >
              > >> >It's not only instance in the cluster. Probably many instances.
              > >> >
              > >> >If you use 2 tier clustering, failover will not happen because of
              > >co-location. But if you use 3 tier cluster, you can write the special
              code
              > >in the client side to do failover and load-balance.
              > >> >
              > >> >In a 2 tier cluster, actually the ejb load balancing and failover is
              > >almost useless.
              > >> >
              > >> >But in 3 tier, you can use it.
              > >> >
              > >> >Hope this help.
              > >> >
              > >> >
              > >> >
              > >> >>>"Bryan Dixon" <[email protected]> wrote:
              > >> >>>>
              > >> >>>>Thanks Tao.
              > >> >>>>
              > >> >>>>A couple more questions...
              > >> >>>>I was planning deploying this entity bean with the read-only
              > >cache-strategy which means our transaction attribute would be
              > >TXN_NOT_SUPPORTED. Also, our db isolation is TRANSACTION_READ_COMMITTED.
              > >> >>>>
              > >> >>>>Based upon how I was planning on deploying this entity bean, would
              > >WebLogic create an instance of the bean for each primary key in each
              > >cluster? I'm just trying to figure out how many duplicate bean instances
              > >for the primary key I could have across all clusters. I was really just
              > >wanting one instance that is shared among all clients and was hoping that
              > >the clustering would provide me with fail-over if that one cluster went
              > >down.
              > >> >>>>
              > >> >>>If you use 3 tier cluster structure, it's impossible to know how
              many
              > >instances of ejb with the same primary key. Probably one instance for
              each
              > >wls instance.
              > >> >>>In wls5.1, it's impossible to host only read only entity bean
              instance
              > >in the 3-tier cluster. Because read only entity bean are clusterable in
              both
              > >home and remote interface.
              > >> >>>
              > >> >>>>Regarding making the bean a pinned service, which it sounds like I
              > >might have to do to get the results I want, how do I do that? Is that a
              > >deployment descriptor setting? Also, if I make it a pinned service, do I
              > >get any fail-over suport by clustering the bean?
              > >> >>>>
              > >> >>>For the pinned service, you can just deployed on one or several
              server
              > >instances. The per-server properties file is a good place to put the
              > >weblogic.ejb.deploy property. If only one pinned service in the cluster,
              you
              > >can't get fail over. If the that server instance fails, the home stub
              will
              > >be removed from the jndi in other server instances.
              > >> >>>
              > >> >>>Why do you must need only one instance in the cluster? Do you want
              > >exact-only-copy? You can read Using JNDI doc about its in cluster
              > >environment.
              > >> >>>
              > >> >>>
              > >> >>>
              > >> >>>
              > >> >>>>Thanks again,
              > >> >>>>Bryan
              > >> >>>>
              > >> >>>>
              > >> >>>>
              > >> >>>>"Tao Zhang" <[email protected]> wrote:
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>Bryan Dixon <[email protected]> wrote in message
              > >> >>>>>news:[email protected]...
              > >> >>>>>>
              > >> >>>>>> I'm designing a data caching approach that relies on using
              > >read-only
              > >> >>>>>entity ejbs with bean-managed persistence. My design is based on
              the
              > >fact
              > >> >>>>>that WebLogic blocks on entity bean access by concurrent users for
              a
              > >given
              > >> >>>>>bean instance (unique primary key). I would like to keep only one
              > >entity
              > >> >>>>>bean instance active(timeoutSetting=0) for eacy primary key for
              all
              > >users to
              > >> >>>>>share. That way I only have to hit the database one time to
              > >initially
              > >> >>>>>populate data in the entity bean. I'm worried about this approach
              in
              > >a
              > >> >>>>>WebLogic clustered environment. From reading notes in this
              newsgroup
              > >and
              > >> >>>>>other doc, it appears that WebLogic might not use one instance of
              the
              > >entity
              > >> >>>>>bean (based upon unique primary key) in a clustered environment.
              Is
              > >that
              > >> >>>>>true (that being multiple users could get their own instance of
              the
              > >entity
              > >> >>>>>bean with the same primary key)?
              > >> >>>>>>
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>It's true. In a cluster environment, each wls instance can have
              their
              > >ejb
              > >> >>>>>instance. The block of concurrent access to the ejb data is up to
              > >your
              > >> >>>>>transaction attribute and isolation level and your database.
              > >> >>>>>
              > >> >>>>>If you only want to keep one instance active, you can make the
              > >read-only
              > >> >>>>>entity bean a pinned service, to be deployed in one instance. But
              the
              > >> >>>>>network overhead is worse.
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>> Thanks,
              > >> >>>>>> Bryan
              > >> >>>>>
              > >> >>>>>
              > >> >>>>
              > >> >>>
              > >> >>
              > >> >
              > >>
              > >
              > >
              >
              

  • Bmp entity ejb transactions, using DAO objects

    hi all,
    i'm new to entity ejb's... i'm using the j2ee reference implementation (1.3.1) with the cloudscape db to test my code.
    i can't seem to get my ejbCreate method to work. i'm using a DAO object to encapsulate all my database code, and simply call dao.insert(...) in my ejbCreate method.
    i tested the dao object, and it works fine when it's invoked straight. but when i try to invoke under the ejb container i run into problems:
    i deploy the bean with container managed transactions:
    (1) with the 'required' attribute:
    I get a javax.transaction.RollbackException nested inside another RollbackException, nested inside a RemoteException, nested inside another RemoteException. The final RollbackException says <<no stack trace available>>...
    So I've got no clue what's causing it...
    (2) with the 'never' attribute:
    I get a NullPointerException nested inside another NullPointerException, nested inside a RemoteException, nested inside another RemoteException. The final NullPointerException says <<no stack trace available>>...
    So I've got no clue what's causing it...
    I'm assuming something messed up with my deployment -- but I've checked it against all the examples I can find -- seems to be correct. Would the encapsulated Data Access code cause a problem? Some other config problem?
    Thanks in advance for any help!!

    i'm using the cloudscape db that's already configured with the server. i believe the datasource is correctly configured, as i am able to successfully invoke the dao methods straight -- the problem occurs when I try to do it via the entity bean that uses the dao object.
    here's my server startup messages:
    Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:CloudscapeDB;create=
    true
    Binding DataSource, name = jdbc/DB1, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
    Binding DataSource, name = jdbc/EstoreDB, url = jdbc:cloudscape:rmi:CloudscapeDB;create=tr
    ue
    Binding DataSource, name = jdbc/InventoryDB, url = jdbc:cloudscape:rmi:CloudscapeDB;create
    =true
    Binding DataSource, name = jdbc/DB2, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
    Binding DataSource, name = jdbc/XACloudscape, url = jdbc/XACloudscape__xa
    Binding DataSource, name = jdbc/XACloudscape__xa, dataSource = COM.cloudscape.core.RemoteX

  • Why should I use EJB

    Hi,
    My name is Gandharv Sirohi. I am a student, and new to EJB. I want to know why should I use EJB, before I can start learning it if every thing can be done using Java Servlets and JSP.
    I tried to find out the answer to this question in books but there is no satisfactory answer.
    Can some body help me understand this simple question. I will be thankfull

    Hi gandharv,
    It's true there are a lot of services available to both the web tier and the EJB tier. One of the
    real strengths of EJB is support for transactional business logic. Web components can
    explicitly demarcate transactions via UserTransaction, but container-managed transaction
    support in EJB components at the business method level offers a much simpler approach
    for developing and maintaining such applications. An example of some EJB services not available
    in the web tier are : method-level security, RMI-IIOP access, message-driven beans,
    transactional/persistent timer service, stateful components, extended container-managed
    persistence contexts, guaranteed single-threaded execution, and interceptors.
    Of course there are many services available to the web tier that are not in EJB. It's not
    about picking one of the two that should always be used. Like any tool/technology, each has its strengths, weaknesses, and design center.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Session EJB vs ENtity EJB

    Why/When would you use Session EJB instead of Entity EJB to access Database values

    You might use a Session Bean to access the database when you didn't want the overhead of Entity Beans or if the data you were retrieving didn't relate to the entity structure easily.
    Have a look at the Fast Lane Reader pattern in the J2EE Design Patterns section to get more information about an example. Here the data is only being read and presented to the user so support for updating the values, security and concurrency isn't needed and is purely overhead.
    Hope this helps.

  • Entity EJBs

    Hello!!
    My application works with tables in a Oracle database but I have several Entity EJB too .. is it absolutely necessary to create the tables that are used by the Entity EJBs in a data dictionary project?
    I hope anybody help me.
    Thanks

    Hi,
    no, using Data Dictionary is necessary only if you want to use OpenSQL to access the database. In your case you can use EJBs with Vendor of Native SQL DB access. For more info on the persistency layers that are available on the Web AS Java, see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/61/fdbc3d16f39e33e10000000a11405a/frameset.htm">this page</a>.

  • HELP - ERROR INVOKING ENTITY EJB METHOD

    Hi,
    I keep getting a java.rmi.NoSuchObject exception when using my entity ejb, but cannot see why, as I already have the ejb in a collection... code & stack trace below: Any one know what is causing this ??
    java.rmi.NoSuchObjectException: com.syntegra.cec.insurance.entity.AATreportPK@7a6c34
    java.rmi.NoSuchObjectException: com.syntegra.cec.insurance.entity.AATreportPK@7a6c34 at AATreport_EntityBeanWrapper14.getPayment_reference(AATreport_EntityBeanWrapper14.java:1881) at com.syntegra.cec.insurance.dtofactory.RecordsDTOFactoryBean.fetchAAT(RecordsDTOFactoryBean.java:151) at com.syntegra.cec.insurance.dtofactory.RecordsDTOFactoryBean.fetchRecords(RecordsDTOFactoryBean.java:62) at RecordsDTOFactory_StatelessSessionBeanWrapper49.fetchRecords(RecordsDTOFactory_StatelessSessionBeanWrapper49.java:108)
    HashMap records = new HashMap();
    Collection theEJBs = null;
    int counter = 0;
    //Find the beans
    AATreportHome home = (AATreportHome)lookUpHome
    (com.syntegra.cec.insurance.entity.AATreportHome.class,
    "AATreport");
    theEJBs = home.findByStatus(type);
    //Populate the DTO's
    if(theEJBs != null)
    Iterator it = theEJBs.iterator();
    while(it.hasNext())
    AATreport theEJB = (AATreport)it.next();
    AATreportDTO theDTO = new AATreportDTO
    ----- This is where the error comes from --
    ---Line 151 ---(theEJB.getPayment_reference(),
    theEJB.getTenant_ref_no(),
    theEJB.getInsurance_no(),
    theEJB.getName(),
    theEJB.getAddress_line_1(),
    theEJB.getPremium(),
    getDateAsString(theEJB.getAction_date()));
    records.put(new Integer(counter), theDTO);
    counter++;

    Greetings,
    Hi,
    I am trying to access a bean from a JSP and have the
    foll. code piece:
    <%
    String op="";
    try {
    // Contact the AccountBean container (the "AccountHome") through JNDI.
    Context ctx = getInitialContext();
    out.println("initial context got !!");
    DemoHome home = (DemoHome) ctx.lookup("demo.DemoHome");
    out.println("home got !!");Though it doesn't seem to be the problem in this case, good EJB coding practices dictate that your code should be narrowing the home reference before calling any of it's methods (i.e. create(...) )... WebLogic may allow handling of its protocol objects in their native state, but other vendors do not... your application is not portable without narrowing.
    It gives an error on trying to access the method "demoSelect".
    e.printStackTrace gives the output:
    java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated inThe error is not in your JSP, but in the bean... it seems your bean is attempting to acquire its "environment properties" in the pre-1.1 style, when...
    EJB 1.1. EJB 1.1 compliant containers are not required to implement this
    method. Use java:comp/env instead. ...instead, it should be looking them up in its JNDI namespace.
    What is wrong???
    pls help! Regards,
    Tony "Vee Schade" Cook

  • Creating Entity EJB's in loop

    I have a servlet in my EAR that inserts default fields into a table based on one of my CMP Entity EJB's (v2.x).
    The servlet operates as such:
    public void init(ServletConfig config) throws ServletException {
         super.init(config);
         ServletContext application = getServletContext();
         Context ctx = null;
         AccountType act = null;
         AccountTypeHome acth = null;
         try{
              ctx = new InitialContext();
              Object obj = ctx.lookup(JNDI_USERPRIVELAGES);
              application.log("Creating system privelage groups...");
              UserPrivelages usp = null;
              UserPrivelagesHome usph = null;
              usph = (UserPrivelagesHome) PortableRemoteObject.narrow(obj,UserPrivelagesHome.class);
              usp = usph.create(new Integer(1),baseUserPrivelages[0][0],baseUserPrivelages[0][1],baseUserPrivelages[0][2]);
              UserPrivelages uspStandard = usph.create(new Integer(2),
                   baseUserPrivelages[0][0],baseUserPrivelages[0][1],
                                  baseUserPrivelages[0][2]);
              application.log("Created system privelage groups...");
              application.log("Creating system users...");
              Context ctx2 = new InitialContext();
              SysUserHome sysh = null;
              application.log("Looking up: "+JNDI_SYSUSER);
              Object o = ctx2.lookup(JNDI_SYSUSER);
              application.log("Narrowing object...");
              sysh = (SysUserHome) PortableRemoteObject.narrow(o,SysUserHome.class);
              for(int i=0;i<1;i++){
                   String[] users = baseSysUsers;
                   application.log("Creating: "+users[1]);
                   Integer id =new Integer(users[0]);
                   String login = users[1];
                   String pword = users[2];
                   String forename = users[3];
                   String surname = users[4];
                   String empNo = users[5];
                   String priv = users[6];
                   String group = users[7];
                   String lastUpdatedBy = users[8];
                   SysUser sys = null;
                   application.log("Creating sysuser...");
                   sys = sysh.create(id,login,pword,forename,surname,empNo,priv,group,new java.sql.Timestamp(System.currentTimeMillis()),lastUpdatedBy);
                   application.log("Created "+users[1]);
              application.log("Created system users...");
         } catch(NamingException ne){
              application.log("Error initialising startup!",ne);
         } catch(RemoteException re){
              application.log("Error creating startup db entries.",re);
         } catch(CreateException ce){
              application.log("Error creating Sysuser",ce);
    When the servlet starts, the first 2 ejbs are created without a problem. When it gets to the loop to create the SysUsers, it seems to create the first then throws the following exception:
    Error creating startup db entries.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException; nested exception is:
         javax.transaction.RollbackException
    java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException; nested exception is:
         javax.transaction.RollbackException
    javax.transaction.RollbackException
         <<no stack trace available>>The ejbCreate method for the SysUserBean interface is as follows:
         public Integer ejbCreate(Integer id,
         String login,
         String pword,
         String forename,
         String surname,
         String empNo,
         String privelage,
         String group,
         java.sql.Timestamp lastUpdated, String lastUpdatedBy) throws CreateException {
              System.out.println("Constructing new SystemUser with login: "+login);
              this.setSysu_id(id);
              this.setSysu_login_name(login);
              this.setSysu_password(pword);
              this.setSysu_forename(forename);
              this.setSysu_surname(surname);
              this.setSysu_forename(empNo);
              this.setSysu_user_privelage(privelage);
              this.setSysu_user_privelage(group);
              this.setSysu_last_updated(lastUpdated);
              this.setSysu_last_updated_by(lastUpdatedBy);
              System.out.println("Created new SystemUser: "+login);
              return null;
         }When I run the code, the servlet runs up until it calls sysh.create(...) where it throws the exception.
    Inside the ejbCreateMethod, the whole method is run (as I have the "System.out.println('Created new SystemUser: '+login);" statement having been executed.
    The "return null" statement at the end of the method doesn't seem to be the problem (it is a CMP) besides, I've tested it with returning the primary key (return this.getSysu_id()) but this makes no difference and I have the same implementation for the UserPrivelages interface.
    The ejbCreate method in the UserPrivelagesBean class also has the same format without the error occurring.
    I'm currently testing with the J2EE Application deployment tool 1.3.
    Do I need to "close" (if such an option exists) the SysUser interface before I create a new one?
    Cheers,
    Anthony

    Found the problem. Too much late night programming. I double declared a couple of methods in the Create method on the SysUserBean class.
    All working fine now.
    Anthony

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

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

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

  • How to use the same Entity EJB to access the same table in 2 syb databases

    We are trying to convert an application to J2EE. We have the following
    concern. The application requires the use of 10 sybase databases with
    identical tables. One database per branch. We would like to be able to use the same set of entity EJBs to access all databases.
    One solution we can think of is to use bmp entity beans and have a dispatcher session bean pass the database that the entity bean has to connect to.
    Would it work?
    Is there a more elegant way to do this?

    I don't know if there is a more elegant way to do it, but that will work. I have a similar scenario, one database per customer. You'll have to use BMP and get your connections based on the branch.
    Each one of my DAO methods requires that a customer ID be passed in for each method. The customer ID is part of the primary key for each entity bean; therefore, if I need to find a deposit (entity) for a customer, I pass the customer ID and deposit ID to my session facade, create the PK using these, do a findByPrimaryKey, etc. In the ejbLoad, I use the customer ID and the deposit ID to pass into the DAO. There, another class (ConnectionFactory) returns a proper connection based on the customer ID passed, which I use to do my queries.
    Paul

  • Why are certain movies no longer available?

    My husband purchased Bicentennial Man on iTunes a few years ago and after Robin Williams death I wanted to purchase the movie for my iPad. After a frustrating search I see it is no longer available in the U.S. iTunes Store. I want to know why. Also, Aladddin isn't available either but you can get it on the European iTunes Store.

    The owners of the distribution rights for the films make that decision. it's not up to Apple. Disney is notorious for this. They will make films available only for a limited time to drive sales.
    Films may also be removed for periods of time if someone like HBO gets exclusive rights to air them for a period of time.

  • Why ebooks on ibooks is not available yet in philippines

    why ebooks on ibooks is not available yet in philippines

    Apple can sell things where the content providers have given them licenses to sell them - so if the book publishers haven't given them licenses to sell their ibooks in the Philippines then Apple can't sell them there.
    Until if/when the book publishers grant Apple licenses, do you have access to other ebook apps/stores that you can use instead ?

  • Oracle sequence problem in CMP Entity EJB

    I have a problem with Oracle sequence when I am using from the CMP entity EJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correct sequence number
    from Oracle, but during the runtime, when I open a new sqlplus window and increment
    the sequence number, the container is not picking up from the new incremented value
    instead it is still continuining by incrementing the old sequence number it has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xml are exactly
    same
    Any help would be greatly appreciated.

    Change the key-cache-size to 1 in weblogic-cmp-rdbms-jar.xml and then try
    your experiment again.
    -- Anand
    "Satya" <[email protected]> wrote in message
    news:3d06274c$[email protected]..
    >
    I have a problem with Oracle sequence when I am using from the CMP entityEJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correctsequence number
    from Oracle, but during the runtime, when I open a new sqlplus window andincrement
    the sequence number, the container is not picking up from the newincremented value
    instead it is still continuining by incrementing the old sequence numberit has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xmlare exactly
    same
    Any help would be greatly appreciated.

Maybe you are looking for