Package scope

Hi guys I need to know about package scopes.what is the difference
between private and protected object and when do we say a method or an object is not accessible in in the second class if you have two classes

For private objects declared in ClassA, only methods within ClassA can reference the object.
If you have ClassA and ClassB within the same package e.g. PackageA:
ClassA cannot see ClassB's private objects but ClassA can see ClassB's protected objects.
Classes with the same package can see each others protected objects but they cannot see each the other's private objects.
Classes in another package PackageB cannot see protected methods in PackageA. It can only see protected methods for classes in it's own package PackageB and public methods in PackageA.
Hope this helps.
JB

Similar Messages

  • Package Scope - Constants

    I am trying to figure out the best way to implement a CONSTANTS class for my project. I have all of my files defined in a package. And I have included the class where I defined my package constants in that package. I have defined them like:
    static final int a = 1;
    So they have package level access (not public/private). And I can access them when a direct call:
    int b = consts.a;
    But, I am a little confused on the use of defining this way, using import, package scope, interfaces. Looking at the tutorial:
    http://java.sun.com/docs/books/tutorial/together/index.html
    I see that they have a constants class that is an interface which they also import into other classes when they want to use it AND they call it explicitly with the class name prefix. Running a little test, I see that without any of this, a class can access a variable defined without public/private definition and/or package and/or interface and/or imports. So, it doesn't seem like any of these are really necessary.
    Simple question: What is the best way to define and access constants in one place for a project?

    A question many of us ask but never really come up with a satisfactory answer.
    Firstly are they real constants? I.e. will they never change in the life of the program (if they might change then they should be in a config file).
    Next thing to bare in mind is how the java compiler works. Say I have class A
    class A
      public static final int A_NUMBER = 0;
    }which is use somewhere else
    class B
    void aMethod() {
    int something = A.A_NUMBER;
    }Now if I compile it all, it works fine. If I know go and change A_NUMBER to be another value and recompile class A only, then the reference to A.A_NUMBER will still be 0!! The compiler is actually copying the value accross.
    So, next question to ask. what is you build policy? Do you always recompile everything? If so then you should be alright with a load of static final values in an interface somewhere.
    Other things to bare in mind is were are constants used. If the constants are used in one class only then they should be defined in this class with a private modifier.
    I would normally suggest still using get methods to get hold of constants, just to make sure the senario with the compiler never happens.
    If you tell me what your constants are I can probably give you a better ideas as to what to do with them.
    One the whole, the only time you would want to put them all in one place was if you wanted to find them quickly for changing them. In which case you should have a config file instead.

  • Package scope variable

    I created package variables in specification
    of the package.
    And all procedures and function can see these
    variables.
    The question is: What about transaction?
    If two users start using these variables,
    does it influence each other or every user
    will work in his own scope?
    Sorry for dummy question.
    Thanks Anatoly.

    Since Variables declared in the Package variables r global variables will be updated whenever accessed globally.Its not session dependant.
    Might be a problem when two users access it at the same time.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by avalko:
    I created package variables in specification
    of the package.
    And all procedures and function can see these
    variables.
    The question is: What about transaction?
    If two users start using these variables,
    does it influence each other or every user
    will work in his own scope?
    Sorry for dummy question.
    Thanks Anatoly.<HR></BLOCKQUOTE>
    null

  • Package scope and import statements

    Hi everubody,
    I'm studing a code: foo.java written by sb. else. In the code, I have:
    package com.dir1.dir2.dir3;
    import com.dir1.dir4.code1;
    import com.dir1.dir5.code2;
    The code: foo.java exists in the directory: com/dir1/dir2/dir3 as expected. However, in the import statements, there is NO dir4 and dir5 under com/dir1? Shouldn't the import statements be relative to the directory of package?
    Guess I'm missing a point here... Any help is greatly apprecited.

    When you import:
    import co.mycompany.my.MyClass
    then MyClass should reside in the directory:
    co/mycompany/my, right?Right. Somewhere in the classpath there would have to be that directory structure. Again, that could be an actual directory name, or a path name in a Jar.
    Then if the code: foo.java resides in the directory:
    com/dir2/dir3 with the:
    package com.dir1.dir2.dir3;
    How the compiler and JVM finds the code MyClass
    (which you imported in foo.java)?Thru the magic known as the classpath.

  • Package scope visibility across 2 classloaders

    Hi - I have 2 classes, examplepackage.ClassA and examplepackage.ClassB.
    ClassA is being loaded by classloader1, and ClassB is being loaded by classloader2.
    ClassB has instance variables defined with (default) pacakge scope, eg
    String sString1 = "something";
    String sString2 = "something else";
    My problem is that if ClassA attempts to refer to the instance vars in ClassB directly, eg
    classB.sString1 (where classB is an instance of ClassB loaded with classloader2), I get an IllegalAccessException.
    Is this expected?
    Thanks,
    Kevin Hooke

    yes Perhaps you could eloborate a bit? And a JLS reference would be nice. I looked and couldn't find anything.

  • C# SSIS Script component - Save List String to Object package-scope variable and read it in Script Task

    before posting this i was searching this on internet but was not able to find info regarding my specific case:
    i have a DataFlow Task with "Error output" pointing from FlatFile to
    Script Component that does below (variable "ErrorMessageList" is listed under ReadWriteVariables property):
    List<string> lsErrors = new List<string>();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    lsErrors.Add("test1");
    lsErrors.Add("test2");
        void PostExecute()
            base.PostExecute();
            Variables.ErrorMessageList = lsErrors;
    Then the DataFlow points to a ScriptComponent where this object variable is listed under ReadOnlyVariables property and does the below:
    public void Main()
    List<string> lsErrors = (List<string>)Dts.Variables["ErrorMessageList"].Value;
    and that is where i get exception-has-been-thrown-by-the-target-of-an-invocation
    What is wrong here?
    (i have mistakenly edited this first post before, so i tried to manually put it back to original version)

    i have missed the "override" keyword...
    public class ScriptMain : UserComponent
    public class UserComponent: ScriptComponent
    namespace Microsoft.SqlServer.Dts.Pipeline
    public class ScriptComponent
    // i should have seen this before
    public virtual void PostExecute();
    i believe i must have deleted the PostExecute method definition right after the ScriptComponent generated the script for me... and then when i've realized that i can't change ReadWriteVariables as a part of:
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    // --- can't change ReadWriteVariables here
    then i had to add the method back but forgot that the base method is virtual
    thanks for this hint, Russ!

  • How to show PL/SQL package  output and fix below error(please help)

    --PACKAGE SPECIFICATION AND BODY complied successfully but I can not see output some error are also there..  please help ;how to fix this problem
    -- with code
    CREATE OR REPLACE PACKAGE package_variables IS
    -- Declare package components.
    PROCEDURE set(value VARCHAR2);
    FUNCTION get RETURN VARCHAR2;
    END package_variables;
    CREATE OR REPLACE PACKAGE BODY package_variables IS
    -- Declare package scope variable.
    variable VARCHAR2(20) := 'Initial Value';
    -- Define function
    FUNCTION get RETURN VARCHAR2 IS
    BEGIN
    RETURN variable;
    END get;
    -- Define procedure.
    PROCEDURE set(value VARCHAR2) IS
    BEGIN
    variable := value;
    END set;
    END package_variables;
    VARIABLE outcome VARCHAR2(20)
    CALL package_variables.get() INTO :outcome;
    SELECT :outcome AS outcome FROM dual;
    EXECUTE package_variables.set('New Value');
    CALL package_variables.get() INTO :outcome;
    SELECT :outcome AS outcome FROM dual;
    OUTPUT
    PACKAGE package_variables Compiled.
    PACKAGE BODY package_variables Compiled.
    Error starting at line 2 in command:
    CALL package_variables.get() INTO :outcome
    Error report:
    SQL Error: ORA-01008: not all variables bound
    01008. 00000 - "not all variables bound"
    *Cause:   
    *Action:
    OUTCOME
    1 rows selected
    anonymous block completed
    Error starting at line 2 in command:
    CALL package_variables.get() INTO :outcome
    Error report:
    SQL Error: ORA-01008: not all variables bound
    01008. 00000 - "not all variables bound"
    *Cause:   
    *Action:
    OUTCOME
    1 rows selected
    */

    EXECUTE package_variables.set('New Value');
    CALL package_variables.get INTO :outcome;
    SELECT :outcome AS outcome FROM dual;
    OUTPUT
    anonymous block completed
    Error starting at line 2 in command:
    CALL package_variables.get INTO :outcome
    Error report:
    SQL Error: ORA-06576: not a valid function or procedure name
    06576. 00000 - "not a valid function or procedure name"
    *Cause:    Could not find a function (if an INTO clause was present) or
    a procedure (if the statement did not have an INTO clause) to
    call.
    *Action:   Change the statement to invoke a function or procedure
    OUTCOME
    1 rows selected

  • How to set the scope for Mxml classes?

    Hi,
    i want to create the mxml class but with internal (package)
    scope (for example).
    Is it possible? (for AS classes yes)

    Don't think you can control scope like this in MXML.

  • How to Use Row Count Transformation

    Environment: SQL Server 2008 R2
    Purpose: Track number of records, which were loaded into each destination, entity tables or affected by data transaction. Record each table name and the number of records for each  table. 
    Code:
    CREATE TABLE dbo.PkgAudit
    PkgAuditID INT IDENTITY(1, 1),
    PackageName VARCHAR(100),
    LoadTime DATETIME DEFAULT Getdate(),
    Status1 Varchar(50),
    Status2 varchar(20),
    Status3 Varchar(20)
    ETL process: See the following pictures. I have two DFT. Reference to the code in details.
    Click here
    The first one as below
    The second DFT
    Logic: Load the data from the staging table/ If matched with SSN then status is record exists in the pkgAudit table. If not matched, records the number of records and the status is inserted table in the DFT#1 (Step#1)
    In DFT#2, record the name of the tables and number of records for each table
    Expected Results:
    1, Pakage, 20140304 10:24:12:17, 4 loaded, 3 inserted in individual and SSN table, 1  exists in SSN
    Problem: In DFT #1, I placed RowCount Transformation. It generated a couple errors. I also dont know how to concatenate the name of the table and the number of records and the status of the affected table (inserted or exists or loaded).
    I am here to learn as my level of competency is novice. I appreciate the support to ease my learning process. Screen shots is highly appreciated. 
    ~ I tried to load more than picture but the editor allows only 2 pic per post. hope MSDN peeps improve it

    Hi Sandra,
    Thank you for your reply.
    The expression is used for a variable, then the variable can be used in your INSERT statement. According to your screenshot, the PkgAudit table has five columns that you need to insert into. Please refer to the following steps:
    1. Create three Int32 type Package scope variables @TotalCount, @InsertCount, and @MatchCount, and specify their initial value to 4, 3, 1 respectively.
    2. Create three String type variables @NumberofRecords, @Status1, and @Status2. Then, set the ValidateAsExpression property of each variable to True, and set the expression for the three variables as follows:
    NumberofRecords:  (DT_STR,10,1252)@[User::TotalCount] + " loaded"
    Status1:  (DT_STR,10,1252) @[User::InsertCount] + " inserted in individual and SSN table"
    Status2:  (DT_STR,10,1252) @[User::MatchCount] + " in SSN"
    Please refer to the following screenshot:
    3. In the Execute SQL Task, modify your SQLStatement to:
    INSERT INTO dbo.PkgAudit(PackageName
    ,LoadTime
    ,NumberofRecords
    ,Status1
    ,Status2
    ) VALUES(?,?,?,?,?)
    4. Click the Parameter Mapping tab of the Execute SQL Task, and set the parameter mapping as follows (supposing all the columns in the PkgAudit table use varchar data type):
    Regards,
    Mike Yin
    TechNet Community Support

  • SSIS Variable Expression not Picking Up the value dynamically set from a Foreach Loop container

    Hello, everyone,
    I have three variables in my SSIS package:
    1) ReportLoc that holds a file path (c:\test, not changed)
    2) ReportFileName that holds a file name that get assigned in a Foreach Loop container (file1, file2, etc.)
    3) OutputFilePath that is the full file pathname, set in the expression: @[User::LocalPath] + "\\" +  @[User::ReportFileName]
    All three variable have the package scope.
    I expect OutputFilePath will be asigned values like c:\test\file1, c:\test\file2, etc.
    However, it alwasy remains an empty string.
    Anything I did wrong? Any help and information is greatly appreciated.
    Regards 

    That's it -- I forgot to set Evaluate as Expression to true.
    Thank you very much for your reply and solution! Really appreciate it!
    Regards.

  • Load object from xml

    Imagine if you can that I have a XmlLoader class for each object that can be loaded from xml.
    Before I had the xmlLoader code inside the objects but it's better to separate loading from actual object...
    these xmlLoaders needs to be able to set all vars for those objects. How would be the best way to do that?
    Atm I have made all vars with a package scope. but this really opens the object open to all other objects in that package...
    I don't know any other options. so how do you keep your vars safe, but still be able to load them from whatever source(xml, txt)...?

    Apache Digester is good for this sort of thing. It uses setter methods to populate your objects. You could also just use XML Serialization and deserialization. Or, you could go for something like JAXB or XMLBeans, whereby you actually will have classes generated for you from XML Schemas, and instances of those classes can marshall and unmarshall themselves quite easily

  • -6502 ORA-06502: PL/SQL: numeric or value error when using 'Create CAPI Definition'

    I get an error when I try to create a CAPI definition with Headstart untilities (6i). I use HSU_CAPI revision 6.5.2.0
    The detailed information says the following:
    Message
    BLAPI.OPEN_ACTIVITY
    Start HSU_CAPI.run
    Number of Tables to create CAPI for 1
    Initial checks for table KCS_TENDERS with id 692754610572409851363604771392473242
    HSU_CAPT.initial_checks for table KCS_TENDERS
    HSU_CAPF.initial_checks for table KCS_TENDERS
    HSU_CAPC.initial_checks Custom Services for table KCS_TENDERS
    HSU_CAPB.initial_checks BRDD for table KCS_TENDERS
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDIPLS
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    KCS_TENDERS Business Rule Design Definition BR_TNR001_CEV does not have any Trigger Columns. Rule will fire when any column is updated.
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDIPLS
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_line_containing
    Creating CAPI for table KCS_TENDERS with id 692754610572409851363604771392473242
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Insert-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580304413262318236391196826 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Update-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580332747461215454262479002 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-stmt, Open transaction.
    Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580361081660112672133761178 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Insert-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580389415859009890005043354 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Update-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580417750057907107876325530 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-After-Delete-stmt, Close transaction.
    Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCODE number of text lines = 6 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580446084256804325747607706 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Before-Delete-row, Save old data.
    Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCODE number of text lines = 404 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580474418455701543618889882 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Insert, Call CAPI.
    Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCODE number of text lines = 4 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580568865785358936523163802 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Update, Call CAPI.
    Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCODE number of text lines = 4 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580597199984256154394445978 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Pre-Delete, Call CAPI.
    Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCODE number of text lines = 17 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580625534183153372265728154 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Insert, Call CAPI.
    Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCODE number of text lines = 7 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580653868382050590137010330 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Update, Call CAPI.
    Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCODE number of text lines = 144 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580682202580947808008292506 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    Recreating KCS_TENDERS Table API/Trigger Logic - Event: Post-Delete, Call CAPI.
    Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCODE number of text lines = 282 - REPLACE
    Deleted old text
    Write Text for element type APPLOG with id 753236628580767205177639461622139034 - Text type: ALCMNT number of text lines = 1 - REPLACE
    Deleted old text
    HSU_CAPF.create_or_find_capi_pack
    hsu_capi.find_plm (kcs_tnr_capi, 692754610572409851363604771392473242, CAPI).
    capi package found in the context folder
    BLPLM.UPD
    FREE_FORMAT_TEXT_FLAG......... = Y
    IMPLEMENTATION_NAME........... = kcs_tnr_capi
    PLSQL_MODULE_TYPE............. = PACKAGE
    SCOPE......................... = PUBLIC
    COMPLETION_STATUS............. = COMPLETED
    NAME.......................... = kcs_tnr_capi
    PURPOSE....................... = Custom API package for implementing Business Rules and supporting TAPI
    Recreated Package KCS/ KCS_TNR_CAPI, preserving only the Revision History.
    HSU_CAPF.add_tags_er_av
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    bltext.get_lines_from_repository, p_text_type=CDINOT
    bltext.get_line_containing
    bltext.get_line_containing
    HSU_CAPF.create_specification
    HSU_CAPF.create_c_tabalias
    HSU_CAPF.create_c_tabalias_all
    HSU_CAPF.create_aggregate_value
    HSU_CAPF.create_aggregate_value
    HSU_CAPF.create_aggregate_value
    Activity aborted with ORACLE internal errors.
    -6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    What can I do about it???
    Thanks in advance.
    Menno Hoogsteen

    Working on the same project as Menno, I had the time to look into the problem.
    The problem is caused by the creation of the capi-function agregate_char_value in the packages hsu_capf. While creating this function the following code is executed:
    add(' -- allowable values:');
    add(' -- '||l_col_name_list);
    This last statement causes the problem because this table is very big. L_col_name_list contains 2391 characters wich is 393 characters to long. So i changed this code into:
    add(' -- allowable values:');
    add(' -- '||substr(l_col_name_list,1,1990));
    add(' -- '||substr(l_col_name_list,1990));
    and everything works fine. Perhaps something for a patch?
    Kind regards,
    Ruben Spekle

  • Public abstract interface I{

    Interface are totally abstract by default so what is the need of abstract in
    public abstract interface I{
    ........}does this have any functionality........

    I believe it's entirely redundant.
    I believe that the "public" part is also entirely
    redundant.
    Check the language spec to be sure.Abstract is redundant--all interfaces and their methods are implicitly abstract.
    Public is redundant for interface methods--they're always public--but not for the interface itself. You can have package-scope interfaces. Not sure about private ones.

  • Performance ... soft attributes hurt a lot

    After writing a rather extensive application using a modified version of jsf (that works very well) I did some profiling. Boy was I surprised.
    When you get into an application which contains views (trees) that are somewhat complex, such as a tabset component with some nested panesl, toolbars, buttons, and a large data grid (say 50 to 100 rows with 7 columns) where each cell may contain a command or some other custom component the performance gets a little bit ugly.
    I was very surprised to uncover the primary culprit of the poorformance bottleneck. Using the Optimizeit profiler that ships with JBuilder, a beautiful tool by the way, I came to the realization that the utilization of soft attributes is a tremendously bad design decision. In fact, in the view which is described above, accessing the soft attributes actually took more time than acquiring the data for the view which required 12 calls to different databases, almost 5 seconds ... obviously the profiler adds some overhead.
    I hope the use of soft attributes is just for the early access release ... and not part and parcel to the spec.
    Soft attributes are okay, but only for optional attributes. The key attributes associated with each component should be hard attributes, actual instance variables of the component. I am talking about things like parent, componentId, rendererType, modelReference, value .... Particularly parent, and componentId are called thousdands of times for the sort of view I described above and that take seconds to execute when they are stored in a hashmap. I would not have believed it but, I have gone through our implementation of jsf and turned all of these soft attributes into hard attributes and hot damn, these seconds are now 20 , 30, 40 miliseconds.
    This is even more pronounced if the component set used contains attributes like 'visible' or 'enabled' which require a traveral up the tree of components. In fact, for these type of attributes to really improve the performance we had to add the additional attribute 'parentVisible' that would be set on children once when a parents state was changed in order to avoid having to do the traversals over and over again.
    I can understand if people are skeptical about this, I would have been as well ... we are only taking about hash lookups. But in production scale applications hash lookups are a hell of a lot more expensive than direct access to an instance variable and jsf does a lot of traversing ... during decode process ... during request event handling ... during validating ... during model updating ... during application event handling ... and then during rendering.
    For simple 10 component web pages the soft attributes work fine, but to produce truly rich client html apps they simply do not scale.
    The good news is with proper profiling and some tweaks to our base component class the performance now almost rocks...
    JUST FYI ... we are running on Weblogic 6.1 and using a beefy solaris box.
    Side Notes .....
    We have created our a component set from scratch because as anyone using the ea release has obviously found the components included are simply unusable for anything serious. We started with an implementation of UIComponent - we could not use UIComponentBase because its setParent method is package scope and we wanted, no, we needed to make parent a hard attribute.
    We have been able to create very complex components including grids that support sorting, filtering, paging, tab components, collapsible panels, hierarchical trees, a light XForm rendering component, buttons, toolbars, etc.... A very rich set of components.
    We have not used the tag libraries for our application because they just are not ready ... instead we do most of our component rendering using Apache ECS in custom renderers. In fact we did not use JSP's to define most of our trees, instead we added the concept of TreeBuilders... no time to discuss this now.
    I promised a while ago to post a coherent set of findings based on our work and still intend to do so, just trying to find the time ... sorry if this is a little bit all over the place. I felt compelled though to sound the warning about relying exclusively on soft attributes.

    (Member of JSF EG here...)
    Thanks for your comments and feedback; it's being discussed
    right now. The issue can be attacked on a couple of fronts.
    First, some of the attributes currently being stored as
    generic attributes should not be ("parent" comes to mind). Second,
    there are significant optimizations possible to the generic
    attribute mechanism used today. (A HashMap is not the best
    data structure for this case, nor are Strings the best choice
    as keys.)
    We've also got an open issue to re-evaluate UIComponent vs.
    UIComponentBase, and will specifically address the problem
    you mention.
    Thanks again.

  • Problem with executing function

    Hi guys, after to suffer and a lot of researchs, I resolved to post my problem.
    I have a function and I need to execute tham by Java.
    The problem is that the function recieves a complex type (precisaly a table). I've try so many types, but did not work.
    The complex type in package scope, when a I create the ArrayDescriptor a exception is thrown. The vendor error code is 17074.
    I'dont have permission to change the database.
    FUNCTION func_sample(complex_type in out tab_complex)
    TYPE TYPE_COMPLEX IS RECORD
    TYPE TAB_COMPELS IS TABLE OF TYPE_COMPLEX INDEX BY BINARY_INTEGER;
    Java code:
    ArrayDescriptor descriptor = new ArrayDescriptor("TAB_COMPELS", connection);
    Somebody can help me!?

    You'll probably need to use SQLData Interface if you want something like a bi-directional pass-through, and provide implementations for readSQL(), writeSQL(), and getSQLTypeName(). Alternatively, if you want to return an array to the database, this old post might help.
    http://blog.mclaughlinsoftware.com/java-programming/reading-an-external-directory-from-sql-or-plsql/

Maybe you are looking for

  • Adobe AIR installation fails

    Scenario Attempting to install the Adobe AIR runtime (or any AIR apps requiring it) on Snow Leopard (possibly earlier versions of OS X also). Symptom AIR installation will hang prior to completion on primary user account, however, AIR will successful

  • HT6154 i have the wrong email showing up on my Iphone 4s

    How can i remove the email adress from the iphone  it is wrong one

  • Counter in a select

    Hi, I need a counter in a select without using temporal tables. Simplified, it's: select a.code, b.desc from a, b where a.code=b.code (table a has several fields as pk, not only 'code') and results are: coda Barcelona codb New York codc New York codd

  • Non-enabled or non-existent descriptive flexfield segment

    hi m getting this Error when m trying to Save Text Field value in DFF segment A value has been provided for a non-enabled or non-existent descriptive flexfield segment. (SEGMENT=ATTRIBUTE17) (VALUE=Y) regards, Vivek

  • Can't get these games to work on Intel Mac!!!!

    http://www.the7thwar.net/ventcore/downloads Sorry, I know this is the wrong place to post this. But I cannot get these games to work on my computer, and I want them to in such a bad way. If anybody can figure this out, I will lick the soles of their