Trying to understand Provides Dependency type

I am trying to understand the Provides dependency type. I have
reviewed the online documentation, but I'm not quite there yet.
I have a SQL script, with a create table statement, to create
the CUST table. When I parse the SQL script, I think I should
get a Provides dependency with a subtype of Created. However, I
don't get any Provides dependency types.
Am I missing a step? Do I need to create something else? Or
have I completely missed the boat?
Thanks!
Vini

Vandana,
What you see is the way the Dependency Manager is designed to
work. When you parse a file or object it looks for things it
provides and things it uses.
In the case of a ddl script with a create table statement the
dependency tables will populated with provides dependencies for
the table and the columns. If this is all you have parsed, and
you use the dependency manager to show the dependencies for ddl
file you will see no dependencies in the right hand side results
pane. This is correct. In the left hand pane of the Dependency
manager you expand the ddl file node you will see the table(s)
created in the file. These are the provide dependencies.
(As an aside, if you parse an Oracle Form and select the form in
the Dependency manager left pane, you can expand the node and see
all the blocks and items etc in the form. This is because the
form "provides" all these "things" that maybe subclassed into
other forms)
If you subsequently parse other objects/files that use the table
then you will see the dependencies between them in the right hand
pane.
The slightly confusing part is if you have modelled the table in
Designer as well as stored the ddl that creates the table the
dependency manager doesn't show dependencies between them. The
product just treats these as two providers of the same table. So
this means when look at, say a form that uses the table, the
dependency manager will show that the for uses both file and
modelled table.
I hope this makes things clearer
Regards
mark

Similar Messages

  • Trying to understand OIM - Please help

    Hello All,
    I am pretty new to OIM, just trying to understand how OIM works. For the past 4 years I was in Sun IdM and planning to switch over to OIM.
    I read some documentation, I think OIM will perform basic provisioning and it contains out of box connectors to do basic provisoning. I have some questions can anybody please help
    - Sun IdM uses Express language to develop custom workflows or forms, in OIM to develop workflows which language did you use, is it Java or any other language?
    - If I want to provision users on AS/400, HP Open VMS or AIX systems, how can I do that I don't see any out of box connectors for these resources, so in order to integrate these resources do we need to write our own custom connectors?
    - If the out of box connector does not support a specific function on a resource what are the options do we have? for example if the AD connector does not support to delete the exchange mailbox, how your going to perform this in OIM? Do we need to write a Java code for this?
    - How much Java coding is necessary in OIM?
    - Is OIM supports role based provisioning?
    Please share any information.
    Thanks in advance.

    Sun IdM uses Express language to develop custom workflows or forms, in OIM to develop workflows which language did you use, is it Java or any other language?
    - JAVA
    If I want to provision users on AS/400, HP Open VMS or AIX systems, how can I do that I don't see any out of box connectors for these resources, so in order to integrate these resources do we need to write our own custom connectors?
    - If OOTB connectors are not available then you'll have build you own connector as per Target Resource.
    If the out of box connector does not support a specific function on a resource what are the options do we have?
    - You'll have customize their connector as per your requirements or write your own
    How much Java coding is necessary in OIM?
    - We can't calculate how much java. It's totally depends on requirements how much code you'll ahve to write. But everything will be done using Java only.
    - Is OIM supports role based provisioning?
    Here Group represent Role. At a small scale it supports. But for large scale you'll have to use Oracle Role Manager as you do in Sun Role Manager.

  • Is there a way to get the correct order from the dependent types of a sche

    Hi ,
    I have a CT facing the following problem:
    When trying to built a SQL script to create all the object types within a schema using the DBMS_METADATA packages.
    Did insert in a table the names of the types that will be exported following a concrete order, next loop into the table and call the DBMS_METADATA package for each row.
    These type are depedent between them, there are some type attributes calling other types and here the issue
    First : try to generate the order by created column of dba_objects and when the generated SQL script is launched a lot of type appearing as incomplete state due to the order isn't correct.
    Second : try to insert the table ordering by object_id colums of dba_tables view, it appears incomplete types too.
    Currently want to insert the table using a recursive query with connect by against the dba_type_attrs starting with the rows when ATTR_TYPE_NAME is not null (the types that are called by other types), but this way has a issue dificult to resolve: the roots of hierarchy are the rows when ATTR_TYPE_NAME is not null and we've dependencies between roots nodes
    The question is is there a way to get the correct order from the dependent types of a schema?
    Platform: IBM SP AIX
    DB version: 9.2.0.7
    Any help will be appreciated .
    Thanks in advance.

    The xxx_dependencies view should give you the dependencies betwee nthe various types. I would look at something along the lines of:
    SELECT object_name, referenced_name
    FROM (SELECT o.object_name, d.referenced_name
          FROM user_objects o, user_dependencies d
          WHERE o.object_name = d.name(+) and
                o.object_type = d.type(+) and
                d.referenced_type(+) = 'TYPE' and
                o.object_type = 'TYPE')
    START WITH referenced_name IS NULL
    CONNECT BY PRIOR object_name = referenced_nameThe outer join between user_objects and user_dependencies is required to generate the names of types which are not dependent on other types, or do not have other types dependent on them.
    HTH
    John

  • UTL_HTTP.end_of_body Exception Error.  Trying to Understand the Reason Why?

    I have the following PLSQL Function that returns a End_of_body Error. This started when we migrated from 10g to 11g. It is simple enough to capture so the error does not stop the Function Flow, but the error causes the OCI driver in OBIEE to error, which prevents the use of OBIEE IBOT to execute. Trying to understand why this error is occurring..not sure if we have a permissions issue on the UTL_HTTP Package or what?
    Anyone seen this problem in 11g? Suggests on resolving would be great. Thanks.
    FUNCTION AA_DEMO_PO_WSDL(IN_MESSAGE IN VARCHAR2)
    RETURN VARCHAR IS
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    launch_url varchar2(240) ;
    o_message varchar2(240) ;
    po_amount number := 2000 ;
    total_calls number := 0;
    cursor c_PO_exists is Cursor Logic..
    begin
    total_calls := 0;
    For po_wsdl in c_PO_exists
    LOOP
    total_calls := total_calls + 1;
    soap_request:='<?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header/>
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/PurchaseOrder_Approval">
    <ns1:ProcessRequest><ns1:input>PO' || po_wsdl.order_no || '</ns1:input></ns1:ProcessRequest>
    </soap:Body>
    </soap:Envelope>';
    Begin
    http_req:= utl_http.begin_request('myURL/PurchaseOrder_Approval/1.0','POST','HTTP/1.1');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    utl_http.set_header(http_req, 'SOAPAction', 'initiate');
    utl_http.write_text(http_req, soap_request) ;
    http_resp:= utl_http.get_response(http_req) ;
    utl_http.read_text(http_resp, soap_respond) ;
    utl_http.end_response(http_resp) ;
    Exception
    WHEN UTL_HTTP.end_of_body THEN
    utl_http.end_response(http_resp);
    When utl_http.too_many_requests then
    utl_http.end_response(http_resp);
    o_message := 'End_Reponse' || ' from proc.';
    when OTHERS then
    o_message := SQLERRM || ' from proc.';
    return o_message;
    end;
    END LOOP;
    Return 'Workflow Initiated-' ||to_char(total_calls);
    end AA_DEMO_PO_WSDL;

    Hi, thanks,
    it is oracle10g,
    The Exception is : ORA-29266: end-of-body reached
    ORA-06512: at "SYS.UTL_HTTP", line 1349
    then the line in my function ,
    damorgan wrote:
    But I do note that when I do this I always do a get_header_count and get_header before get_read.what get_read , u mean?
    thanks for the link ,
    appreciated

  • [SOLVED] Trying to understand the "size on disk" concept

    Hi all,
    I was trying to understand the difference between "size" and "size on disk".
    A google search gave plenty of results and I thought I got a clear idea about
    it.. All data is stored in small chunks of a fixed size depending on the
    filesystem and the last chunk is going to have some wasted space which
    will *have* to be allocated.. Thus the extra space on disk.
    However I'm still confused.. When I look at my home folder, the size on disk
    is more than 320 GB, where as my partition is actually less than 80 GB, so
    I guess I'm missing something.. Could somebody explain to me what does
    320 GB of 'size on disk' means?
    Thanks a lot in advance..
    Last edited by geo909 (2011-12-15 23:17:25)

    Hi all,
    Thank you for your replies.. My file manager is indeed pcman fm and
    indeed it seems to be an issue.. In b4data's link the last post reads:
    B-Con wrote:
    FWIW, I found the problem. (This bug is still persistent in v0.9.9.)
    My (new) PCManFM bug report is here: http://sourceforge.net/tracker/index.ph … tid=801864
    I submitted a potential patch here: http://sourceforge.net/tracker/?func=de … tid=801866
    Bottom line is that the file's block size and block count data from the file's inode wasn't being interpreted and used properly. The bug is in PCManFM, not any dependent libraries. Details are in the bug report.
    Since PCManFM is highly used by the Arch community, I figured I should post an update here so that there's some record of it in our community. Hopefully this gets addressed by the developer(s) relatively soon. :-)
    I guess that pretty much explains things.. And I think I did understand the 'size on disk' concept
    anyway
    Thanks again!
    Last edited by geo909 (2011-12-15 23:17:10)

  • Trying to understand the code???

    Hi,
    I am trying to understand the following bit of code, currently the code puts each catalogue into a different row of the table but i want each catalogue to be put in the next column
    (so the catalogues appear across the page on the actual web page). The following code is for the page in question but im not sure how much is relevant so i will paste it all and highlight the section i think is relevant:
    <html>
    <%-- DECLARATIONS --%>
    <%@ page import="se.ibs.ns.cf.*,  se.ibs.ccf.*, se.ibs.bap.*, se.ibs.bap.util.*, se.ibs.bap.web.*,  java.util.*, se.ibs.ns.icat.*, se.ibs.bap.asw.cf.*, java.lang.*" %>
    <% ItemCatalogueBean bean = (ItemCatalogueBean)SessionHelper.getSessionObject("ItemCatalogueBean",session);
       String resourcePath = bean.getResourcePath(null);
       String title = "Product catalogue";
       String languageCode = bean.getLanguageCode();
    %>
    <%@ include file="FuncHead.jsp" %>
    <BODY class="IBSBody" onLoad="loaded = true;">
    <form method="POST" action=<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueSearchServlet", response) %> name="basicForm">
    <%@ include file="FuncSubmitScript.jsp" %>
    <%@ include file="FuncPageBegin.jsp" %>
    <div align="center">
      <table border="0" width="895">
        <tr>
          <td align="left" width="502">
    <div align="left">
      <table border="0" width="500">
        <tr>
          <td class="IBSPageTitleText" align="left" valign="top" width="238">
              <%@ include file="FuncPageTitle.jsp" %>
              <%@ include file="FuncPageTitleImage.jsp" %>
                    <br>
           On this page you can see the product catalogues. Click on one of the
           links to go to the next level. Alternatively you can click the <b>Search
           catalogue</b> button to find the products of interest.</td>
               <td width="248" valign="bottom">
                <div align="left"><%@ include file="FuncShoppingCart.jsp" %></div>
               </td>
        </tr>
      </table>
    </div></td></tr></table></div>
    <input type="submit" value="Search catalogue" name="ACTION_NONE" onClick="submitButtonOnce(this); return false">
    <hr>
    <%-- REPEAT CATALOGUES --%>
    <div align="left">
    <table border="0" width="100%">
    <% Vector catalogues = bean.getItemCatalogues();
            int cataloguesSize = catalogues.size();
               for (int i = 0; i < cataloguesSize; i++){
                      BAPItemCatalogue cat =  (BAPItemCatalogue) catalogues.elementAt(i); %>
              <%-- LINK AND MARK AS NEW --%>
                  <tr>
                         <td width="23%"><a class="IBSMenuLink" href="link" onClick="javascript:invokeLink('<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueCategoryServlet", response) %>?CODE=<%= ToolBox.encodeURLParameter(cat.getCode())%>'); return false">
                              <%= cat.getDescription(languageCode) %></a>
                         </td>
                         <td width="40%" align="right">
                              <% if (cat.isNew()) {%>
                                     <img border=0 src="<%= resourcePath %>new.gif">
                              <% } %>
                        </td>
                  </tr>
              <%--  CATALOGUES IMAGE AND INTERNET INFORMATION (text, multimedia objects,downloads, links...) --%>
                  <tr>
                         <td width="23%" valign="top" align="left">
                              <% if (bean.isAdvanced(cat) && bean.hasMultimediaImage(cat)) { %>
                                   <a href="link" onClick="javascript:invokeLink('<%= bean.getEncodedServlet("se.ibs.ns.icat.ItemCatalogueCategoryServlet", response) %>?CODE=<%= ToolBox.encodeURLParameter(cat.getCode())%>'); return false">
                                   <img border="0" src="<%= bean.getMultimediaImage(cat) %>"></a>
                        <% } else {%>     
                                   <img border="0" src="<%= resourcePath %>Catalog.gif">
                              <% } %>
                         </td>
                         <td class="IBSTextNormal" width="40%" valign="top">
                              <%= bean.getWebText(cat) %>
                         </td>
                  </tr>
                  <tr>
                         <td width="23%">
                         </td>
                         <td width="40%">
                         <% Vector mmLinks = bean.getMultimediaLinks(cat);
                      int mmLinksSize = mmLinks.size();     
                              for (int ml=0; ml<mmLinksSize; ml++){
                                   BAPCodeAndDescription mmLink = (BAPCodeAndDescription)mmLinks.elementAt(ml); %>
                                   <a class="IBSLink" href="<%= mmLink.getCode() %>" target="_blank"><%= mmLink.getDescription() %></a><br>
                         <% } %>
                   <% Vector webLinks = bean.getWebLinks(cat);
                        int webLinksSize = webLinks.size();
                        for (int wl=0; wl<webLinksSize; wl++){
                                   BAPCodeAndDescription webLink = (BAPCodeAndDescription)webLinks.elementAt(wl); %>
                                   <a class="IBSLink" href="<%= webLink.getCode() %>" target="_blank"><%= webLink.getDescription() %></a><br>
                        <% } %>
                         </td>
                  </tr>
                <%}%>
    </table>
    </div>
    <%@ include file="FuncPageLinks.jsp" %>
    <%@ include file="FuncPageEnd.jsp" %>
    </form>
    </body>
    </html>i hope someone could help me to understand this,
    thank you for your help

    You've probably already seen these, but here are a couple of links that may help.
    http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/operators.html#array_a ccess
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/Array.html
    What's basically happening is that the "for" loop goes through each item in the array.  Don't be confused by the fact that two of the items in the array are Strings and one is an Integer - variable i being a String has nothing to do with the data type of the elements in the array.
    The following code:
    private function createLabels():void
         var myArray:Array = ['one', 'two', 3];
         for(var i:String in myArray)
              trace("i = " + i);
              trace(myArray[i]);
    gives the following results:
    i = 0
    one
    i = 1
    two
    i = 2
    3
    From that we can see that the "for" loop is assigning the index number of each array element, not the actual array element ('one', 'two', or 3) to the variable i.  So calling myArray[i] is the same as calling myArray[0] the first time through the loop.  This type of "for" loop is just a shorter way of doing the following, which produces exactly the same results:
    private function createLabels():void
         var myArray:Array = ['one', 'two', 3];
         for(var i:int = 0; n < myArray.length; i++)
              trace("i = " + i);
              trace(myArray[i]);
    Hope that helps.
    Cheers!

  • Trying to understand the basic concept of object oriented programming.

    I am trying to understand the basic concept of object oriented programming.
    Object - a region of storage that define is defined by both state/behavior.
    ( An object is the actual thing that behavior affects.)
    State - Represented by a set of variables and the values they contain.
    (Is the location or movement or action that is the goal that the behavior is trying to accomplish.)
    Variables- (What does this mean?)
    Value - (What does this mean?)
    Behavior - Represented by a set of methods and the logic they implement.
    ( A set of methods that is built up to tell's the how object to change it's state. )
    Methods - A procedure that is executed when an object receives a message.
    ( A very basic comand.For example the method tells the object to move up, another method tells the method to go left. Thus making the object move up/left that combination is the behavior.)
    Class - A template from which the objects are created.
    ( I am very confused on what classes are.)
    - The definitions of the words I obtained from the "Osborne Teach Yourself Java". The () statements are how I interperate the Mechanisms (I do not know if Thats what you call them.) interact with each other. I understand my interpretation may be horribly wrong. I will incredibly appreciate all the support I may get from you.
    Thank you

    Object oriented programming is a replacement for the older idea of procedural programming (you can research procedural programming in google). As I understand it, in procedural programming, you have a step by step set of function calls to accomplish some task. Each function receives a data structure, manipulates it, and passes it to the next function. The problem with this is that each function preforms some action for the overall task and can't easily be reused by some other task. Its also harder to read the flow of what is happening with raw data structures flying all over the place.
    In object oriented programming, an object calls a function of another object and receives back, not a data structure, but another object. Objects contain a data structure that can only be accessed by its functions. An object is not so much a sub component of a bigger task, as it is a service that any other task can use for any purpose. Also, when you pass an object to the caller, the caller can ask questions about the data structure via its functions. The developer doesnt have to know what the previous function did to the data by reading up on any documentation, or having to reverse engineer the code.
    I suggest the best way of learning this is to code something like a library object.
    A library object contains a collection of book objects
    A book object contains a collection of chapter objects
    A chapter object contains a collection of paragraph objects
    A paragraph object contains a collection of sentence objects
    A sentence object contains a collection of word objects.
    Add functions to each object to provide a service
    Example: A library object should have a:
    public void addBook(Book book)
    public Book getBook(String title)
    public boolean isBookInLibrary(String title)
    The key is to add functions to provide a service to anyone who uses your object(s)
    For example, what functions (service) should a paragraph object provide?
    It shouldn't provide a function that tells how many words there are in a sentence. That function belongs to a sentence object.
    Lets say you want to add a new chapter to a book. The task is easy to read
    if you write your objects well:
    Sentence sentence1=new Sentence("It was a dark and stormy night");
    Sentence sentence2=new Sentence("Suddenly, a shot ran out");
    Paragraph paragraph=new Paragraph();
    paragraph.addSentence(sentence1);
    paragraph.addSentence(sentence2);
    Paragraphs paragraphs=new Paragraphs();
    paragraphs.addParagraph(paragraph);
    Library library= new Library();
    library.getBook("My Novel").addChapter("Chapter 1",paragraphs).
    Now, lets say you want to have a word count for the entire book.
    The book should ask each chapter how many words it contains.
    Each chapter should ask its paragraphs, each paragraph should ask
    its sentences. The total of words should ripple up and be tallied at each
    stage until it reaches the book. The book can then report the total.
    Only the sentence object actually counts words. The other objects just tallies the counts.
    Now, where would you assign a librarian? What object(s) and functions would you provide?
    If written well, the project is easily extensible.

  • Trying to understand the Serialization interface

    Im trying to understand the Serialization of objects?
    As an example, I create a Library class that implements Serializable, that stores a collection of Book objects
    If I am only looking at saving a Library object to file, does the Book class require Serialization also or just the Library?
    I have read the API on serialization, no answer there, if it is it's not easy to understand or read into the API...

    There are some really important things to know about when doing serialization. For example one important thing to know about that not is mentioned here is that your serializable classes must define its own private static final long serialVersionUID because if you not do that will you not be able to deserialize (read in) the data you have saved later if you change anything in your serializable class. It is a bit tricky to manage files to which you have serialized different versions of your class, that is versions where you have added more serializable members to the class after you have serialized files. Well, it is not a problem if you don´t care if you have to type in all your saved data again every time you change anything instead of deserialize it (read it) from your file of course :)
    Situations like this may be handled if you define your own (private) writeObject(ObjectOutputStream) and your own readObject(ObjectInputStream) methods in your serializable class but there is a better a lot smarter way to handle this. Use of a serialization proxy! how to use that is described in the excellent book Effective Java 2nd ed. With a serialzation proxy for every serializable version of your class (where a version corresponds to a version of your class with differences in its number of serializable members) may your class deserialize data written from elder versions of your class also. Actually is it first since I read the last chapter of Effective Java that I think I have myself begin to understand serialization well enough and I recommend you to do the same to learn how to use serialization in practice.

  • Trying to understand Transferable

    Hello, I'm trying to write a drag-and-drop file uploading applet and am thus trying to understand the Transferable interface. I found some very clear source but no clear explanation of one point. I'm sure this information is commonly available; I apologize for being unable to find it and would appreciate a link.
    Running this code :
    public boolean importData(JComponent src, Transferable transferable) {
    println("Receiving data from " + src);
    println("Transferable object is: " + transferable);
    println("Valid data flavors: ");
    DataFlavor[] flavors = transferable.getTransferDataFlavors();
    DataFlavor listFlavor = null;
    DataFlavor objectFlavor = null;
    DataFlavor readerFlavor = null;
    int lastFlavor = flavors.length - 1;
    // Check the flavors and see if we find one we like.
    // If we do, save it.
    for (int f = 0; f <= lastFlavor; f++) {
    println(" " + flavors[f]);
    if (flavors[f].isFlavorJavaFileListType()) {
    listFlavor = flavors[f];
    if (flavors[f].isFlavorSerializedObjectType()) {
    objectFlavor = flavors[f];
    if (flavors[f].isRepresentationClassReader()) {
    readerFlavor = flavors[f];
    // Ok, now try to display the content of the drop.
    try {
    DataFlavor bestTextFlavor = DataFlavor.selectBestTextFlavor(flavors);
    BufferedReader br = null;
    String line = null;
    if (bestTextFlavor != null) {
    println("Best text flavor: " + bestTextFlavor.getMimeType());
    println("Content:");
    Reader r = bestTextFlavor.getReaderForText(transferable);
    br = new BufferedReader(r);
    line = br.readLine();
    while (line != null) {
    println(line);
    line = br.readLine();
    br.close();
    else if (listFlavor != null) {
    java.util.List list = (java.util.List)transferable.getTransferData(listFlavor);
    println( list + " Size " + list.size());
    else if (objectFlavor != null) {
    println("Data is a java object:\n" + transferable.getTransferData(objectFlavor));
    else if (readerFlavor != null) {
    println("Data is an InputStream:");
    br = new BufferedReader((Reader)transferable.getTransferData(readerFlavor));
    line = br.readLine();
    while (line != null) {
    println(line);
    br.close();
    else {
    // Don't know this flavor type yet...
    println("No text representation to show.");
    println("\n\n");
    catch (Exception e) {
    println("Caught exception decoding transfer:");
    println(e);
    return false;
    return true;
    which you'll agree is very clear, returns me a List of filepaths when I drop files on it. Perhaps naively, I was hoping to get the data itself.
    Obviously I can go the route of messing with security settings to allow the applet to open files (eeew) but I'm hoping the actual data is available from Transferable and I'm simply not understanding how to do it.
    Thanks for any tips.

    And don't forget to check this link:
    http://www.javaworld.com/jw-03-1999/dragndrop/jw-03-dragndrop.zip
    I think with few modifications you can get what you want.

  • Trying to understand hashCode( )

    Hello again, I'm trying to understand the hashCode( ) method. I have a textbook which describes it this way:
    "A hashcode is a value that uniquely identifies an individual object. For example, you could use the memory address of an object as it's hashcode if you wanted. It's used as a key in the standard java.util.Hashtable[i] class."
    Please forgive me if this emplies that I may be a bit slow with this, but this explanation is too vague for me to grasph what's going on here. Can someone thoroughly explain (in a non scientific way), how and why this method is used?
    Thanks in advance.

    I thought the examples I provided might give you an idea why the hashCode method is useful. I'll try one more brief one, and if that doesn't connect that spare wire to the light bulb over your head, then I'll have to agree with schapel and suggest that you study up on your CS theory.
    This will be a really crocked up example, and you could skirt some of the issues with better design, but it's a valid example nonetheless.
    You run a greenhouse or an arboretum or something. You've got 25,000 Tree objects (forget their subclasses for now). Trees have properties like species, name (I don't know why you'd name a tree--just bear with me), location, age, medical history. You're going to put your Trees into a java.util.Set, so you've got a collection with one reference to each tree. However, you're getting overlapping subsets of your trees from various sources--that is getAllElms() returns some trees that are also in getAllOlderThan(10). You need to combine all those results into a 1-each collection of Trees.
    When you go to add an Object to the Set, the Set has to first check if that Object is already present. The Set implementation could iterate over all its elements and call equals() to see if that Object is already there. Or, it could first get the hashCode (let's say you've implemented hashCode to return the xor of the species and the age). So, maybe 100 out of your 25,000 trees are 50 yeard old Elms. Internally, if the Set implementation keeps a mapping from hashCode to an array of Trees with that hashcode, then it only has to copmare to those 100 trees that match, rather than all 25,000.
    As I said, this is a cheezy example. One problem is that if trees are mutable, this Set implementation won't work, since the Set won't know that a Tree's internal values (and hence, possibly, its hashCode) have changed.
    Is is making any sense yet?
    Okay so please help me understand this rudimentary,
    logical reason for wanting to use a hashCode( )? Say
    I create a top level class called "Plant.java". Now
    from that class I create a subclass called Tree.java
    from which several other subclasses and objects are
    created. Help me gain a basic understanding of why
    and how the hashCode( ) method might be beneficial.
    (lol... I feel sort of like I've opened up a cool new
    electronic toy, I'm standing here with a "spare wire
    in my hand wondering what the heck this part is
    for?")
    Thanks again for your help. I really apprecitate it.

  • Trying to understand a WS-I validation failure

    I'm trying to understand the following WS-I validation failure message. I'm sure I'm making a basic mistake but I can't find an example of the use case where an xsd is imported. Can someone point out my error?
    Thanks,
    Bret
    Validation failure:
    Result failed:
    Failure Message: A QName reference that is referring to a schema component, uses a namespace not defined in the targetNamespace attribute on the xs:schema element, or in the namespace attribute on an xs:import element within the xs:schema element.Failure Detail Message:
    {http://Messages.xsd}SigReplyMessage,
    {http://schemas.xmlsoap.org/wsdl/}string,
    {http://Messages.xsd}SigRequestMessage
    Element Location: lineNumber=8
    My wsdl looks like this:
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="../../XSDDocument/Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" type="messages:SigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" type="messages:SigRequestMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="sigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <message name="SigFault">
    <part name="faultMessage" element="string"/>
    </message>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </input>
    <output>
    <soap:body use="literal" parts="Signature"/>
    </output>
    <fault name="sigFault">
    <soap:body use="literal" parts="SecretKey PublicKey"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Messages.xsd looks like this:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.bret.org/S3test/Messages"
    targetNamespace="http://www.bret.org/S3test/Messages"
    elementFormDefault="qualified">
    <xsd:complexType name="sigRequestMessage">
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="sigReplyMessage">
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

    Hi Bret,
    Sorry it's taken me a bit of time to respond, but please find below a run-down of the WS-I related problems I spotted in your WSDL document. The first few are related to the import error you saw, and there's a few others that I'll also discuss. Apologies in advance if you've already spotted and corrected those.
    I'll use line numbering based on the formatting of the WSDL and XSD that you supplied.
    BP2417 (the one you asked about)
    The line number in the error is a red herring. There are two problems here:
    - WSDL document, line 29: You're using the XSD type string unqualified - it should be xsd:string.
    - WSDL document, lines 8 and 13; schema, lines 3 and 4: The namespaces you're using don't match. Either change the namespaces in the schema to be http://Messages.xsd, or change the namespaces in the WSDL to http://www.bret.org/S3test/Messages.
    BP2202
    You should declare UTF-8 or UTF-16 encoding when creating WSDL or schema documents. The easiest way to do this is to go to Tools|Preferences, and set JDeveloper's default encoding to either UTF-8 or UTF-16.
    BP2032
    WSDL document, line 26 and 43: The name attribute of the fault should read SigFault, not sigFault, as WSDL is case-sensitive.
    WSDL document, line 44: You should use a soap:fault element, not a soap:body element, to bind a fault, thus:
    <soap:fault name="SigFault" use="literal"/>
    BP2012
    WSDL document, lines 17 and 20: Message parts in a document-bound service like this one should reference XSD elements and not complexTypes. What you need to do is define two elements in your messages schema whose types are SigReplyMessage and SigRequestMessage respectively, and then reference those elements from the WSDL.
    WSDL document, line 38: The value of the parts attribute should be Keys to match the name of the part child of the RequestSignature.
    WSDL document, line 41: The value of the parts attribute should be SigAndExp to match the name of the part child of the ReturnSignature.
    WSDL document, line 44: The value of the parts attribute should be faultMessage to match the name of the part child of the SigFault.
    BP2115
    WSDL document, lines 17 and 20: The names of the elements should be sigReplyMessage and sigRequestMessage and not SigReplyMessage and SigRequestMessage, again because WSDL is case-sensitive.
    WSDL document, line 30: The element attribute of the part references xsd:string, which is not an element but a complexType. You'll need to add an element declaration to your schema, which is of type xsd:string.
    I've included corrected versions of your WSDL and schema below, I hope this helps. I also note you've posted a few other messages related to WS-I and WSDL, I hope I've managed to cover those in this message too.
    Regards,
    Alan.
    WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions targetNamespace="urn:S3SignatureGenerator"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:S3SignatureGenerator"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:messages="http://Messages.xsd">
    <types>
    <xsd:schema>
    <xsd:import id="Messages.xsd"
    schemaLocation="Messages.xsd"
    namespace="http://Messages.xsd"/>
    </xsd:schema>
    </types>
    <message name="ReturnSignature">
    <part name="SigAndExp" element="messages:sigReplyMessage"/>
    </message>
    <message name="RequestSignature">
    <part name="Keys" element="messages:sigRequestMessage"/>
    </message>
    <message name="SigFault">
    <part name="faultMessage" element="messages:faultMessage"/>
    </message>
    <portType name="SigGenerator">
    <operation name="GetSignature">
    <input message="tns:RequestSignature"/>
    <output message="tns:ReturnSignature"/>
    <fault name="SigFault" message="tns:SigFault"/>
    </operation>
    </portType>
    <binding name="SigGenSoapHttp" type="tns:SigGenerator">
    <soap:binding style="document"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetSignature">
    <soap:operation soapAction="urn:S3SignatureGenerator/GetSignature"/>
    <input>
    <soap:body use="literal" parts="Keys"/>
    </input>
    <output>
    <soap:body use="literal" parts="SigAndExp"/>
    </output>
    <fault name="SigFault">
    <soap:fault name="SigFault" use="literal"/>
    </fault>
    </operation>
    </binding>
    <service name="SignatureGenerationService">
    <port name="SigGenSoapHttpPort" binding="tns:SigGenSoapHttp">
    <soap:address location="tbd"/>
    </port>
    </service>
    </definitions>
    Schema:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://Messages.xsd"
    targetNamespace="http://Messages.xsd"
    elementFormDefault="qualified">
    <xsd:element name="sigRequestMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="publicKey" type="xsd:string"/>
    <xsd:element name="privateKey" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="sigReplyMessage">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Signature" type="xsd:string"/>
    <xsd:element name="expiration" type="xsd:dateTime"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="faultMessage" type="xsd:string"/>
    </xsd:schema>

  • Trying to understand java

    Trying to understand corba
    please tell me what the inout in this coode means:
    boolean book_search(inout b_item book, inout client olvas) raises (BookNoAvail)
    The type of parameter passing in Java is that it makes a copy of the parameter and themn in method somthing happens??
    So which one is it out of the two: pass by reference and pass by value?

    please tell me what the inout in this coode means:A parameter that supplies input as well as accepts output is an INOUT parameter.

  • Trying to understand Distribution Model

    When I view the metadata of a Distribution Model, I see DM overview which contains 2 tabs.  One for Data Objects and Second for Rules.  I am trying to understand the tables in each of these tabs. 
    Association Table - RR00200100G_AT
    DRDS Table - DM00200100G1
    DR Table (Runtime) - RR00200100G1
    What are they used for and when to the entries get updated?
    Thanks
    JB

    Thanks for the quick reply Siva....
    I am trying to investigate a behaviour where we have a normal rule based on a Date Pattern.  The business requirement is to distribute only today's data back to the user's device.  The issue we are seeing is that there are data in the device that were created in the past.
    The rule's criteria is based on CREATED_BY(UserID) and CREATED_ON(date) node attribute from the data object.
    In the rule, the CREATED_BY is mapped to the USER device attribute and the CREATED_ON is a date pattern, where the Operator is 'EQ', Custom Type is 'C' - Constant Offset, and Date Pattern is 'Current Date'.
    With this set-up, there are four events that were created in the Execution Plan - Device Addition, Device Modification, Device Removal and Sliding Window-Date.  There's also a job, Sliding Window-Date,
    that is scheduled to run once a day at midnight.
    My observation is that every day, after the Sliding Window-Date runs.  The DRDS & DR tables, in the second are updated.  But the entries in the Association table, from the first tab, are not updated.
    I am expecting that the Status Flag, in the Association table, of all records that are not relevant for that date, get's updated to 'D' so that when the user syncrhronize they will get deleted from the device.
    What am I missing?  What triggers the update to the Association table?

  • Trying to understand message redelivery

    Hi,
    I'm trying to understand redelivery.
    I'm using JMS to sync user data from our J2EE system with our Lotus Domino system. I want to be sure that in the advent of any failure in this the sync-ing process, a notification is sent to ensure that at least the Notes Domino stuff can be sync-ed manually by an administrator.
    So my question is how to be sure to capture and send notification of EVERY failure with the information needed to manually sync if needed?
    As I understand it, it's my responsiblity to ensure that I handle all Exceptions in the onMessage() method of our MessageListener implementation - without throwing any new Exceptions. I do this so I'm confident that things like a Notes Session not being instantiated, or a Notes document not being found are handled and notifcation sent. The result is that if an Exception occurs at this level, I handle it and as far as JMS is concerned the message was consumed and got acknowledged. Right?
    But what about messages that fail before the MessageListener is reached - presumeably a problem with the JMS provider (we're using WebLogic 6.1). Can I just rely on JMS to redeliver failed messages and not worry about them? Is there a recommended way to test such failure so I can be sure what happens? I tried throwing a RuntimeException in the onMessage() method, but I did not observe any attempts to resend the message and when I browsed the queue it was empty.
    So as you can you see, I'm unclear about this! Appreciate and clarifying points!
    Terrence

    You can rely on the JMS provider to take care of it's own failures. However, please note that the JMS provider can fail right after you have successfully done your work in onMessage - but before the message acknowledgement happens. This means that in case of failure, you may get the last consumed message again.
    Also note that different JMS providers will handle RuntimeException's raised from onMessage differently, so check your vendor's documentation. After a couple of re-tries, your JMS provider might for instance deem that the receiver/subscriber has a problem consuming said message and move the message into an error queue.
    - Bjarne.

  • Trying to understand PersistenceContextType.EXTENDED

    Hello,
    I'm trying to understand the PersistenceContextType.EXTENDED setting. It is my understanding that when I put this in my class, it means that the container managed transaction will span multiple method calls.
    I have a stateful bean:
    @Stateful(name = "StatefulContainerSessionEJB")
    public class StatefulContainerSessionEJBBean implements StatefulContainerSessionEJB, StatefulContainerSessionEJBLocal {
    @PersistenceContext(unitName = "Model",
    type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    // implied REQUIRED transaction
    public void createAddress() {
    try {
    // create a new address
    Address addr = new Address();
    //... set addr fields
    System.out.println("Persist addr at: " + addr.getStreet());
    em.persist(addr);
    System.out.println("Persist of addr complete");
    } catch (Exception ex) {
    ex.printStackTrace();
    // transaction should still be alive here
    @Remove // this is what causes the transaction to end
    public void cancelTransaction() {
    System.out.println("Transaction rolledback");
    em.getTransaction().setRollbackOnly();
    And in my main code I have:
    StatefulContainerSessionEJB statefulContainerSessionEJB;
    public String createAddressThruStateful() {
    System.out.println("Create Address Thru Stateful Button hit....");
    try {
    final Context context = getInitialContext();
    statefulContainerSessionEJB = (StatefulContainerSessionEJB)context.lookup("StatefulContainerSessionEJB");
    statefulContainerSessionEJB.createAddress();
    } catch (Exception ex) {
    ex.printStackTrace();
    return null;
    public String cancelPartTimeTransaction() {
    System.out.println("Cancel Address Thru Stateful Button hit....");
    try {
    statefulContainerSessionEJB.cancelTransaction();
    } catch (Exception ex) {
    ex.printStackTrace();
    return null;
    First question is: am I using the Stateful bean correctly in main? i.e. its a class level variable and get instantiated in the createAddressThruStateful call.
    My second question is: when I run this code, my address get commited to the DB at the end of the createAddress() call. I didn't expect this to happen.
    Please straigten me out.
    Thanks,
    Chris

    please tell me what the inout in this coode means:A parameter that supplies input as well as accepts output is an INOUT parameter.

Maybe you are looking for