Confused about singletons in servlets

Hello,
A DatabaseManager object is to be created within my RegistrationServlet. I wish to implement this DatabaseManager class as a singleton. I understand how the first client that invokes the RegistrationServlet will be able to create an instance of the DatabaseManager. However, what happens when a second client invokes the RegistrationServlet while the first client is still using the DatabaseManager instance? What is the best way to deal with this? Is an exception thrown?
Thanks.

Depends on how you implement the Singleton, of course.
A Singleton might be a bad idea. Sounds like a bottleneck waiting to happen.
That's a database isolation issue. It doesn't belong in a servlet. It belongs in a persistence layer.

Similar Messages

  • Confuse about the injecting entity in EJB 3.0?

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

    Hi all,
    I have an customersBean which is inherit from customersRemote and my problem is i' am little confuse about injecting the entity(customer).
    Where can you apply the EntityManagerFactory is it outside on EJB or Inside the EJB? means outside EJB is use the web application or java application. i have and example.
    this is inside on EJB...............
    public class CustomersBean implements com.savingsaccount.session.CustomersRemote {
    @PersistenceContext(unitName="SavingAccounts")
    EntityManagerFactory emf;
    EntityManager em;
    /** Creates a new instance of CustomersBean */
    public CustomersBean() {
    public void create(int id, String name, String address, String telno, String mobileno)
    try{
    //This is the entity.
    Customer _customer = new Customer();
    _customer.setId(id);
    _customer.setName(name.toString());
    _customer.setAddress(address.toString());
    _customer.setTelno(telno.toString());
    _customer.setMobileno(mobileno.toString());
    em = emf.createEntityManager();
    em.persist(_customer);
    emf.close();
    }catch(Exception ex){
    throw new EJBException(ex.toString());
    in web application, i'm using the @EJB in customer servlets.
    public class CustomerProcessServlet extends HttpServlet {
    @EJB
    private CustomersRemote customerBean;
    blah blah inject directly coming request field from jsp.
    }

  • Confused what exactly Java Servlets are?

    Hi,
    I(JSP Biginner) have gone through some tutorials about JSP, Servlet and Java bean.
    I'm really confused by the term SERVLET.
    There are a lot of the definitions:
    1.) Is a Java Class that provides special Server Side Specification.
    2.) A servlet is a dynamically loaded module that services requests from a Web server.
    From above mentioned definition, my understanding is, SerVlet is like an engine which is provided server service. Is the SERVLET that I mentioned same as the JSP Servlet Engine which parse the JSP file, generate and compile the servlet source code and then send it to the browser?????
    3.)What about the SERVLET that created by developer and use in the JSP page? what are the differents between the servlet 1,2 and 3.
    Please advice!

    thanks so much...
    guess I have better understand of what java servlet is when I read the article from
    http://www.novocode.com/doc/servlet-essentials/
    from my understanding:
    1.) we said that SerVlet Provides Request and Response services is because the purpose of we creating our servlet is used to Read (Request) the data from Client and Send back (Response) the data to the Client. Of course all this can be done by code in the JSP page, but because of SerVlet technology, instead of we write the long code in the JSP page, we can modularise our code by creating servlet, why?? as servlets are web components, they can be reused easily. Moreover, java servlet is platform independent. After that at our JSP page, we just call the servlet we have created.
    2.)As we can see from all the example, a SerVlet sure has
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    Are all of them only available when we installed our Web Server (i.e tomcat)???
    3.)Can I say that we create servlets by Inherit all the routines and structure in those classes (q.2), as well as use their Built-In functions to create our servlets???
    4.) Can I say that we create servlet by create an instance of a BIG SERVLET which served as a base (Which has all the classes we needes for creating our own servlets)
    I don't know how much you can understand what I'm writting. Anyway, hope u can help.
    Thanks so much.

  • I am confused about something.  How do I read a book on my MacBook Pro?  I can't find the iBook app anywhere, which is what I use on my iPad.  The book I want to read is in my iTunes but I can't click on it.  My iBook library does not show up in iTunes.

    I am confused about something.  How do I read a book on my MacBook Pro?  I can't find the iBook app anywhere, which is what I use on my iPad.  The book I want to read is in my iTunes but I can't click on it.  Some of my iBooks show up in my iTunes but they are "grayed" out.  The only books that respond in iTunes are audiobooks and that's not what I'm looking for.  Is this a stupid question?

    Nevermind - I answered my own question, which is I CAN"T READ ANY BOOKS I purchased in iBooks on my MacBook Pro.  If I want to read on my mac I have to use Kindle or Nook.  Which means any book I've already purchased through iBooks has to be read on my iPad.  Kind of a drag because there are times when it's more convenient for me to read while I'm sitting with my Mac.

  • Confused about logical table source

    Hi,
    I'm confused about logical table source(LTS), there are 'General', 'Column Mapping', 'Content' tabs in
    LTS, in General tab ,there are some information,like 'Map to there tables' and 'joins',
    just here, we have created relationships in physical layer and BMM layer, so I would like to ask what's the use of the 'joins' here?

    Hi Alpha,
    Valid query, when you establish a complex join it is always between a logical fact and dimension table.Consider a scenario,
    Example:w_person_dx is an extension table not directly joined to a fact but joins to a dimension w_person_d.
    When you model the person_d tables in BMM, you ll have a single logical table with w_person_d as source.If you have to pull columns from both w_person_d and w_person_dx tables in a report, you add dx table as inner join to persond table in the general tab.Now when you check your physical query, you can see the inner join fired between the two dimensions.
    Rgds,
    Dpka

  • Confused about transaction, checkpoint, normal recovery.

    After reading the documentation pdf, I start getting confused about it's description.
    Rephrased from the paragraph on the transaction pdf:
    "When database records are created, modified, or deleted, the modifications are represented in the BTree's leaf nodes. Beyond leaf node changes, database record modifications can also cause changes to other BTree nodes and structures"
    "if your writes are transaction-protected, then every time a transaction is committed the leaf nodes(and only leaf nodes) modified by that transaction are written to JE logfiles on disk."
    "Normal recovery, then is the process of recreating the entire BTree from the information available in the leaf nodes."
    According to the above description, I have following concerns:
    1. if I open a new environment and db, insert/modify/delete several million records, and without reopen the environment, then normal recovery is not run. That means, so far, the BTree is not complete? Will that affact the query efficiency? Or even worse, will that output incorrect results?
    2. if my above thinking is correct, then every time I finish commiting transactions, I need to let the checkpoint to run in order to recreate the whole BTree. If my above thinking is not correct, then, that means that, I don't need to care about anything, just call transaction.commit(), or db.sync(), and let je to care about all the details.(I hope this is true :>)
    michael.

    http://www.oracle.com/technology/documentation/berkeley-db/je/TransactionGettingStarted/chkpoint.html
    Checkpoints are normally performed by the checkpointer background thread, which is always running. Like all background threads, it is managed using the je.properties file. Currently, the only checkpointer property that you may want to manage is je.checkpointer.bytesInterval. This property identifies how much JE's log files can grow before a checkpoint is run. Its value is specified in bytes. Decreasing this value causes the checkpointer thread to run checkpoints more frequently. This will improve the time that it takes to run recovery, but it also increases the system resources (notably, I/O) required by JE.
    """

  • To ragnic and other about Singleton class

    Hi ragnic. Thanks for your reply. I posted the code wrong. Heres' my correct one.
    I have a GUI first loaded information and the information is stored in a databse, I have some EJB classes..and my singleton class ABC has some method to access to the EJB..
    so my first GUI will gather info using singleton class and later if I click on
    a button in my first GUI class, will pop up another frame of another class , this class also need to class setPassword in my Singleton..
    are my followign codes correctly??
    iS my Class ABC a SINgleton class? thanks
    Is my class ABC use as single correctly. And It is called from other classes is also correct?
    I'm new to java and like to learn about Singleton class.
    But I really dont' understand it clearly after reading many examples of it.
    I have a project to convert my class abc to a singleton.
    But I dont know how to do it.
    In my class(soon will become a singleton) will have few methods that later I need to use it from another class A and class B.
    I have a GUI application that first load my class A..and my class will call
    class abc(singleton) to get some information from it.
    and then in class A has a button, if I click on that button I will call SIngleton class again to update my password, in the singleton class has method calls updatePassword. But I dont know how to call a singleton from other class.
    I have my code for them below:
    1)public class ABC //attempt using a singleton
    private static ABC theABC = null;
    private ABC(){}
    public synchronized static ABC getABC()
    if(theABC == null)
    theABC= new ABC();
    return the ABC;
    public void updateUserInfo(SimpleUser user)
    throws UserNotFoundException, DelegateException
    try
    UserCollectionHome userCollectionHome = (UserCollectionHome)
    EJBHomeFactory.getFactory().lookupHome("vista/UserCollection",
    UserCollectionHome.class);
    UserHome userHome = (UserHome)
    EJBHomeFactory.getFactory().lookupHome("vista/User",UserHome.class);
    UserCollection uc = userCollectionHome.create();
    uc.updateUserInfo(user, userHome);
    } catch(HomeFactoryException hfe) {
    hfe.printStackTrace();
    throw new DelegateException(hfe);
    } catch(RemoteException re) {
    re.printStackTrace();
    throw new DelegateException(re);
    } catch(CreateException ce) {
    ce.printStackTrace();
    throw new DelegateException(ce);
    } catch(FinderException fe) {
    fe.printStackTrace();
    throw new UserNotFoundException();
    public SimpleUser getID(String id)
    throws UserNotFoundException, DelegateException
    try
    UserCollectionHome userCollectionHome = (UserCollectionHome)
    EJBHomeFactory.getFactory().lookupHome("vista/UserCollection",
    UserCollectionHome.class);
    UserHome userHome = (UserHome)
    EJBHomeFactory.getFactory().lookupHome("vista/User",UserHome.class);
    UserCollection uc = userCollectionHome.create();
    SimpleUser su = uc.getID(id, userHome);
    return su;
    } catch(HomeFactoryException hfe) {
    throw new DelegateException(hfe);
    } catch(RemoteException re) {
    throw new DelegateException(re);
    } catch(CreateException ce) {
    throw new DelegateException(ce);
    } catch(FinderException fe) {
    throw new UserNotFoundException();
    public void setPassword(String lname,String pw)
    throws UserNotFoundException, DelegateException
    try
    UserCollectionHome userCollectionHome = (UserCollectionHome)
    EJBHomeFactory.getFactory().lookupHome("vista/UserCollection",
    UserCollectionHome.class);
    UserHome userHome = (UserHome)
    EJBHomeFactory.getFactory().lookupHome("vista/User",UserHome.class);
    UserCollection uc = userCollectionHome.create();
    uc.setPassword(lname,pw, userHome);//assume that all lname are differents.
    } catch(HomeFactoryException hfe) {
    hfe.printStackTrace();
    throw new DelegateException(hfe);
    } catch(RemoteException re) {
    re.printStackTrace();
    throw new DelegateException(re);
    } catch(CreateException ce) {
    ce.printStackTrace();
    throw new DelegateException(ce);
    } catch(FinderException fe) {
    fe.printStackTrace();
    throw new UserNotFoundException();
    }//Do I have my class as a Singleton correctly???
    2)//Here is my First Frame that will call a Singleton to gather user information
    public A(Frame owner)
    super(owner, "User Personal Information",true);
    initScreen();
    loadPersonalInfo();
    * This method instantiates all the GUI widgets and places them into panels and
    * onto the frame.
    private void initScreen()
    txtFname = new JTextField(20);
    txtLname=new JTextField(20);
    btnsave =new JButton("Save");
    btnChange= new JButton("Click here to change PW");//when you click this button there will be a frame pop up for you to enter informaton..this iwll call class B
    JPanel pnlMain=new JPanel();
    JPanel pnlFname= new JPanel();
    pnlFname.setLayout(new BoxLayout(pnlFname, BoxLayout.X_AXIS));
    pnlFname.setBorder(BorderFactory.createEmptyBorder(0,87,0,90));
    pnlFname.add(new JLabel("First Name:"));
    pnlFname.add(Box.createRigidArea(new Dimension(5,0)));
    pnlFname.add(txtFname);
    JPanel pnlLname= new JPanel();
    pnlLname.setLayout(new BoxLayout(pnlLname, BoxLayout.X_AXIS));
    pnlLname.setBorder(BorderFactory.createEmptyBorder(0,87,0,90));
    pnlLname.add(new JLabel("Last Name:"));
    pnlLname.add(Box.createRigidArea(new Dimension(5,0)));
    pnlLname.add(txtLname);
    pnlMain.add(pnlFname);
    pnlMain.add(pnlLname);
    pnlMain.add(btnsave);
    pnlMain.add(btnChange");
    btnSave = new JButton("Save");
    btnSave.setActionCommand("SAVE");
    btnSave.addActionListener(this);
    btnCancel = new JButton("Cancel");
    btnCancel.setActionCommand("CANCEL");
    btnCancel.addActionListener(this);
    JPanel pnlBottom = new JPanel();
    pnlBottom.setLayout(new BoxLayout(pnlBottom, BoxLayout.X_AXIS));
    pnlBottom.setBorder(BorderFactory.createEmptyBorder(25,55,0,0));
    pnlBottom.add(btnSave);
    pnlBottom.add(Box.createRigidArea(new Dimension(25,0)));
    pnlBottom.add(btnCancel);
    pnlMain.add(pnlBottom);
    this.setContentPane( pnlMain);
    setSize(500,500);
    GraphicUtilities.center(this);
    theABC=ABC.getABC();
    //Do I call my ABC singleton class correctly??
    private void loadPersonalInfo()
    String ID= System.getProperty("user.name");
    SimpleUser user = null;
    try {
    user = ABC.getID(ID);
    //I tried to use method in ABC singleton class. IS this correctly call?
    } catch(UserNotFoundException nfe)
    JOptionPane.showMessageDialog(new JDialog(),"You have not yet registered.",
    "User Not Found",JOptionPane.WARNING_MESSAGE);
    System.exit(0);
    } catch(DelegateException de) {
    JOptionPane.showMessageDialog(new JDialog(),"You have not yet registered",JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    currentUser = user;
    txtFname.setText(currentUser.getFirstName());
    txtLname.setText(currentUser.getLastName());
    //This information will be display in my textfields Fname and Lname
    //I can change my first and last name and hit button SAVE to save
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand().equals("SAVE")) submitChanges();
    if(e.getActionCommand().equals("CHANGE_PASSWORD")) {
    changepassword=new ChangePassword(new Frame(),name,badgeid);
    public void submitChanges(){
    String currentNTUsername = System.getProperty("user.name");
    SimpleUser user =null;
    try {
    user = theABC.getID(ID);
    user.setFirstName(txtFname.getText().trim());
    user.setLastName(txtLname.getText().trim());
    currentUser = user;
    theABC.updateUserInfo(currentUser);
    //IS this correctly if I want to use this method in singleton class ABC??
    } catch(UserNotFoundException nfe)
    JOptionPane.showMessageDialog(new JDialog(),"You have not yet registered",
    "User Not Found",JOptionPane.WARNING_MESSAGE);
    } catch(DelegateException de) {
    JOptionPane.showMessageDialog(new JDialog(),"You have not yet registered",JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    this.setVisible(false);
    3) click on ChangePassword in my above GUI class A..will call this class B..and in this class B
    I need to access method in a Singleton class- ABC class,,DO i need to inititates it agian, if not what should I do? thanks
    package com.lockheed.vista.userinfo;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.tree.*;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import java.io.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.colorchooser.*;
    import javax.swing.filechooser.*;
    import javax.accessibility.*;
    import java.beans.*;
    import java.applet.*;
    import java.net.*;
    import org.apache.log4j.*;
    import com.lockheed.common.gui.GraphicUtilities;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import vista.user.UserServicesDelegate;
    import vista.user.SimpleUser;
    import vista.user.UserNotFoundException;
    import vista.user.*;
    import com.lockheed.common.ejb.*;
    import com.lockheed.common.gui.*;
    import com.lockheed.vista.publish.*;
    * This program allow users to change their Vista Web Center's password
    public class ChangePassword extends JDialog
    implements ActionListener{
    protected final Logger log = Logger.getLogger(getClass().getName());
    private UserServicesDelegate userServicesDelegate;
    private User currentUser = null;
    private JPasswordField txtPasswd, txtVerifyPW;
    private JButton btnSubmit,btnCancel;
    private JLabel lblName,lblBadgeID;
    private String strBadgeID="";
    * This is the constructor. It creates an instance of the ChangePassword
    * and calls the method to create and build the GUI.
    public ChangePassword(Frame owner,String name,String badgeid)
    super(owner, "Change Password",true);
    initScreen(name,badgeid);//build the GUI
    * This method instantiates all the GUI widgets and places them into panels and
    * onto the frame.
    private void initScreen(String strname,String strBadgeid)
    txtPasswd = new JPasswordField(20);
    txtVerifyPW=new JPasswordField(20);
    txtPasswd.setEchoChar('*');
    txtVerifyPW.setEchoChar('*');
    JPanel pnlMain=new JPanel();
    pnlMain.setLayout(new BoxLayout(pnlMain, BoxLayout.Y_AXIS));
    pnlMain.setBorder(BorderFactory.createEmptyBorder(20,0,20,0));
    JPanel pnlPW=new JPanel();
    pnlPW.setLayout(new BoxLayout(pnlPW, BoxLayout.X_AXIS));
    pnlPW.setBorder(BorderFactory.createEmptyBorder(0,96,0,30));
    pnlPW.add(new JLabel("Password:"));
    pnlPW.add(Box.createRigidArea(new Dimension(5,0)));
    pnlPW.add(txtPasswd);
    JPanel pnlVerifyPW=new JPanel();
    pnlVerifyPW.setLayout(new BoxLayout(pnlVerifyPW, BoxLayout.X_AXIS));
    pnlVerifyPW.setBorder(BorderFactory.createEmptyBorder(0,63,0,30));
    pnlVerifyPW.add(new JLabel("Verify Password:"));
    pnlVerifyPW.add(Box.createRigidArea(new Dimension(5,0)));
    pnlVerifyPW.add(txtVerifyPW);
    JPanel pnlTop= new JPanel();
    pnlTop.add(pnlPW);
    pnlTop.add(Box.createRigidArea(new Dimension(0,10)));
    pnlTop.add(pnlVerifyPW);
    pnlMain.add(pnlTop);
    btnSubmit = new JButton("Submit");
    btnSubmit.setActionCommand("SUBMIT");
    btnSubmit.addActionListener(this);
    btnCancel = new JButton("Cancel");
    btnCancel.setActionCommand("CANCEL");
    btnCancel.addActionListener(this);
    JPanel pnlBottom = new JPanel();
    pnlBottom.setLayout(new BoxLayout(pnlBottom, BoxLayout.X_AXIS));
    pnlBottom.setBorder(BorderFactory.createEmptyBorder(25,55,20,30));
    pnlBottom.add(btnSubmit);
    pnlBottom.add(Box.createRigidArea(new Dimension(25,0)));
    pnlBottom.add(btnCancel);
    pnlMain.add(pnlBottom);
    this.setContentPane( pnlMain);
    setSize(350,230);
    setVisible(true);
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand().equals("CANCEL")) this.setVisible(false);
    if(e.getActionCommand().equals("SUBMIT")) submitPW();
    * This method is called when the submit button is clicked. It allows user to change
    * their password.
    public void submitPW(){
    myABC= ABC.getABC();//Is this correct?
    char[] pw =txtPasswd.getPassword();
    String strPasswd="";
    for(int i=0;i<pw.length;i++){
    strPasswd=strPasswd+pw;
    char[] vpw =txtVerifyPW.getPassword();
    String strVerifyPW="";
    for(int i=0;i<vpw.length;i++){
    strVerifyPW=strVerifyPW+pw;
    if((strPasswd==null)||(strPasswd.length()==0)) {
    JOptionPane.showMessageDialog(new JDialog(),"You have not enter a password. Please try again.",
    "Invalid Password",JOptionPane.ERROR_MESSAGE);
    if((!strPasswd.equals(strVerifyPW)))
    //password and verify password do not match.
    JOptionPane.showMessageDialog(new JDialog(),"Your passwords do not match. Reenter and try again.",
    "Invalid Password",JOptionPane.ERROR_MESSAGE);
    try
    myABC.setUserPassword(strPasswd);//try to use a method in Singleton class
    txtPasswd.setText("");
    txtVerifyPW.setText("");
    this.setVisible(false);
    } catch(DelegateException e) {
    JOptionPane.showMessageDialog(new Frame(),
    "Error.",
    "Unable to change password information.",JOptionPane.WARNING_MESSAGE);
    } catch(UserNotFoundException e) {
    JOptionPane.showMessageDialog(new Frame(),
    "Error.",
    "Unable to change password information.",JOptionPane.WARNING_MESSAGE);
    And ofcourse I have other EJB classes to work with these classes.
    ***It compiles okey but when I ran, it say "NullPointerException"
    I think I call my Singleton wrong.
    Please help me.thanks

    1. When replying, use <reply>, don't post a new topic.
    2. Implementing a singleton is a frequently asked question. Search before you post.
    3. This is not a question about Swing. A more appropriate forum would be "New To Java Technology" or perhaps "Java Programming", but see point 1.
    4. When posting code, keep it short. It increases the chance of readers looking at it. And in composing your shorter version for the forum, you just may solve your problem.

  • Confused about extending the Sprite class

    Howdy --
    I'm learning object oriented programming with ActionScript and am confused about the Sprite class and OO in general.
    My understanding is that the Sprite class allows you to group a set of objects together so that you can manipulate all of the objects simultaneously.
    I've been exploring the Open Flash Chart code and notice that the main class extends the Sprite class:
    public class Base extends Sprite {
    What does this enable you to do?
    Also, on a related note, how do I draw, say, a line once I've extended it?
    Without extending Sprite I could write:
    var graphContainer:Sprite = new Sprite();
    var newLine:Graphics = graphContainer.graphics;
    And it would work fine. Once I extend the Sprite class, I'm lost. How do I modify that code so that it still draws a line? I tried:
    var newLine:Graphics = this.graphics;
    My understanding is that since I'm extending the Sprite class, I should still be able to call its graphics method (or property? I have no idea). But, it yells at me, saying "1046: Type was not found or was not a compile-time constant: Graphics.

    Thanks -- that helped get rid of the error, I really appreciate it.
    Alas, I am still confused about the extended Sprite class.
    Here's my code so far. I want to draw an x-axis:
    package charts {
        import flash.display.Sprite;
        import flash.display.Graphics;
        public class Chart extends Sprite {
            // Attributes
            public var chartName:String;
            // Constructor
            public function Chart(width:Number, height:Number) {
                this.width = width;
                this.height = height;
            // Methods
            public function render() {
                drawAxis();
            public function drawAxis() {
                var newLine:Graphics = this.graphics;
                newLine.lineStyle(1, 0x000000);
                newLine.moveTo(0, 100);
                newLine.lineTo(100, 100);
    I instantiate Chart by saying var myChart:Chart = new Chart(); then I say myChart.render(); hoping that it will draw the axis, but nothing happens.
    I know I need the addChild method somewhere in here but I can't figure out where or what the parameter is, which goes back to my confusion regarding the extended Sprite class.
    I'll get this eventually =)

  • Confused about standby redo log groups

    hi masters,
    i am little bit confuse about creating redo log group for standby database,as per document number of standby redo group depends on following equation.
    (maximum number of logfiles for each thread + 1) * maximum number of threads
    but i dont know where to fing threads? actually i would like to know about thread in deep.
    how to find current thread?
    thanks and regards
    VD

    is it really possible that we can install standby and primary on same host??
    yes its possible and i have done it many times within the same machine.
    For yours confusion about spfile ,i agree document recommend you to use spfile which is for DG broker handling if you go with DG borker in future only.
    There is no concern spfile using is an integral step for primary and standby database implementation you can go with pfile but good is use spfile.Anyhow you always keep pfile on that basis you created spfile,i said you make an entry within pfile then mount yours standby database with this pfile or you can create spfile from this pfile after adding these parameter within pfile,i said cause you might be adding this parmeter from SQL prompt.
    1. logs are not getting transfered(even i configure listener using net manager)
    2.logs are not getting archived at standby diectory.
    3.'ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION' NEVER COMPLETE ITS RECOVERY
    4. when tried to open database it always note it 'always' said system datafile is not from sufficiently old backup.
    5.i tried 'alter database recover managed standby database camncel' also.Read yours alert log file and paste the latest log here..
    Khurram

  • Confused about SOAP

    Hi all,
    As far as I know, SOAP is initially designed to be an XML based
    RPC protocol.
    But Java API for XML Messaging (JAXM), which is actually a
    messaging API (and not RPC), is also based on SOAP.
    How do they fit to each other?
    In a few words, what does actually SOAP define?
    I am confused about that, can you help me?
    Any idea will be appreciated.
    Thank you

    In a few words -- no. Try here:
    http://java.sun.com/webservices/docs/1.0/tutorial/index.html

  • Confused about passing by reference and passing by valule

    Hi,
    I am confuse about passing by reference and passing by value. I though objects are always passed by reference. But I find out that its true for java.sql.PreparedStatement but not for java.lang.String. How come when both are objects?
    Thanks

    Hi,
    I am confuse about passing by reference and passing
    by value. I though objects are always passed by
    reference. But I find out that its true for
    java.sql.PreparedStatement but not for
    java.lang.String. How come when both are objects?
    ThanksPass by value implies that the actual parameter is copied and that copy is used as the formal parameter (that is, the method is operating on a copy of what was passed in)
    Pass by reference means that the actual parameter is the formal parameter (that is, the method is operating on the thing which is passed in).
    In Java, you never, ever deal with objects - only references to objects. And Java always, always makes a copy of the actual parameter and uses that as the formal parameter, so Java is always, always pass by value using the standard definition of the term. However, since manipulating an object's state via any reference that refers to that object produces the same effect, changes to the object's state via the copied reference are visible to the calling code, which is what leads some folk to think of java as passing objects by reference, even though a) java doesn't pass objects at all and b) java doesn't do pass by reference. It passes object references by value.
    I've no idea what you're talking about wrt PreparedStatement, but String is immutable, so you can't change its state at all, so maybe that's what's tripping you up?
    Good Luck
    Lee
    PS: I will venture a guess that this is the 3rd reply. Let's see...
    Ok, second. Close enough.
    Yeah, good on yer mlk, At least I beat Jos.
    Message was edited by:
    tsith

  • PSE 7 confusion about folder location, help needed

    Here's some background: I'm using PhotoShop Elements 7 on Win XP.  I have an external firewire hard drive I use for overflow/backups.  Originally, this showed up as a K: drive on my system.
    I added a RAID controller and two more drives to stripe as a single drive for temp space rendering movies.  This ended up as a K: drive and the external moved to L:  However, when I did this there were some pictures from my catalog that I had on the external drive.  I have used File > reconnect missing files to handle the moves, but PSE is still confused (very).
    PSE has started to mix up the RAID (K:) and external (L:) content.  If I move a set of pictures (e.g. a folder of them) onto the external drive (L:) via drag and drop in the folder location view, the folder will show up empty on the L: heirarchy, but will show up as a gray folder icon in the K: RAID drive hierarchy.  If I open up windows explorer, the RAID drive will appear empty.  In other cases (I'm not sure when/how yet), pictures physically end up on the RAID drive itself instead of the external.  I have uninstalled both the external drive and the RAID drive and reinstalled them both, but they are still getting confused in the folder view by PSE.  I've also tried moving content outside of PSE and just reconnecting missing files, but it still wants to put things under the K: RAID drive instead of the external L:.
    I've searched everywhere I can think of for a description of what gray folder icons in the folder location view means and can find none.  I'm not sure how to convince PSE that there's nothing on the RAID K: drive and it shouldn't try to connect the two.  Any suggestions?
    Thanks,
    Jim

    Thank you!  I ran psedbtool and the output shows the catalog has the wrong drive letter for the L: drive.
    Is there a way to make PSE forget about the K: and L: drives that it is so confused about so that it can relearn of their existence?  If I use the drive letter reassignment to fix PSE, it will break other apps that are now dependent on the current drive letter assignments.  I've tried removing all files from the L: drive, but it's still remembered as part of the catalog.
    Thanks,
    Jim
    psedbtool version 1.07
    Opening catalog C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\Catalogs\Moms pics\catalog.pse7db
    Photoshop Elements version:      7
    Total files               :   4833
    Total files missing       :      0
    Total files offline       :    278
    Total files wrong volume  :      0
    ****** Volumes with warnings: 1
    PSE Volume Table
    Path used by PSE        : F:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : MEDIA
    Serial                  : 1C2F-9805
    Drive_path_if_builtin   : F:
    Id                      : 32520
    Path used by PSE        : M:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 938
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : FreeAgent Drive
    Serial                  : 7830-2970
    Drive_path_if_builtin   : M:
    Id                      : 93626
    Path used by PSE        : E:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : GAMES
    Serial                  : 025A-4B70
    Drive_path_if_builtin   : E:
    Id                      : 93625
    Path used by PSE        : L:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 114
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : FreeAgent Drive
    Serial                  : 60AE-A816
    Drive_path_if_builtin   : K:
    Id                      : 31354
    ***** WARNING *****     : Wrong drive letter in catalog
    Path used by PSE        : \\dmzhost\media
    Type                    : network_drive
    Status                  : offline
    Total files             : 278
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : //dmzhost/media
    Serial                  : //dmzhost/media
    Drive_path_if_builtin   :
    Id                      : 26948
    Path used by PSE        : J:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 3503
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : MEDIA2
    Serial                  : BAC0-B5A3
    Drive_path_if_builtin   : J:
    Id                      : 108
    Path used by PSE        : C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\Catalogs\Moms pics
    Type                    : database_relative_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : database relative
    Serial                  : amoc:database_relative_volume
    Drive_path_if_builtin   :
    Id                      : 2
    Windows Drives
    Drive  Type             Serial     Path
    A:     removable_drive  0000-0000 
    C:     builtin_drive    9088-07F9 
    D:     builtin_drive    F408-1CB0 
    E:     builtin_drive    025A-4B70 
    F:     builtin_drive    1C2F-9805 
    G:     builtin_drive    242D-15ED 
    H:     readonly_drive   0000-0000 
    I:     builtin_drive    427D-3F6B 
    J:     builtin_drive    BAC0-B5A3 
    K:     builtin_drive    64E8-9846 
    L:     builtin_drive    60AE-A816 
    M:     builtin_drive    7830-2970
    Thanks so much for your help!
    Jim

  • Confused about schema..

    I'm currently working on a project using VB 2010 Express and Oracle 11g XE. On my Oracle My SQL Developer, I am currently logged on as 'user X' and I created three tables. All of which are just listed on the 'tables' tree. Does it mean that 'user X' is like a schema when compared to MySQL?
    I have already integrated my database to my vb project and is working fine ATM. I'm just really confused about schemas in Oracle 11g XE.

    I'm just really confused about schemas in Oracle 11g XE.http://docs.oracle.com/cd/E11882_01/server.112/e25789/intro.htm#CEGJFFFD

  • I am confused about Icloud. I have a 5 year old Macbook, a 2 year old macbook and a 5 year old mac mini. What exactly do I need to do to get all this connected via Icloud. I also have an Iphone 3G. Help please!

    I am confused about Icloud. I have a 5 year old Macbook, a 2 year old macbook and a 5 year old mac mini. What exactly do I need to do to get all this connected via Icloud. I also have an Iphone 3G. Help please! Also, I still don't understand exactly what the benefits are. At the moment it seems a lot of hassle to change a system that's been working perfectly well and that I'm very happy with. I'm not at all sure whether the mac mini (1.66 GHz INtel Core Duo) can be brought up to the relevant spec to run ICloud.  Any thoughts?

    There are two aspects to iCloud.  One is simply getting an account, or migrating a mobileme account to iCloud.  The second part is using the various features of iCloud to sync contacts, calendars, use music match or photo sharing, and store iWorks documents.
    First to get an iCloud account:
    If you have a mobileme account, you can migrate by simply logging onto www.icloud.com (ignore any references to Lion and just click through to complete the migration).  If you have OS X Lion or an iOS 5 mobile device, you can create an iCloud account on that device using any valid AppleID.
    Once you have an account, you can use JUST the mail account if you wishi - it is a standard IMAP account so you would set it up like any other IMAP email account you have, in whatever client program you use to read email.
    To use the OTHER feautes of iCloud, your computers will have to be running OS X Lion (10.7).  Your iPhone 3G will never be able to use iCloud as it cannot run iOS 5 (you need a min. of an iPhone 3GS to run iOS 5).
    The requirements for OS X Lion are here - http://www.apple.com/macosx/specs.html  You need a min. of a Core 2 duo processor so you mini is not capable of running Lion.
    So, in your case, the single reasons for iCloud would be if you have a mobileme account, then use the online www.icloud.com to migrate your account so you do not lose your @me.com email address.  You can use iCloud email (without using any other iCloud features) by setting it up as IMAP mail with these settings - http://support.apple.com/kb/HT4864
    If you want an iCloud account and do NOT already have a mobileme account, you will need to upgrade one machine at least to Lion in order to be able to create an iCloud account.

  • Confuse about Configuring Oracle Warehouse Builder

    newbie here... i am abit confuse on how to configure the Oracle Warehouse builder...
    I have 2 database... 1 source and 1 new one...
    I understand that i have to install the Runtime Repository in the database computer and the Target Schema through the client's computer...
    so all this while... i am just confuse about what to install into the source database and what to install into the new database...
    Please help...

    Location is a logical entity in your OWB design that can be either a database schema, a flat file location, an SAP application location etc. Once you complete your design and are ready to deploy the design into the runtime environment, you will have to 'register' the locations by providing the physical details of your location to OWB (user name/password, database, hostname etc.).
    I am a bit confused by your configuration - are the source and the target in two separate schemas or in the same schema? Your posts are somewhat contradictory.
    If they are in two different schemas, you should:
    1. Create a source module pointing to a source schema (you can then import data object structures from the source schema - i.e. you don't have to create source tables manually in OWB, but you can import them into the module automatically). This module will have a source location (for example SRC_LOC).
    2. Create a target module where all your target objects will be (i.e. where the data will be loaded). This module will have a different location (TGT_LOC). In your target module you will also create the mappings.
    3. When deploying, you will register SRC_LOC with the physical details of your source schema, while the target location will be registered with the physical details of the target schema. The code generated by OWB during deployment will make sure that the data is extracted from the source schema and inserted into the target schema (either by generating and using DB links or by qualifying the schemas in the extraction queries if source and target are in the same database instance).
    On the other hand, if both source and target objects are in the same db schema, you can have all your objects in the same target module and you will only have to register the location of this target module when deploying (LOC_TGT).
    That said, there can be a variety of reasons why there is no data in the target after you run the extract mapping that have nothing to do with locations, such as logical errors in the mapping (an inappropriate filter or a wrong join), insufficient privileges etc. I suggest you take a look in the runtime audit browser that should contain the error messages relative to your mapping.
    Regards:
    Igor

Maybe you are looking for

  • How do I get a MS Word document on a Memory stick over to my IPad to edit and continue writing?

    I am looking to transfer my book that I am writing, with photos, from a USB memory stick written in Microsoft Word document format across to my IPad 3 to continue working on, editing it and adding more text and photos. Thanks for any help. Michael D

  • Method analysis

    Hi, I am trying to analysis a method that exists in a group of classes. What I need to do is to find out what's going on in the method by using reflection on the .class file. If I need to I can even parse the whole method as a string. But I couldn't

  • Display apps via Apple TV on MacBook Pro mfg prior to 2011

    I have a mid 2009 MacBook Pro with 2.53 GHz Intel Core 2 Duo processor running Mountain Lion 10.8.1.  It will not display my apps on my desktop via Apple TV to my TV.  Is there any fix coming for MacBook Pros older than the new one which will enable

  • What is a media kit - upgrading from Tiger to Leopard?

    I appreciate that I am a bit behind the power curve but I have only just realised that I have to upgrade to Leopard if I am to extend the life of my trusty iBook G4! The problem is the only source of Leopard seems to be eBay - where reliable advice i

  • My Number : Unknown Number

    I am using Blackberry Curve 9330 3g (CDMA) handset. When I press the green button then above the dial pad it show my number unknown number. Is there anyway to resolve this issue. I searched all over but I can't find support regarding this issue. Ther