Objects or Methods? Which are best related with performance?

Good morning,
I waked up this morning with a question in my mind. What is the best thing, to have objects inside another object or else to have methods?
Okay the question may sound confusing, so I will simplify it with an example. Imagine having an object of type Client. This object needs to load all the client contact details from a file (simple text file).
Now what would it be the best solution, to have the following code:
public class Client{
   private Details details;
      public Client(){
         this.details = this.loadDetails();
      �
      public Details loadDetails(){
      �
} OR
public class Client{
   private Details details;
   private DetailsLoader loader;
   public Client(){
      this.loader = new DetailsLoader();
      this.details = loader.loadDetails();
} It is very clear that in the first code segment I am using methods inside the same class to load the details of the client, while in the second code segment I am using another object to load these details.
OOP wise the second method is better. But what If I have thousands or millions of clients registered in the system? That would mean that in memory, each one of these object (a 1000 for example) will have a DataLoader in memory as well (thus becoming 2000)! The more the numbers increase, the less the system will perform.
I am asking this question because I want to develop something that still is strictly OOP, but that it is not so much of a heavy weight on a system.
Any opinion on this is more then welcome :)
Regards,
Sim085
Message was edited by:
sim085 to correct code indentation.

Thanks for the posts :)
I am sorry my example was not clear enough. However all I wanted is to display the effects of having an instance of an object inside another object. I think the best solution would be to create an interface of type Client and then if the file needs to be loaded from an XML I would create a class XMLClient that implements Client (please not I am keeping the stupid example which most probably does not make sens).
I did that example to show the difference that will happen in the JVM memory according to the different implementation.
Imagine having object A that has a method load() to load the data from an XML file. Then in memory, when creating a new instance of type A, I will have the object A defined in the Heap, and the pointer to A in the stack.
If instead I have an object A that has an object B with the method load(). Then if B is initialized from A, in memory I will have objects A and B in the Heap, and a pointer to both object in the Stack. If instrad object B is initalized from somewhere else and passed to A as a parameter, then I can have many instance of A while having one instance of B.
I do not know if anyone understood the above. But what I am trying to say is that the different implementations, altough at the end of the day they will all result to the same ending, on the back end they are effecting the JVM in a different way!
I know that the best solution is to feed B to A, so that I have one big object in memory loaded only once :)
Was it "where am I?" ;-)No actually it was .. "shit I'm still here :D" :)
regards,
sim085

Similar Messages

  • Join 2 tables which are not related with any primary-foriegn key constraint

    Hello,
    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.
    How can i write the select query for this condition?
    Thanks
    Swapna

    Hi, Swapna,
    user11018268 wrote:
    Hello,
    How to join 2 tables which are not related with any primary key foreign key constraint.
    Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
    Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
    Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.I think you want a UNION, not a join.
    If you have 10 rows in table_a, and 30 rows in table_b, then
    SELECT       A_ID,          A_Name,     A_Address,     A_City,     A_Pin
    FROM      table_a
    UNION
    SELECT       B_ID,          B_Name,     B_Adress,     B_City,     B_City
    FROM      table_b
    ORDER BY            2,               4          
    ;will produce up to 40 rows; 40 if there are no duplicates. (UNION implies DISTINCT.)
    The corresponding column types should be similar, if not exactly the same.
    There's no problem if A_Name is VARCHAR2 (50) and B_Name is CHAR (30).
    However, there will be a problem if A_ID is a NUMBER and B_ID is a TIMESTAMP.
    You must have the same number of columns in all branches of the UNION.
    If you want an ORDER BY clause, put it at the very end, after the last branch of the UNION.
    You can use positional notation (where 2 means the 2nd column) like I did, or you can use names from the first prong of the UNION (such as A_Name).
    From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
    So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.I'm not sure what your mean about "Address Label".
    Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables, and the exact results (formatted) that you want from that data.
    You can concatenate all 5 columns into one VARCHAR2 column, if you want to.
    You'll probably want to use RPAD (or simillar functions) to make the output line up nicely.
    If any of the columns are not strings, use TO_CHAR to make string versions of them.
    For example:
    SELECT  TO_CHAR (A_ID, '9999999')
         || '   '          -- leave a little space between the left-justified a_id and the right-justified a_name
         || RPAD (A_Name, 25)
         || RPAD (A_Address, 50)
         ...Edited by: Frank Kulash on Nov 14, 2009 10:11 AM

  • Does CISCO C3560X VLAN support multiple Network segments which are further configured with HSRP function

    Hi Cisco experts,
        My name is Kumagai and I need your expert opinions below.
    I am trying to configure one VLAN1 support multiple network segments as below.
    (this should be a very straight forward configuration and should be OK, I think ? )
     interface Vlan1
     ip address 172.30.0.0 255.255.128.0
     ip address 172.30.31.253 255.255.254.0 secondary
     ip address 172.30.61.253 255.255.254.0 secondary
     ip address 172.30.71.253 255.255.254.0 secondary
     ip address 172.30.4.253 255.255.255.0 secondary
     The only issue that is eating me is the above network segments are using HSRP too
     and I am not sure is this possible with a combination of VLAN1 supporting multiples which are
     further supported with HSRP settings in Cisco environment.
    !example of HSRP:
    interface Vlan4
     ip address 172.30.4.253 255.255.255.0
     no ip redirects
     standby 4 ip 172.30.4.254
     standby 4 priority 105
     standby 4 preempt
    <<< what will happen if I add the HSRP configuration as below into the above VLAN1 with multiple Network segment ??)
     I would like to summarize my "Combined" configurations as below but I need your expert opinions on
     whether the configuration below is workable without any problem ??
     Or it is a total flop because Cisco does not support the configuration below !!!
     interface Vlan1
     ip address 172.30.0.0 255.255.128.0
     ip address 172.30.31.253 255.255.254.0 secondary
     ip address 172.30.61.253 255.255.254.0 secondary
     ip address 172.30.71.253 255.255.254.0 secondary
     ip address 172.30.4.253 255.255.255.0  secondary
     standby 30 ip 172.30.31.254
     standby 30 priority 105
     standby 30 preempt
     standby 60 ip 172.30.61.254
     standby 60 priority 105
     standby 60 preempt
     standby 70 ip 172.30.71.254
     standby 70 priority 105
     standby 70 preempt
     standby  4 ip 172.30.4.254
     standby  4 priority 105
     standby  4 preempt
    Thanking you in advance !!!!!

    Hi,
    As far as i know we dont set the ip helper address on the radio interface. It should be on the L3 interface of corresposding VLANs i.e.
    int vlan 20
    ip helper-address 192.168.33.xxx
    int vlan 60
    ip helper-address 130.20.1.xxx
    I'm assuming that your using SVI's (int Vlan 20 and int Vlan 60) rahter than physical interfaces. Also hope you have configured switch port as trunk where this AP is connected.
    Modify the AP config as below since you are using data vlan as the native vlan
    interface Dot11Radio0.20
    encapsulation dot1Q 20 native
    interface FastEthernet0.20
    encapsulation dot1Q 20 native
    Ideally your AP fastethernet configuration should looks like below and not sure how you missed this as this comes by default when you have multiple vlans for multiple ssids.
    interface FastEthernet0.20
    encapsulation dot1Q 20 native
    no ip route-cache
    bridge-group 20
    no bridge-group 20 source-learning
    bridge-group 20 spanning-disabled
    interface FastEthernet0.60
    encapsulation dot1Q 60
    no ip route-cache
    bridge-group 60
    no bridge-group 60 source-learning
    bridge-group 60 spanning-disabled
    Hope this helps.
    Regards
    Najaf

  • Some futures in bpel which are not possible with ESB and vice versa

    Can anyone please tell me some futures in bpel which are not possible with ESB and For some features available in ESB that are absence in BPEL?

    I think you've mistaken the meaning of both technologies. ESB actually works as a part of BPEL, for instance you can create partner link from any esb service.
    ESB service can only expose data or retrieve and process (transform) them from another service. BPEL is using services like ESB as a source and adds decision making functionality which is not present in ESB.

  • Call methods (which are in the servlet) in my response page

    Hello !
    I want to call methods which are in the servlet ( its name is ServletRecap) BUT the call is made in the response page which is generated by the servlet ServletRecap !
    I just want to allow the user to update his choice in the response page.
    example: i choice A in the initial form but i change my mind and now i want to choice B in the response page : the choice have to be update in the database.
    the insertion in the DB is made by a method in the servlet : so i have to recall the method in the response page!
    Please, anybody have an idea ?
    my servlet :
    public class ServletRecap extends HttpServlet {
        // param�tres d'instance
        private String urlErreurs = null;
        private ArrayList erreursInitialisation = new ArrayList<String>();
        private String[] param�tres = {"urlFormulaire", "urlReponse", "urlControleur", "lienRetourFormulaire"};
        private Map params = new HashMap<String, String>();
        // init
        @SuppressWarnings("unchecked")
        public void init() throws ServletException {
            // on r�cup�re les param�tres d'initialisation de la servlet
            ServletConfig config = getServletConfig();
            // on traite les autres param�tres d'initialisation
            String valeur = null;
            for (int i = 0; i < param�tres.length; i++) {
            // valeur du param�tre
                valeur = config.getInitParameter(param�tres);
    // param�tre pr�sent ?
    if (valeur == null) {
    // on note l'erreur
    erreursInitialisation.add("Le param�tre [" + param�tres[i] + "] n'a pas �t� initialis�");
    } else {
    // on m�morise la valeur du param�tre
    params.put(param�tres[i], valeur);
    // l'url de la vue [erreurs] a un traitement particulier
    urlErreurs = config.getInitParameter("urlErreurs");
    if (urlErreurs == null) {
    throw new ServletException(
    "Le param�tre [urlErreurs] n'a pas �t� initialis�");
    @SuppressWarnings("unchecked")
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    // on v�rifie comment s'est pass�e l'initialisation de la servlet
    if (erreursInitialisation.size() != 0) {
    // on passe la main � la page d'erreurs
    request.setAttribute("erreurs", erreursInitialisation);
    request.setAttribute("lienRetourFormulaire", "");
    getServletContext().getRequestDispatcher(urlErreurs).forward(
    request, response);
    // fin
    return;
    // on r�cup�re la m�thode d'envoi de la requ�te
    String m�thode = request.getMethod().toLowerCase();
    // on r�cup�re l'action � ex�cuter
    String action = request.getParameter("action");
    // action ?
    if (action == null) {
    action = "init";
    // ex�cution action
    if (m�thode.equals("get") && action.equals("init")) {
    // d�marrage application
    doInit(request, response);
    return;
    if (m�thode.equals("post") && action.equals("validationFormulaire")) {
    // validation du formulaire de saisie
    doValidationFormulaire(request, response);
    return;
    if (m�thode.equals("post") && action.equals("enregistrementFormulaire")) {
    // enregistrement du formulaire de saisie
    doEnregistrementFormulaire(request, response);
    return;
    if (m�thode.equals("post") && action.equals("retourFormulaire")) {
    // retour au formulaire de saisie
    doRetourFormulaire(request, response);
    return;
    // autres cas
    doInit(request, response);
    // validation du formulaire
    void doValidationFormulaire(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {
    // on r�cup�re les param�tres
    String nomCentre = (String) request.getParameter("nomCentre");
    String idCentre = (String) request.getParameter("idCentre");
    String nomPreleveur = (String) request.getParameter("nomPreleveur");
    String datePrelev = (String) request.getParameter("datePrelev");
    String numFinFiche = (String) request.getParameter("numFinFiche");
    // qu'on m�morise dans la session
    HttpSession session = request.getSession(true);
    session.setAttribute("nomCentre", nomCentre);
    session.setAttribute("idCentre", idCentre);
    session.setAttribute("nomPreleveur", nomPreleveur);
    session.setAttribute("datePrelev", datePrelev);
    session.setAttribute("numFinFiche", numFinFiche);
    // v�rification des param�tres
    ArrayList<String> erreursAppel = new ArrayList<String>();
    // le nom doit �tre non vide
    nomCentre = nomCentre.trim();
    idCentre = idCentre.trim();
    nomPreleveur = nomPreleveur.trim();
    datePrelev = datePrelev.trim();
    numFinFiche = numFinFiche.trim();
    if (nomCentre.equals("")) {
    erreursAppel.add("Le champ [nomCentre] n'a pas �t� rempli");
    if (idCentre.equals("")) {
    erreursAppel.add("Le champ [idCentre] n'a pas �t� rempli");
    if (nomPreleveur.equals("")) {
    erreursAppel.add("Le champ [nomPreleveur] n'a pas �t� rempli");
    if (datePrelev.equals("")) {
    erreursAppel.add("Le champ [datePrelev] n'a pas �t� rempli");
    if (!numFinFiche.matches("^\\s*\\d+\\s*$")) {
    erreursAppel.add("Le champ [numFinFiche] est erron�");
    // des erreurs dans les param�tres ?
    if (erreursAppel.size() != 0) {
    // on envoie la page d'erreurs
    request.setAttribute("erreurs", erreursAppel);
    request.setAttribute("lienRetourFormulaire", (String) params.get("lienRetourFormulaire"));
    getServletContext().getRequestDispatcher(urlErreurs).forward(
    request, response);
    return;
    // les param�tres sont corrects - on envoie la page r�ponse
    request.setAttribute("nomCentre",nomCentre);
    request.setAttribute("idCentre",idCentre);
    request.setAttribute("nomPreleveur",nomPreleveur);
    request.setAttribute("datePrelev",datePrelev);
    request.setAttribute("numFinFiche",numFinFiche);
              request.setAttribute("lienRetourFormulaire", (String) params.get("lienRetourFormulaire"));
    getServletContext().getRequestDispatcher((String) params.get("urlReponse")).forward(request,
    response);
    return;
    //enregistre dans la base de donn�e les variables
    void doEnregistrementFormulaire(HttpServletRequest request, HttpServletResponse response) throws
    ServletException, IOException {
         String nomCentre = (String) request.getParameter("nomCentre");
    String idCentre = (String) request.getParameter("idCentre");
    String nomPreleveur = (String) request.getParameter("nomPreleveur");
    String datePrelev = (String) request.getParameter("datePrelev");
    String numFinFiche = (String) request.getParameter("numFinFiche");
         String nEtude = datePrelev + "." + idCentre + "." + numFinFiche;
    //      qu'on m�morise dans la session
    HttpSession session = request.getSession(true);
    session.setAttribute("nomCentre", nomCentre);
    session.setAttribute("idCentre", idCentre);
    session.setAttribute("nomPreleveur", nomPreleveur);
    session.setAttribute("datePrelev", datePrelev);
    session.setAttribute("numFinFiche", numFinFiche);
         Connexion com = new Connexion();
              try{     
                   //serveur,login,pwd,database
                   com.loadDriverAndConnect("127.0.0.1","3306","root","root","");
                   com.execute("USE BIOTECH");
                   com.execute("INSERT INTO RECAP (NEtude,NomCentre,idCentre,nomPreleveur,datePrelev) " +
                             "values ('"+nEtude+"','"+nomCentre+"','"+idCentre+"','"+nomPreleveur+"','"+ datePrelev + "')") ;
                   com.close();                              
              catch(Exception ex) {
                   System.err.println("\n*** SQLException caught in main()");     
              request.setAttribute("urlAction", (String) params.get("urlControleur"));
              getServletContext().getRequestDispatcher((String) params.get("urlReponse")).forward(request,
    response);
              return;      
    // affichage formulaire pr�-rempli
    void doRetourFormulaire(HttpServletRequest request, HttpServletResponse response) throws
    ServletException, IOException {
    // on r�cup�re la session de l'utilisateur
    HttpSession session = request.getSession(true);
    // on pr�pare le mod�le du formulaire
    // nom pr�sent dans la session ?
    String nomCentre = (String) session.getAttribute("nomCentre");
    if (nomCentre == null) {
    session.setAttribute("nomCentre", "");
    String idCentre = (String) session.getAttribute("idCentre");
    if (idCentre == null) {
    session.setAttribute("idCentre", "");
    String nomPreleveur = (String) session.getAttribute("nomPreleveur");
    if (nomPreleveur == null) {
    session.setAttribute("nomPreleveur", "");
    String datePrelev = (String) session.getAttribute("datePrelev");
    if (datePrelev == null) {
    session.setAttribute("datePrelev", "");
    String numFinFiche = (String) session.getAttribute("numFinFiche");
    if (numFinFiche == null) {
    session.setAttribute("numFinFiche", "");
    // urlAction
    request.setAttribute("urlAction", (String) params.get("urlControleur"));
    // on affiche le formulaire
    getServletContext().getRequestDispatcher((String) params.get("urlFormulaire")).forward(
    request, response);
    return;
    // post
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    // on passe la main au GET
    doGet(request, response);
    my initial form:%
    // on r�cup�re les param�tres dans la session
         String nomCentre=(String)session.getAttribute("nomCentre");
         String idCentre= (String)session.getAttribute("idCentre");                    
         String nomPreleveur = (String)session.getAttribute("nomPreleveur");     
         String datePrelev=(String)session.getAttribute("datePrelev");          
         String numFinFiche=(String)session.getAttribute("numFinFiche");          
         String urlAction=(String)request.getAttribute("urlAction");
    %>
    <html>
    <head>
    <title>Fiche r&eacute;pitulative - formulaire</title>
    </head>
    <body>
    <center>
         <img src="logoBiotech.jpg" align="left" alt="logo Biotech-Germande" width="5%"></img>
    <h2>Fiche r&eacute;pitulative - formulaire</h2>
         <br>
    <hr>
    <form action="<%= urlAction %>" method="post">
    [... page setting: made by html language ...]
    <td><input type="submit" name="action" value="validationFormulaire"></td>
    <td><input type="reset" value="R&eacute;tablir"></td>
    </tr>
    </table>
    </form>
    </center>
    </body>
    </html>
    my response page:<%
    // on r�cup�re les donn�es
         String nomCentre=(String)session.getAttribute("nomCentre");
         String idCentre= (String)session.getAttribute("idCentre");                    
         String nomPreleveur = (String)session.getAttribute("nomPreleveur");     
         String datePrelev=(String)session.getAttribute("datePrelev");          
         String numFinFiche=(String)session.getAttribute("numFinFiche");     
         String urlAction=(String)request.getAttribute("urlAction");
    %>
    <html>
    <head>
    <title>Fiche r&eacute;pitulative - formulaire</title>
    </head>
    <body>
    <form action="<%= urlAction %>" method="post">
    [... page setting: made by html language ...]
    <br><br>
                   <td><input type="submit" name="action" value="enregistrementFormulaire"></td>
                   <td><input type="submit" name="action" value="retourFormulaire"></td>
    </body>
    </html>
    my web.xml:<!-- Servlets -->
    <!--Servlet Fiche Recapitulative-->
    <servlet>
    <servlet-name>FicheRecap</servlet-name>
    <servlet-class>germande.ServletRecap</servlet-class>
    <init-param>
    <param-name>urlReponse</param-name>
    <param-value>/WEB-INF/JSP/Recap/reponseRecap.biotech.jsp</param-value>
    </init-param>
    <init-param>
    <param-name>urlErreurs</param-name>
    <param-value>/erreursRecap.biotech.jsp</param-value>
    </init-param>
    <init-param>
    <param-name>urlFormulaire</param-name>
    <param-value>/WEB-INF/JSP/Recap/formulaireRecap.biotech.jsp</param-value>
    </init-param>
    <init-param>
    <param-name>urlControleur</param-name>
    <param-value>ServletRecap</param-value>
    </init-param>
    <init-param>
    <param-name>lienRetourFormulaire</param-name>
    <param-value>Retour au formulaire</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>FicheRecap</servlet-name>
    <url-pattern>/ServletRecap</url-pattern>
    </servlet-mapping>
    </web-apps>
    Thanks in advance for your idea.
    I resume : how can I call a method in my servlet into my response page (in jsp).
    the servlet generate this response page and i just want to update the choice of my user.
    Thanks !!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I resume : how can I call a method in my servlet into my response page (in jsp).Don't do that. Put the message into a plain old Java class which can be called from both the servlet and the JSP.

  • Which are the Related tables in Service Tax

    Hi,
    Which are the Related tables in Service Tax
    Regards,
    Siva

    Hi
    i am not pretty sure of the tables..but better check the config for it in service tax at extended withholding tax type
    regards
    shibu

  • How to Find the OID (Oracle Object ID's) which are already in use.

    Hi,
    I am importing a dump from source to destination with imp command as the dump has been exported using exp command.
    I ran the dump and it got hanged once.
    So, I am rerunning it again, My import failed again and I am getting an error that OID is already is present.
    I need to know how we can find the OID's which are already used, so that I can find those objects are flush them before the importing the dump.
    Thanks,
    Nagendra Reddy.

    Have you thought about using an ldif to export your directory into another?
    -Kevin

  • Business Objects 3.1 reports are not working with IE 10.

    Hi,
    Recently I upgraded my internet explorer to IE10.. Since then business objects 3.1 reports are not opening in IE10.0
    Getting error message "webpage can't be found".
    I am not sure whether BO 3.1 reports work with IE 10.0 or not.
    Please advise
    Thanks
    Sat

    Did you try with other browsers ?
    IE 10 (Compatibility View display mode) with Oracle Java 6 / Oracle Java 7 is supported for BOXI3.1 SP6.
    Please check the PAM for details of your SP level.

  • AVCHD settings. Which are best?

    I"m using a Canon Vixia HF200 that records beautiful AVCHD video at 24mbs. And FCP's log and transfer is cool and painless. However, I"m not sure which is the best timeline setting to use with this AVCHD. I've used Apple Intermedia Codec (HQ) but that just chokes my core 2 duo Macbook Pro running 2 gigs of RAM. Even editing AVCH at the lowly 8mbs is giving me some problems. This footage is full 1920 x 1080 so should I set my sequence to DVCPROhd 1080i, Apple Intermediate Codec, Apple Intermedia Codec (HQ)? Should it be set to square pixels or HDTV, etc. etc.? I"d like to know the best setting for my MacBook so I can at least not have to render every red bar after every simple edit. Thanks

    There is no Apple Intermediate Codec HQ. Transcode to ProRes LT and edit in a ProRes LT sequence.

  • Can I make methods which are public in a parent class into private in a child class ?

    I suspect the answer to my question is probably no, but...
    I have a parent class that provides several general purpose methods, I also have a child class which is intended to provide a more specific set of methods for manipulating the data in the class. As a result, calling some of the parent's methods on the child class can provide results that I'd rather not let the users of the child class have to worry about. It seemed (from my rather naive OOP experience) that the nicest way to do this would be to make access to some of the parent's public methods be private in the child class. This doesn't seem to be trivially possible.... ?
    Gavin Burnell
    Condensed Matter Physics Group, University of Leeds, UK
    http://www.stoner.leeds.ac.uk/

    Hi Gavin,
    Unfortuneately I don't think this can be done. You can use an overide VI to change the functionality of a method in a child class but it has to have the same scope and the method it overides.
    Regards
    Jon B
    Applications Engineer
    NI UK & Ireland

  • Adobe changed all my MOBI book files to Acrobat files which are not compatible with my Kindle

    How do we change my book attachments back to MOBI attachments?

    What is your operating system?
    How did "Adobe change all my MOBI book files to Acrobat files" - do they now have a .pdf extension?
    Or is perhaps your .mobi file association wrong?

  • Import/export related with performance issues

    Hello,
    my database has a poor performance. If I export the schema containing data+ recreate it + import data, will I have any benefit? At least, regarding space issues I hope so.
    Any suggestions?
    Regards,

    will I have any benefit?
    I don't think so.
    You first have to discover the root problem.
    Pehaps a simple dbms_stats.xy call may help, or your instance is baldy configured or the sqls are written dickery or ...
    What does "poor performance" mean exactly?
    Dim

  • Object.wait() & Object.notify() method

    Hi all,
    My question is related to Object.wait() and Object.notify() method which are used by threads. Why these method belongs to Object class and not Thread when they only use by threads ???

    This question represents one of the fundamental concepts of multi-threading as implemented in the Java environment. It is worth clarifying and explaining why probably was this decision mandatory for the language designers. The multi-threading capabilities are built-into the Java language and not external built or imposed to the libraries. What this means that every object that can be instantiated and operated upon by the Java Virtual Machine must be able to possess this behaviour.
    As far as the Thread class itself is concerned, it provides the ability for the Java objects to be treated as being capable of supporting the re-entrant behaviour. When the object resources are being used by multiple threads produced by the re-entrant-capable process i.e. object, each of these threads are competing. The Java environment handle the competition on the object resources by these threads by providing the monitor mechanism, similar to the semaphors in other languages. While the monitors are being acquired or released for implementing the synchronization, the threads enter into the waiting pool, internal to the Java environment. In this scenario, it is clear, that unless the methods can be "invoked" on the objects being monitored, the threads will fail any synchronization.
    The notify() method will allow a given object to be able to wake up a single thread that is waiting on this object's monitor. Similarly, the wait() method allow the given object to cause current thread to wait until another thread invokes the notify() method for this object. Thus, the wait() or notify() methods represent multi-threading capabilities that Java environment implicitly assumes to be the characteristics of every instantiable Java object. The simple semantics of the Object Orientation suggests us that for this to be cleanly and unambiguously implemented, the "ultimate" superclass or root class of the class hierarchy must include these methods in its interface. This way, it becomes easily possible to "inherit" the multi-threading capabilities down to the Java libraries and all Java custom objects.
    Finally, should these methods be included in the interface in the Thread class, every object desirous of possessing these capabilities must "sub-class" the Thread class, which means that the custom objects that need to be multi-threaded must be extended from the Thread class and that the Runnable interface will put up no value. This will defy all the notions of building up an object-oriented Java application with correct object inheritance.

  • The latest iTunes wiped out my apps for my 2G iPod Touch by overwriting updates which are no longer compatible with iOS 4.2.  I tried to restore to an earlier version with no success.  Is there any way to download the older versions of apps which are comp

    The latest iTunes software wiped out my apps for my 2G iPod Touch by overwriting newer releases of the apps which are not compatible with iOS 4.2.1.  I tried to restore the iPod to an earlier version without success.  Is there any way to download older versions of my apps which are compatible with my older iPod?

    Your only way is if you have the version that was compatible on your computer such as in the recycle bin/trash or in a computer file backup. In that case delete the current version that is in your iTunes App library and replace it with the older version. Then sync.
    Also see:
    Recover Older Versions of iPhone Apps After Updating — Apple News, Tips and Reviews

  • Delete Class Objects and methods

    Hi, i have created a class file for a game. Now i have 3 to 4
    games in one Main File. So after playing one game user can choose
    another. Now can anybody tell me how to delete the first class
    Object or methods, which was used in First game. So that i can
    remove the garbage collections from Flash to make it with fast
    process?

    A short simple (overly simple) explanation is that objects are like little machines, which operate independantly from other objects (other little machines). You design an application as a collection of these little machine/objects, interacting with each other. Then you drill down another layer of detail, and design the machines themselves. You do this by defining the classes, which are like blueprints to make a little machine/object.
    In java, this is largely expressed by the interface definition at the higher level, and the class definition at the lower level. The interfaces say how various objects may talk to each other, and the class definitions say how any individual object may talk at all.
    This is a very basic description, and in fact isn't entirely accurate; if they want to lots of people on this forum could pick it apart. But hopefully it gets the idea across. (As my language design prof said, quoting somebody else, "teaching is just a series of lies.")
    There are resources on the web about object-oriented programming, object-oriented design, etc. mutmansky's right, a college course is best, but you can still learn a lot from docs on the web.

Maybe you are looking for

  • Writing schema for multiple elements with same name with diff. content

    following is the XML file, <?xml version="1.0" encoding="utf-8"?> <e-abstract xmlns="http://www.citicorp.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Deed.xsd"> <deed> <deed_type> <deedtyp name="Quit Claim" value="Q"

  • HTML5 Audio CSS broken in iOS8 UIwebview

    I am using the HTML5 <audio> tag in UIwebview in a number of Apps. The style of the audio bar and the controls is preset by Apple and that's fine, but I could use CSS to give the audio tag the desired width. Up to iOS7, this worked nicely (e.g. "audi

  • Virtual PC 7 hid the mac desktop icons in Windows--how do you restore this?

    Hi there...hoping someone knows where one would be able to restore this setting this as I'm unable to locate anything through the preferences nor find any solutions in the user guide or online here in the group discussions. I have a client who is usi

  • Quantity Tolerance

    Hi gurus, I need to set quantity tolerance in the invoice. I have set tolerances at: - MM -> Logistics invoice verification -> Incoming Invoice -> Configure Vendor-Specific Tolerances : Here you can just set value tolerances. - OMR6 If we try to invo

  • "activeDocument.saveAs" does not work! -- Error 8800 | PS CS5 | Mac OSX 10.5.8

    Error 8800: General Photoshop error occurred. This functionality may not be available in this version of Photoshop. I even tried to copy the Script from the scripting Guide. jpgFile = new File( "/Temp001.jpeg" ) jpgSaveOptions = new JPEGSaveOptions()