Entity EJB Relationships Architectural Question

I need to create a hierarchy of simple objects. I will call my object
"Part" for simplicity. I have two Oracle tables to maintain my Part
hierarchy. The first table contains the detail for the part: number and
name. The second table maintains the relationship: parent_number and
child_number. I built Entity EJBs with CMP for both tables, but I don't
know if that is the "best practices" approach. If it is, how do I define
the relationships (EJB 2.0)? If it is not, how would you build it?
Thanks for helping me out,
Thomas A. Valletta

Thanks Slava,
You deserve more than a free trip to a conference for the time and effort
that you put into this board. I think you should be able to write this off
as a charitable contribution on your taxes. If you need someone to sign the
receipt, just let me know.
Anyway, back to my hierarchy issue(s). I found some information that
weblogic will set-up this kind of many-to-many relationship for you if you
set it up correctly in the weblogic-cmp-rdbms-jar.xml and the ejb-jar.xml.
So I went through the DTDs, but despite the examples the help is extremely
vague. Has anyone done this? Could anyone recommend where I could find
something more on the topic (books, magazine articles, online documentation,
code, etc)?
Thanks again,
Thomas A. Valletta
"Slava Imeshev" <[email protected]> wrote in message
news:3ec552f9$[email protected]..
Hi Thomas,
"Thomas A. Valletta" <[email protected]> wrote in message
news:[email protected]..
I need to create a hierarchy of simple objects. I will call my object
"Part" for simplicity. I have two Oracle tables to maintain my Part
hierarchy. The first table contains the detail for the part: number and
name. The second table maintains the relationship: parent_number and
child_number. I built Entity EJBs with CMP for both tables, but I don't
know if that is the "best practices" approach. If it is, how do I
define
the relationships (EJB 2.0)? If it is not, how would you build it?The best approach is the one that works for you. If the
combination of two beans works, leave it as is and
go ahead with next tasks.
Regards,
Slava Imeshev

Similar Messages

  • Composite Primary Key in M:N CMP Entity Bean Relationship

    Dear Sir/Madam,
         We are creating an Enterprise Application for our institute using EJB 2.0 specifiactions. In the course of developement, we are facing a problem in writing the CMP Entity Beans with EJB Relationships.
         We are having many to many relationship between two beans such that the primary key of one Entity Bean (let's call it A), serves as the foreign key of another Entity Bean (let's call it B). Further, this primary key of A as foreign key in B, participates in the composite key of B.
         The EJB Specifications require that the primary key field(s) of any bean (B, in our case) declared in the Primary Key class should be the subset of the 'cmp-field' declared in the deployment descriptor for that bean. As I said earlier, we have many to many relationship at play. Hence, we require to keep the foerign key in the 'cmr-field' in lieu of 'cmp-field'. In short, the component of primary key is in 'cmr-field' while, it is needed in both 'cmp-field' and 'cmr-field'. That's perfect from Database point of view but illogical from CMP Entity Bean's view.
         How can we write the deployment descriptor for such a CMP (BMP is working fine for above scenario) Entity Bean? Also, how can we write the Primary Key class? The problem is not just to find the solution, but find under the hood of EJB 2.0 specifications.
         Please help.

    I think you should realise that it would not be convenient to use CMP for everything. It is difficult to define complex relations using CMP. Mostly BMP os preferd since it gives the flexibility for the bean developer.
    Regards
    xH4x0r

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

  • How would i design the relationship between "question", "subquestion", and "answer"

    Hi all. Consider the following scenario:
    Scenario:
    A Question has an Answer, but some Questions have Subquestions. For example:
    1. Define the following terms: (Question)
    a) Object (1 marks) (Subquestion)
    An instance of a class. (Answer)
    b) ...
    2. Differentiate between a constructor and a destructor (2 marks)
    (Question)
    A constructor constructs while a destructor destroys.
    (Answer)
    Question:
    I want to model Questions, Subquestion, and Answer as Entities with relationships/associations, preferably binary relationships as i feel ternary relationships will be problematic while programming. Any suggestion on how i would
    go about this?
    There is never infinite resources.
    For the Question Entity, a question has the attributes "QuestionPhrase <String>", "Diagram<Binary>", and "Marks
    <Decimal>".
    For the SubQuestion Entity, a subquestion has the attributes "SubQuestionPhrase <String>", "Diagram<Binary>", and "Marks <Decimal>".
    For the Answer Entity, an answer has attributes, "AnswerPhrase<String>", "Diagram <Binary>"

    Yes. I am in .Net. I sure do hope i did not ask in the wrong forum. :-|
    Hi KCWamuti,
    If you need to design the relationship between Question table and Answer table in SQL Server, as Uri’s and Visakh’s posts, you can create the foreign key to establish relationship between tables, and use join in query to get your desired result. For more
    information about JOIN in SQL Server, please review this article:
    Different Types of SQL Joins.
    However, if you need to model Questions, Subquestion, and Answer as Entities in .Net, then the issue regards data platform development. I suggest you post the question in the Data Platform Development forums at
    http://social.msdn.microsoft.com/Forums/en-US/home?category=dataplatformdev . It is appropriate and more experts will assist you.
    Thanks,
    Lydia Zhang

  • How to set the isolation level on Entity EJBs

    I am using 10.1.3.3 of the OC4J app server.
    I am creating an application that uses EJB 2.1.
    I am trying to set the isolation levels on the EJBs to either serializable or repeatable read.
    When i deploy the EAR file from the OC4J admin console, i can set the isolation level property on the EJB's however when i inspect the orion-ejb-jar.xml file I do not see the isolation level being set. Furthermore, i tried to manually change the isolation setting by editing the orion-ejb-jar.xml and adding the isolation="serialiable" attribute on the entity bean descriptor. I then stopped and restarted the server. I noticed that my change was no longer in the file.
    Can someone please let me know how to solve this problem and set the isolation level on Entity EJBs . Thanks

    I find it at ejb.pdf from BEA.
              The transaction-isolation stanza can contain the elements shown here:
              <transaction-isolation>
              <isolation-level>Serializable</isolation-level>
              <method>
              <description>...</description>
              <ejb-name>...</ejb-name>
              <method-intf>...</method-intf>
              <method-name>...</method-name>
              <method-params>...</method-params>
              </method>
              </transaction-isolation>
              "Hyun Min" <[email protected]> wrote in message
              news:3c4e7a83$[email protected]..
              > Hi!
              >
              > I have a question.
              > How to set the transaction isolation level using CMT in descriptor?
              >
              > The Isolation level not supported in CMT?
              >
              > Thanks.
              > Hyun Min
              >
              >
              

  • 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

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

  • Ejb Transaction failure question?

    Hello,
    I use Ejb 2.0 and want to store some date in the DB.
    I put restriction on the table, Primary Key and Not null.
    If I put the key with a name already exist, all is null, I get:
    Transaction failure in method:
    Is it possible to get more detailed information, what was the reason of the problem? Because the same message for different problem can confuse a user.
    Thanks in advance.

    I'll post an simple one to many relation ship example..
    order table:
    orderPK int
    orderId int
    line item table:
    lineItemPK int
    lineItemId int
    orderId int
    abstract PModel
    public abstract class OrderBean implements EntityBean
    public Collection getLineItems();
    public void setLineItems(Collection lineItems);
    publi interface LineItemLocal extends EJBLocalObject
    public Integer getLineItem();
    public void setLineItem(Integere value);
    bean class for LineItem
    public class LineItemBean implements EntityBean
    public Inbteger ejbCreate(Integer lineItem)
    setLineItem(lineItem);
    return null;
    public void ejbPostCreate(Intger lineItem)
    public abstract Integer getId();
    public abstract Integer setId();
    //entity bean methods
    public abstract class OrderBean implements EntityBean
    public void addLineItem(Integer lineItem)
    InitialContext cntx=new InitialContext();
    LineItemHomeLocal lineItemHome=cntx.lookup("LineItemHomeLocal");
    lineItemLocal lineItemLocal=lineItemHome.create(lineItem);
    Collection lineItems=this.getLineItems();
    lineItems.add(lineItemLoacl);
    schema defnition:
    <relationships>
    <ejb-relation>
    <ejb-relation-name>Order-LineItems</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>orderHasLineitem</ejb-relationship-role-name>
    <mutiplicity>one</multiplicity>
    <relationship-role-source>OredrBean</relationship-role-source>
    <cmr-field>
    <cmr-field-name>lineItems</cmr-field-name>
    <cmr-field-type>Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>LineItembelongstooredr</ejb-relationship-role-name>
    <mutiplicity>many</multiplicity>
    <relationship-role-source>LineItemBean</relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>

  • 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

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

  • Database Views with Entity EJBs

    Is it possible to use Weblogic Workshop to create a CMP entity EJB on an Oracle database view for a Weblogic 8.1 server?
    Is there special configuration I need to do for either the Oracle or Weblogic side to accomplish this?
    Thanks.
    Tania

    I can manually create the EJB, an it builds just
    fine, but when I go to deploy it, I get the following
    error:
    [EJB:011076]Unable to deploy the EJB
    'AssortmentMerchandise' because the databas
    e table 'K_BA01.BAV_ASRT_CLUSTR_DAT' is not
    accessible. Please ensure that this
    table exists and is accessible.
    The view is on the same datasource that I have
    successfully created all of my other entity EJBs
    (from tables).
    I can select data from the view using JDBC and the
    same datasource that I am trying to associate the EJB
    to.
    Any ideas what might be wrong with my view?Are you using synonyms or aliases? I would double check those...
    Log in using same username and password as weblogic and try a simple query:
    select * from K_BA01.BAV_ASRT_CLUSTR_DAT

  • Mapping of an entity EJB to multiple database tables using CMP?

    Can one entity EJB have attributes split between (mapped to) multiple databse tables?
    Would CMR work properly between two such entity EJBs (both mapped to multiple database
    tables).

    Hi Milos.
    Can one entity EJB have attributes split between (mapped to) >>multiple databasetables?
    A CMP Entity should be always mapped a record in a single DB table.
    Thanks.
    Ji Zhang
    Developer Relations Engineer
    BEA Support

  • Oracle VM Server for SPARC - network multipathing architecture question

    This is a general architecture question about how to best setup network multipathing
    I am reading the "Oracle VM Server for SPARC 2.2 Administration Guide" but I can't find what I am looking for.
    From reading the document is appears it is possible to:
    (a) Configure IPMP in the Service Domain (pg. 155)
    - This protects against link level failure but won't protect against the failure of an entire Service LDOM?
    (b) Configure IPMP in the Guest Domain (pg. 154)
    - This will protect against Service LDOM failure but moves the complexity to the Guest Domain
    - This means the there are two (2) VNICs in the guest though?
    In AIX, "Shared Ethernet Adapter (SEA) Failover" it presents a single NIC to the guest but can tolerate failure of a single VIOS (~Service LDOM) as well as link level failure in each VIO Server.
    https://www.ibm.com/developerworks/mydeveloperworks/blogs/aixpert/entry/shared_ethernet_adapter_sea_failover_with_load_balancing198?lang=en
    Is there not a way to do something similar in Oracle VM Server for SPARC that provides the following:
    (1) Two (2) Service Domains
    (2) Network Redundancy within the Service Domain
    (3) Service Domain Redundancy
    (4) Simplify the Guest Domain (ie single virtual NIC) with no IPMP in the Guest
    Virtual Disk Multipathing appears to work as one would expect (at least according the the documentation, pg. 120). I don't need to setup mpxio in the guest. So I'm not sure why I would need to setup IPMP in the guest.
    Edited by: 905243 on Aug 23, 2012 1:27 PM

    Hi,
    there's link-based and probe-based IPMP. We use link-based IPMP (in the primary domain and in the guest LDOMs).
    For the guest LDOMs you have to set the phys-state linkprop on the vnets if you want to use link-based IPMP:
    ldm set-vnet linkprop=phys-state vnetX ldom-name
    If you want to use IPMP with vsw interfaces in the primary domain, you have to set the phys-state linkprop in the vswitch:
    ldm set-vswitch linkprop=phys-state net-dev=<phys_iface_e.g._igb0> <vswitch-name>
    Bye,
    Alexander.

  • 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

  • Deployment error: The Entity EJB requires the table:  to be accessible

    Hello
    When I deploy my EJBs, WEBLogic throws an exception:
    Unable to deploy EJB: OrderBean from ejb-jar-ic.jar:
    The Entity EJB requires the table: Order to be accessible. Please ensure that th
    is table exists and is accessible.
    I use built in Cloudscape database.
    And I have those lines in descriptor:
    <weblogic-rdbms-bean>
    <ejb-name>OrderBean</ejb-name>
    <data-source-name>ejbDS</data-source-name>
    <table-name>Order</table-name>
    <field-map>
    <cmp-field>totalAmount</cmp-field>
    <dbms-column>totalAmount</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>time</cmp-field>
    <dbms-column>ordertime</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>orderID</cmp-field>
    <dbms-column>orderID</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>True</create-default-dbms-tables>
    thanx in advance
    Maris

    Hi Maris,
    I see that you have create-default-dbms-tables set to true so WLS should be creating
    the database table for your EJB. If you can give me some more information, I'll be
    able to help you further. What version of WLS + service pack are you using? Also,
    is this a 1.1 bean or 2.0? Lastly, what are the types of the CMP fields in your
    bean?
    As a work-around, you can try creating the database table yourself before deploying
    the bean. This should resolve the deployment problem.
    - Matt
    Maris wrote:
    Hello
    When I deploy my EJBs, WEBLogic throws an exception:
    Unable to deploy EJB: OrderBean from ejb-jar-ic.jar:
    The Entity EJB requires the table: Order to be accessible. Please ensure that th
    is table exists and is accessible.
    I use built in Cloudscape database.
    And I have those lines in descriptor:
    <weblogic-rdbms-bean>
    <ejb-name>OrderBean</ejb-name>
    <data-source-name>ejbDS</data-source-name>
    <table-name>Order</table-name>
    <field-map>
    <cmp-field>totalAmount</cmp-field>
    <dbms-column>totalAmount</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>time</cmp-field>
    <dbms-column>ordertime</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>orderID</cmp-field>
    <dbms-column>orderID</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>True</create-default-dbms-tables>
    thanx in advance
    Maris

Maybe you are looking for

  • Can I use the same Mail configuration on more than one mac?

    I have many (15+) email accounts. I'd like to duplicate the accounts and signatures that I use on my desktop computer onto my laptop. Is this possible? What files do I copy?

  • Goods Receipt And Goods issued

    When i made a goods Receipt document then Stock Account D Stock difference Gain Account C it is clear but one more account also Credit(Material Variance  C) Stock Account D Stock difference Gain Account C Material Variance  C why this ladger post ent

  • How to convert table to control

    In my attached VIS, I am giving user input values to controls,the user input control values i am passing to a table and writing text file.how can i do exactly opposite of that what i am doing now.that means reading same text file(that i already writt

  • Kde-i18n-pl (3.3.0)

    pkgname=kde-i18n-pl pkgver=3.3.0 pkgrel=1 pkgdesc="Polish Localization for KDE." url="http://i18n.kde.org/stats/gui/KDE_3_3_BRANCH/pl/index.php" pkgurl="ftp://ftp.kde.org/pub/kde/stable/3.3/src/kde-i18n/" depends=('kdebase>=3.3.0') source=($pkgurl/$p

  • Power adapter and three-prong plug

    Hello, My used iBook G3 500MHz came with a model A1036 power adapter. The AC cord has a three-prong plug. Is this the correct adapter for this unit? Replacement power adapters all seem to have only a two-prong plug. Is the three-prong plug necessary?