GetObjectField returns a local ref to an array: original array or copy?

When GetObjectField returns a local ref to an array object, does it return a reference
to the original array or a copy that needs to be freed?
tia

BTW GetObjectField creates a new local reference of the array and you should delete it.Depends. It will be automatically deleted when the JNI function ends.
So it is a case by case decision to make for explicit deletion.
Regards

Similar Messages

  • C main pgm creates too many local refs

    Okay I give up ... I have a main program in C which calls methods in a helper class to read and write JMS queues. Right now it is leaking a local reference somewhere in the routine below, and I can't figure out where. Each time it calls this routine it seems to create one local reference which is not freed, eventually resulting in lots of "JNI local ref creation exceeded capacity" messages. (I assume that the local references are not cleaned up automatically because my main() function is in C rather than Java ... I haven't seen this addressed anywhere though.)
    Anyway, the routine attached below is what my program calls each time through its loop. There is nothing on the queue for this test, so the return value of the method is always NULL.
    Any help would be appreciated ...
    Roy Goodman
    Code follows ...
    static JNIEnv *env;
    #define CHECK_EXCEPTION() \
        if ((*env)->ExceptionOccurred(env)) { \
              (*env)->ExceptionDescribe(env); \
              logError( "Java exception encountered - see log file" ); \
              (*env)->ExceptionClear(env); \
              return JAVA_EXCEPTION; \
    int receiveWait( const char *queueName, const char *url, int wait, ppMsg msg )
      static jmethodID mid;
      static jclass cls = NULL;
      jstring receivedMsg;
      jstring jQueueName;
      jstring jUrl;
      const char *tmp;
      if ( env == NULL )
        return JAVA_EXCEPTION;
      if ( cls == NULL )
        jclass lCls = NULL;
        lCls = ( *env )->FindClass( env, QUEUE_HELPER );
        CHECK_EXCEPTION(  );
        cls = ( *env )->NewGlobalRef( env, lCls );
        ( *env )->DeleteLocalRef( env, lCls );
        mid = ( *env )->GetStaticMethodID( env, cls, "receive",
                               "(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;" );
        CHECK_EXCEPTION(  );
      jQueueName = ( *env )->NewStringUTF( env, queueName );
      jUrl = ( *env )->NewStringUTF( env, url );
      receivedMsg =
        ( *env )->CallStaticObjectMethod( env, cls, mid, jQueueName, jUrl,
                              ( jint ) wait );
      ( *env )->DeleteLocalRef( env, jQueueName );
      ( *env )->DeleteLocalRef( env, jUrl );
      CHECK_EXCEPTION(  );
      if ( receivedMsg != NULL )
        int len = ( *env )->GetStringUTFLength( env, receivedMsg );
        tmp = ( *env )->GetStringUTFChars( env, receivedMsg, 0 );
        if ( tmp != NULL && *tmp != '\0' )
          *msg = malloc( len+1 );
          memcpy( *msg, tmp, len+1 );
        else
          *msg = NULL;
      else
        *msg = NULL;
      if ( receivedMsg != NULL )
        ( *env )->ReleaseStringUTFChars( env, receivedMsg, tmp );
      ( *env )->DeleteLocalRef( env, receivedMsg );
      return OK;
    }

    After further investigation, it seems that the references are being created to the QUEUE_HELPER class. Could this be a problem in CallStaticObjectMethod() where it creates a local reference that it doesn't delete?
    Thanks again,
    Roy Goodman

  • Several Return orders with Ref. to one MTO Billing Document.

    Hi,
    I am doing RE with ref. to MTO Billing Document but i am able to issue "N" number of credit memo's with ref. to same MTO.
    Please tell me the Controll, that stops raising the second RE order with ref. to same MTO.
    I checked copy controls completion rule in Item catagory but still the problem not solved.
    Waiting for reply
    Veera.

    Dear Veera,
        The issue is related to the copy control settings only , so you go to VTAF transaction then go in to the item details of your return order type and MTO Billing document type.
    Here you can find the field positive/negative quantity you maintain that as '-' negative.
    Now you try
    I hope it will help you
    Regards,
    Murali.

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
    I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
    Thanks a lot.

    http://osi.oracle.com/~tkyte/ResultSets/index.html

  • Sorting the results returned by a Ref cursor

    Hi All,
    I have a scenario where i am asked to sort results returned by a ref cursor.
    I have to pass the column to be sorted as the Input parameter to a stored procedure. I tried using 'order by sorting_parameter' in the ref cursor's select query, but it is not sorting the results. It is not throwing any error even.
    Please help.
    Many Thanks...

    Hi
    i came across the below reply for a thread with the similar query as above.
    <<
    Justin Cave
    Posts: 10,696
    From: Michigan, USA
    Registered: 10/11/99
    Re: sort data in ref cursor
    Posted: Feb 3, 2005 10:30 AM in response to: [email protected] Reply
    No. You could sort the data in the SQL statement from which the REF CURSOR was created, but once you have a REF CURSOR, you cannot do anything but fetch from it.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC
    >>
    So, the results from a ref cursor cant be sorted?? There is no way out?
    Kindly advise.

  • ejb-local-ref where to put this tag in ejb-jar.xml ??

    I have an ejb-jar.xml that looks like this. I have had no problem with remote interfaces. Now I want the bean to have a local interface too.
    Just let me know where the tag I have mentioned for the <ejb-local-ref> has to be put into.
    When I compile this file it throws me an error which i have shown below the output of the ejb-jar.xml file
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <query>
         <query-method>
              <method-name>findAllIDMasters</method-name>
              <method-params/>
         </query-method>
         <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    I have also added the following tag in the weblogic-jar.xml
    <local-jndi-name>IDMasterEJB.IDMasterLocalHome</local-jndi-name>
    Just let me know whether I am correct
    On compilation (using ant utility) the error thrown is like this :
    ejbc:
    [java] ERROR: Error parsing 'ejb-jar.xml' line 47: The content of element type "entity" must ma
    tch "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,e
    jb-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-schema-name?,cmp-field*,pri
    mkey-field?,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,r
    esource-env-ref*,query*)".
    [java] ERROR: ejbc found errors
    [java] Java Result: 1
    Kindly Help !!!
    Thanks n regards
    Sajiv

    This should take care of it
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <query>
    <query-method>
    <method-name>findAllIDMasters</method-name>
    <method-params/>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • Ejb3 help needed( ejb-local-ref      )

    hi
    I have developed one enterprise application.In client refers the session bean in turn session bean refers the entity bean.
    But the problem is when i run that application i am not getting desired output.I ahve used JNDI look up to refer the bean.
    i am using netbeansIDE5.5 and sun's application server
    i think my web.xml ( )is not correcct.
    content of web.xml (partly)
    <ejb-local-ref>
    <ejb-ref-name>TaskSessionLocal</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home/>
    <local>TaskEjb.TaskSessionLocal</local>
    <ejb-link>TaskSession</ejb-link>
    </ejb-local-ref>
    can anybody please tell me what all these signifies(<ejb-local-ref> and all)
    regards
    shruthi

    If you're referring to an EJB 3.0 Local Business interface using an ejb-local-ref do not
    include the <local-home> element. Here's a full description of the meaning of each
    element from our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#EJB_ejb-ref_ejb_local_ref

  • Can the return from xsql:ref-cursor-function be saved & looped through XSQL?

    If <xsql:ref-cursor-function> returns one field for a number of rows, is there a way to save those values and loop through the data retrieved for other query process within XSQL? Any example?
    Thanks.
    null

    You have a couple of options.
    You can process the XML returned by <Xsql:ref-cursor-function> as the normal part of XSLT processing, or you can write a custom action handler that aggregates the action handler for <xsql:ref-cursor-function> and then uses DOM to operate on the return value.
    Search the Online XSQL Pages Documentation for the term "MyIncludeXSQLHandler" for some sample code that illustrates building a customer action handler that aggregates one of the built-in handlers.

  • Cant resolve ejb-local-ref

    Hi!
    Im a novice at this environment so I have been running the EJB Tutorial provided
    with 8.1
    Everything works as i should until I deploy the application.
    I get a:
    weblogic.management.DeploymentException: Could not setup environment - with nest
    ed exception:
    [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'Ban
    dsExampleEJB.jar#Music' declared in the ejb-ref or ejb-local-ref 'ejb/MusicLink'
    in the application module 'webapp' could not be resolved. The target EJB for
    th
    e ejb-ref could not be found. Please ensure the link is correct.]
    The code for the ejb-local-ref is as folows:
    <ejb-local-ref>
    <ejb-ref-name>ejb/MusicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    What can I be doing wrong?
    /Peter

    Gunnar,
    There are a few mistakes in the tutorial that will
    be fixed for the upcoming SP2 release. As far as the tutorial code
    itself goes I've reproduced this problem by following the tutorial
    exactly as its stated and there's a couple of things that can be
    what's causing all the problems for you and others.
    The easiest solution is to use the supplied MusicBean source that's
    supplied with the tutorial. That bean code is correct and functional.
    The tutorial is missing some of the steps required to reproduce that
    exact bean code.
    I'll cover all the errors I found. One of these is quite possibly what's
    tripping you and others up.
    1) The getBands() and addBand() method should be made to be local
    methods instead of remote methods.
    So in step 4 after you've created these methods change the interface
    exposure
    to be local either directly in the source by changing the tag, or in the
    design view
    by right clicking the method and selecting "local". This will show the
    methods
    with a yellow diamond next to them in the design view.
    You also need to enable local interfaces as well as update the local
    interface and local home interface.
    To do this:
    1) switch to the design view
    2) click on the EJB
    3) find the "naming" node in the property editor and uncheck "Remote EJB"
    4) check the "Local EJB" checkbox which will then enable the fields for
    the local and local home interfaces
    5) enter the value of local interface to be: "Music"
    6) enter the value of local home interface to be: "MusicHome"
    2) The setup datasource step is incorrect in the tutorial.
    The entity beans that are imported use a datasource called
    "examples-dataSource-demoPool".
    This datasource doesn't exist in the default workshop domain so in this step
    the user
    is to create the missing datasource. So going to the datasource viewer and
    choosing "add datasource"
    and pasting in the above name will create the datasource that's needed for
    the entity beans.
    3) In the source code listing for MusicBean there's missing imports for:
    javax.naming.InitialContext
    javax.naming.NamingException
    4) the ejb-local-ref XML has one problem, possibly two:
    1) The case is incorrect for the EJB ref name. The tutorial has it as:
    ejb/MusicLink
    but addBand.jsp refers to it as ejb/musicLink. So either change the
    jsp file or the ejb-ref-name so
    that the two match.
    2) The placement of the <ejb-local-ref> XML may be in the wrong spot.
    This element must
    appear at the bottom of web.xml. i.e.
    <webapp>
    <ejb-local-ref>
    <ejb-ref-name>ejb/musicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    </web-app>
    5) and finally ensure that your application's build order is correct. Make
    sure that the EJB
    project builds before the web project.
    This can be verified by selecting the menu "tools->application properties"
    and then
    clicking on the "build" node to get the build order.
    All of these mistakes will be fixed for the SP02 release. Hopefully one of
    these solutions fixes
    the problems you're experiencing.
    -Michael
    "Gunnar Skogen" <[email protected]> wrote in message
    news:[email protected]...
    >
    This thread :
    Suggestions on newbie tutorials for Workshop and Weblogic 8.1
    Date: 8 Aug 2003 15:06:55 -0700
    From: "Morgan" <[email protected]>
    Organization: BEA NEWS SITE
    Newsgroup: weblogic.developer.interest.workshop
    Describes the same problem, no solution - so:
    1) When will the tutorial(s)/ and or workshop be fixed ?
    2) Could we get a fix for this particular problem ? ( I tried more than Iwant
    to admit )
    "Gunnar Skogen" <[email protected]> wrote:
    Hi,
    (chiming in because:)
    I have exactly the same problem with the same app:
    This is following the tutorial for 8.1 :"Tutorial EJB project, Part one"
    to the
    letter and running the build.
    The link names etc are correct, however, nothing is/has been deployed
    according
    to console..
    NB: Following the tutorial the MusicBean is set up as a remote bean
    (default
    in
    workshop?) - have tried going the local way also without any success.
    It appears
    the tutorial itself is faulty(?) ( it also shows the dialog for importing
    a webapp
    when it most probably means to create an empty one )
    Michael Kovacs <[email protected]> wrote:
    Hi Peter,
    A couple of things...
    Ensure that your EJBs are deployed to the server properly. It
    seems from your error that they might very well already be
    deployed successfully, but that's just a guess. To verify this you
    can have a look at the WebLogic admin console and see that your
    beans have been deployed to the server by looking at your
    application.
    Assuming your beans are deployed....
    Ensure that the reference to the EJB ref is using the exact
    name of the ejb-ref-name. The name is case sensitive.
    So when you do your lookup of the bean in your JSP
    ensure that the "ejb/MusicLink" from the <ejb-ref-name>
    matches exactly. i.e.
    Object obj = ctx.lookup("java:comp/env/ejb/MusicLink");
    Also, make sure that the <ejb-link> is correct.
    The format for the link name is:
    EJBprojectname.jar#EJBName
    So for your example, make sure that "BandsExampleEJB"
    is the name of your EJB project or correct that value in the
    link name, and that your Bean's EJB name is "Music".
    Let me know if this helps.
    -Michael
    Peter Hegedüs wrote:
    Hi!
    Im a novice at this environment so I have been running the EJB
    Tutorial
    provided
    with 8.1
    Everything works as i should until I deploy the application.
    I get a:
    weblogic.management.DeploymentException: Could not setup environment- with nest
    ed exception:
    [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: Theejb-link 'Ban
    dsExampleEJB.jar#Music' declared in the ejb-ref or ejb-local-ref
    'ejb/MusicLink'
    in the application module 'webapp' could not be resolved. The targetEJB for
    th
    e ejb-ref could not be found. Please ensure the link is correct.]
    The code for the ejb-local-ref is as folows:
    <ejb-local-ref>
    <ejb-ref-name>ejb/MusicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    What can I be doing wrong?
    /Peter

  • ejb-local-ref usage

    Hi
    Can someone explain me exact use of this <ejb-local-ref>
    tag. I have seen ejb running without this config also and most of the professionally written ejb have this. When should this be used and why.
    Also i see <ejb-link> tag being used. I beleive if want to reference another ejb in another jar of the same ear, this should be used. I would appreciate if someone can explain me these 2 things.
    Thanks

    Can someone explain me exact use of this
    <ejb-local-ref>
    tag. I have seen ejb running without this config also
    and most of the professionally written ejb have this.
    When should this be used and why.ejb-ref is a way of getting reference to another ejb from within the bean code in one ejb. It provides a way to link ejbs based on ejb names rather than jndi-names.
    you can also refer to another ejb using the jndi name of the target ejb by looking it up from the global jndi tree. However, this is not a clean way, bcos the jndi name is the deployer's responsibility and could change. If you hook different ejbs using the jndi-names it could be quite inflexible and also you may not be able to take advantage of the container's colocation optimizations.
    To link ejbs within the same J2ee application in a flexible way and to take advantage of the container's optimizations, you can use ejb-refs and ejb-links.
    hope this helps,
    Mihir
    Also i see <ejb-link> tag being used. I beleive if
    want to reference another ejb in another jar of the
    same ear, this should be used. I would appreciate if
    someone can explain me these 2 things.
    Thanks

  • Number of total rows returned by a ref cursor without using FETCH

    Hi. How can we get the total number of rows returned by a ref cursor without doing the FETCH? I mean, if you use %ROWCOUNT, it only returns the current row number being returned in every fetch. This is not what I want. My purpose is to determine if my query using ref cursor returns greater than zero total rows without using fetch. Thanks.

    As John pointed out in the thread you linked to, the only way to know how many rows a query will return is to actually fetch all the rows. Oracle doesn't know how many rows a query is going to return until it actually fetches the last row.
    Plus, assuming the default transaction isolation level, if you run the same query multiple times in succession, there is no guarantee that the results will be the same.
    If you just want to know whether a query will return a nonzero number of rows, why not just write the code to assume that it returns at least 1 row and handle the zero row result as an exception.
    Justin

  • Compile error: Returning a local object to a reference variable

    Hi all...
    I just need to know that when I return from a function with a local object to a reference, I am getting a compile error (Error name is "badarglval2"). Actually I'm sure that the error is closely related to Sun Solaris Compiler. According to C++ specs, when I return a local object to a reference, the local object has to survive until the refence variable is destroyed. However it doesn't work as expected with Solaris compiler and I am not allowed referencing a local variable.. Is there anyone who can explain why it works like this?
    Thanks in advance...
    - Volkan
    Edited by: 938646 on 05.Haz.2012 00:46

    Could you illustrate what you mean with a short (but complete) example?
    Just in case: did you try adding a "const"?

  • Ejb-ref and ejb-local-ref tags

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or ejb-local-ref tags if I am referering one ejb from other ejb? I mean to say is it mandatory that I should have these deployment descriptor tags?
    2) What is purpose of ejb-link tag ?

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or
    ejb-local-ref tags if I am referering one ejb from
    other ejb? I mean to say is it mandatory that I should
    have these deployment descriptor tags?Yes, to write portable J2EE components, every time you have a dependency on an ejb, you need to declare an ejb-ref (for a Remote EJB client) or ejb-local-ref (for a Local EJB client). This is true no matter what kind of J2EE component is accessing the ejb (Application Client, JSP, Servlet, or another ejb).
    Think of the ejb-ref or ejb-local-ref as a pointer. It's different from the thing that is pointed to. Instead, it represents a dependency between a client component and a target ejb.
    2) What is purpose of ejb-link tag ?Every ejb-ref or ejb-local-ref must be resolved to unambiguously point to the target ejb. The ejb-link tag is one way to resolve this dependency for the case where the target ejb lives in the same .ear as the referring component. The ejb-link tag is the ejb-name (or <ejb-jar uri>#<ejb-name>) of the target ejb.
    Note that this means ejb-link is the ONLY way to resolve an ejb-local-ref, since by definition Local EJB access can only take place between two ejbs within the same .ear or a web component/ejb that live within the same .ear.
    For ejb-refs, you can use ejb-link if the target ejb is within the same .ear. If not, the ejb specification does not prescribe how the dependency is resolved. It's left up to the J2EE implementation. The most common approach is for the vendor to provide a product-specific runtime .xml element that resolves the ejb-ref by associating it with the global JNDI name of the target EJB. That's the approach used in the J2EE SDK and Sun Java System Application Server.
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • A structure with mutiple data types or array of array

    I want to read some soft of a table from a text file and want to store in a structure (not in database) for future use. I want the structure to have rows and columns when I need to reach. Colums should store multiple data types (int and/or string). I have examined Collections that only store one data type and only one dimension. I need a structure that holds multiple datatypes and at least 2 dimension. In short I need array of array? Any example or suggestion?

    Here is the colection part. But I cound not get it finished. Stuck at getting data from collection.. How could I read from the collection
        public static Long ReadFromFile() {
            List liste = new ArrayList();
            try {
                FileReader file = new FileReader ("abc.txt");
                BufferedReader buffer = new BufferedReader (file);
                String line = "";
                int i = 0;
                while ((line = buffer.readLine())!= null) {
                    if (i>0) {
                        DataS kontrol = new DataS();
                        String [] temp = null;
                        temp = line.split("\t");
                        for (int j=0; j< temp.length; j++) {                       
                            if (j== 0 && StrUtil.ValidNumber(temp[0])>0 ) {
                                kontrol.set_C_id(temp[0]);
                            } else if (j== 1) {
                                kontrol.set_C_enabled(temp[1]);
                            } else if (j== 2) {
                                kontrol.set_C_table(temp[2]);
                            } else if (j== 3) {
                                kontrol.set_C_field(temp[3]);
                            } else if (j== 4) {
                                kontrol.set_C_xmlobjectname(temp[4]);
                            } else if (j== 5) {
                                kontrol.set_C_xmlsubobjectname(temp[5]);
                            } else if (j== 6 && StrUtil.ValidNumber(temp[6])>0 ) {
                                kontrol.set_C_controltype(temp[6]);
                            } else if (j== 7) {
                                kontrol.set_C_datatype(temp[7]);
                            } else if (j== 8 && StrUtil.ValidNumber(temp[8])>0 ) {
                                kontrol.set_C_datalength(temp[8]);
                            } else if (j== 9 && StrUtil.ValidNumber(temp[9])>0 ) {
                                kontrol.set_C_dl(temp[9]);
                            } else if (j== 10) {
                                kontrol.set_C_conditionop(temp[10]);
                            } else if (j== 11) {
                                kontrol.set_C_conditionval(temp[11]);
                        liste.add(kontrol);                   
                    i++;
                    buffer.close();
            catch (IOException e) {
                return Long.valueOf(-1);
            /*For reading test*/
            try{
                DataS stored_kontrol = new DataS();
                Iterator itr = liste.iterator();
                int i = 0 ;
                while(itr.hasNext()) {
                    //Object obj = itr.getClass();
                    // Here were I stuck... How can I read from collection which is filled with object
            } catch (Exception e) {
                return Long.valueOf(-1);
            return Long.valueOf(1);
        }

  • Problem with java applet and array of arrays

    hi!
    i'm passing an array of arrays from java applet using
    JSObject.getWindow(applet).call("jsFunction", array(array(), array()) );
    in every other browser than safari 4.0.2 it's no problem to iterate over this array. in safari "array.length" is undefined. is such construction supported in safari's js engine?
    Message was edited by: quaintpl
    Message was edited by: quaintpl
    Message was edited by: quaintpl
    Message was edited by: quaintpl
    Message was edited by: quaintpl

    Thanks for the answer but the problem is the type of object of method and how from pl/sql is posiblle to call.
    The method waiting a ArrayofAlicIva, but if i define this object is not posible to set the object inside the array because the wsdl not have this functions.
    I need to define array of objects but the object is inside is the diferent type of array.
    If i Define the array of object correct to object inside, the method expect that the other array type.
    Is a Deadlock ??
    The solution in Java is Simple
    AlicIva[] alicIva = new AlicIva[1];
    alicIva[0]= new AlicIva();
    alicIva[0].setId(Short.parseShort(1));
    fedr[0].setIva(alicIva);
    this is the method imported in java class to form
    -- Method: setIva (LArrayOfAlicIva;)V
    PROCEDURE setIva(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, 'ArrayOfAlicIva');
    JNI.CALL_VOID_METHOD(FALSE, obj, 'FECAEDetRequest', 'setIva', '(LArrayOfAlicIva;)V', args);
    END;

Maybe you are looking for

  • "order as direct material" indicator is not coming in Shopping Cart.

    Hi Experts, I am trying to perform the employee self service procurement for a direct material. I have performed the below config and attribute maintenance. 1. Defined a new transaction type and new number range for local PO in SRM Config 2. In R/3 B

  • Convert  Objects into an XML Document? Possible?

    Hello, Is there a way to convert different objects into an XML File/Document If I create 10 objects and then I want to create an XML Document of these objects,is it possible to do this? Ajay

  • CSS question - could someone explain

    Morning all, Id really like to understand what is going on when IE 6 and less, drops the float under, seems to be adding in an extra pixel between the floats or something. I have sorted the issue previously, more by fluke than anything else, usually

  • How to ask the I2C device alias name from the MAX

    Hi, How can I ask the I2C device alias name which MAX uses in Labview? If the VISA Alias on My System is for example I2C in MAX, I need to ask it in Labview and write it then to Device Reference In input of a I2C vi. BR, Jick Solved! Go to Solution.

  • Password Protect Folder with Pics in Photoshop CS4

    I want to password protect a folder  I have JPEGS in so any one else who may access my computer cannot get into that folder and view what is inside. How do I do it?