Am i on the right track for establishing my client connection with BC4J?

I am developing web-application with BC4J JSP project now. However, I find the auto-generated page not that useful as they are not flexible enough. Then, I decided to write coding by myself. But the first problem is - how to write the coding for client connection? To make maintenance easy, I would like to place those connection code in a class file instead of hard-coding each connection details in my JSP or Servlet page.
Question 1: Through the examples I search in my JDeveloper (Candidate 2) directory, found a file TestClient.java in the \BC4J\samples\Caching\src\demo directory with the following codes:
// Create an instance of the application module by name, using local mode
String _am  = "demo.DemoModule"; // Fully-qualified application module name
String _cf  = "DemoModuleLocal"; // Configuration name for connection info
ApplicationModule am = Configuration.createRootApplicationModule(_am,_cf);
// Find the Managers view object by name in the application module
ViewObject mgrVO = am.findViewObject("Managers");
// We're done with the AM instance, so release it
Configuration.releaseRootApplicationModule(am,true);
Is it for testing only or really useful for the production environment? Am I doing the right thing if i use such method to establish my web client connection? What's the pros and cons for using this method? Any other better alternatives?
Question 2: As I know BC4J automatically takes care of connection pooling as a default manner since version 3.2. Can I still use the following statement
session.setAttribute("user_name", user_name); //Set session attribute
String user_name = (String) session.getAttribute(user_name); // Get session attribute
to capture and assign client session correctly for individual clients?
Question 3: What codes should I use to achieve 'Transaction' update, which assembles the coding as follows:
Connection.setAutoCommit(false); //disable auto commit
connection.commit();
connection.rollback();
connection.close();
Thanks for answering!!!

Question 1: Through the examples I search in my JDeveloper (Candidate 2) directory, found a file TestClient.java in the \BC4J\samples\Caching\src\demo directory with the following codes:
// Create an instance of the application module by name, using local mode
String _am  = "demo.DemoModule"; // Fully-qualified application module name
String _cf  = "DemoModuleLocal"; // Configuration name for connection info
ApplicationModule am = Configuration.createRootApplicationModule(_am,_cf);
// Find the Managers view object by name in the application module
ViewObject mgrVO = am.findViewObject("Managers");
// We're done with the AM instance, so release it
Configuration.releaseRootApplicationModule(am,true);
Is it for testing only or really useful for the production environment? Am I doing the right thing if i use such method to establish my web client connection? What's the pros and cons for using this method? Any other better alternatives?The Configuration API (createRootApplicationModule, releaseRootApplicationModule) will work. However, please note
that it is intended for java clients that will hold an ApplicationModule reference for a long duration. The BC4J web
frameworks (represented, for example, by the ApplicationModule and ReleasePageResources tags) all use the
SessionCookie interface to acquire/release ApplicationModule instances on a per request basis. This will allow
better scalability. Please see the pooling sample / documentation / javadoc for more information about using these
APIs. The pooling sample servlet is located in \BC4J\samples\Pooling\src\demo\TestPoolServlet.
Question 2: As I know BC4J automatically takes care of connection pooling as a default manner since version 3.2. Can I still use the following statement
session.setAttribute("user_name", user_name); //Set session attribute
String user_name = (String) session.getAttribute(user_name); // Get session attribute
to capture and assign client session correctly for individual clients?BC4J will not interfere with your use of the HttpSession context. How do you intend the "user_name" to be used? Do
you intend it to represent the DB user, JAAS user, etc. If you intend it to be used as the DB user you will need to declare
the "user_name" to BC4J. Please see:
http://technet.oracle.com/products/jdev/howtos/bc4j/howto_dynamic_jdbc.html
Question 3: What codes should I use to achieve 'Transaction' update, which assembles the coding as follows:
Connection.setAutoCommit(false); //disable auto commit
connection.commit();
connection.rollback();
connection.close();ApplicationModule.getTransaction().commit();
ApplicationModule.getTransaction().rollback();
If you are using the Configuration or SessionCookie APIs, as mentioned above, then the connection lifecycle will be
managed for you. So, you should not need to invoke connection.close().
Thanks for answering!!!
Hope this helps.
JR

Similar Messages

  • Hello, is Flash the right programme for a simple interactive game with buttons and small animations?

    Hello,
    I could really use some advice with a new project I am undertaking,
    I am looking to design a step-by-step game where users will be required to click on my artwork at each stage to get the next one. I would like different animated consequences to occur according to which button option is chosen at each stage. Eventually I would like for it to be a website that anybody can enter. I was wondering which programme would be ideal to use, I have access to Adobe Flash, Fireworks and Dreamweaver, but currently I only have a very basic grasp of them. This would be a long-term project I will be working on, so I am prepared to learn the appropriate programme, but if you could help me with which one that would be and any tips, I would be really grateful.
    Thanks very much,
    Hugo

    You have already posted this question here:  http://forums.adobe.com/message/2577400
    Please do not double-post.  Redundancy in forums is not a good idea. 

  • Is this the right place for me to get started with pdf development?

    Hi, What I am going to do is to write some AS3 classes which will load a pdf file and can extract its data like taking BitmapData shots from all the pages and that stuff...
    so, will you be able to let me know if I'd be able to ask tech questions in this forum along the way? and also, will you be able to tell me where to start to get some helpful information about pdf files so that I can access and read them in binary level?
    any comment is appriciated,
    Hadi

    thanks for the reply, I just downloaded that reference book and will start reading it in a few minutes... I wonder if I'd also need to purchase the pdf library thing later?  http://www.adobe.com/devnet/pdf/library/
    or accesing the pdf in AS3 in binary level will solve my problem of taking bitmapData screenshots from pages?
    Regards,
    Hadi

  • I want to know if i am on the right track

    'm still working on my DNA sequencing project (i am further along thank goodness) but now, i want to check my thought process.
    Okay, i have to write a new method public void addEdge(int i, int k)
    that creates an edge sequence between vertex j and k.
    What these need to do is take the watson-crick compliment of the last half of j concatenated with the watson-crick of the first half of k. So it looks kind of like this:
    sequence
    ATTATAAACCA
    watson-crick edge compliment
    TGGTTTATAAT
    here is my thought process
    1. take the initial sequence array and divide it by 2
    2. then go through the first half and change the compliments
    3. then do the same with the second half and concantenate them together
    so it would look like
    for(int i = 0; i < seqArray.length/2; i++){
    base = rand.nextInt(4);
    if(base==0)
    tube+="T";
    else if(base==1)
    tube+="A";
    else if(base==2)
    tube+="C";
    else if(base==3)
    tube+="G";
    for(int j = seqArray.length/2; j < seqArray.length; j++){
    base = rand.nextInt(4);
    if(base==0)
    tube+="T";
    else if(base==1)
    tube+="A";
    else if(base==2)
    tube+="C";
    else if(base==3)
    tube+="G";
    new Sequence(tube)= seqArray[i] + seqArray[j];What do you think? am i on the right track?
    }

    Something like the following?
    public class WC {
        private static char complement(char base) {
            switch (base) {
                case 'A': return 'T';
                case 'T': return 'A';
                case 'G': return 'C';
                case 'C': return 'G';
                default:
                    throw new IllegalArgumentException("unrecognised base "+base);
        private static char[] complement(char[] bases) {
            int size = bases.length;
            char[] complement = new char[size];
            for (int i = 0; i < size; i++) {
                complement[i] = complement(bases);
    return complement;
    public static void main(String[] args) {
    String s = args[0];
    String s1 = s.substring(0, s.length()/2);
    String s2 = s.substring(s.length()/2);
    char[] c1 = s1.toCharArray();
    char[] c2 = s2.toCharArray();
    s1 = new String(complement(c1));
    s2 = new String(complement(c2));
    System.out.println(s);
    System.out.println(s2+s1);
    Cheers, Neil

  • Calling a local Webservice from ECC ABAP - Am I on the right track?

    Hi all
    In my NW2004s landscape I have an ECC system (ABAP 6.40, Java not configured/linked) and an XI system (6.40).  My requirement is to call a Webservice (WS) from the ECC system.
    I've converted an existing Java class (that contains 3 methods) to a webservice (WS) using NWDS.  This WS has then been deployed to the XI system as it is the only one with a JAVA system.  I'm able to view and test the WS methods using the Web Service Navigator on the XI system.  The wsdl for the WS that was generated has the following format "http://<server>:<port>/<webservice name>/<configuration name>?wsdl  (No .asmx extension as per most of the examples on SDN...not sure if this matters).
    My understanding is that I should be able to create a client proxy in my ECC system (via Enterprise Services in SE80) using this wsdl and I can also configure a logical port throught txn LPCONFIG.  I should then be able to utilise ABAP to call this webservice? 
    I've found the blog "/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap detailing this (for a 6.40 system)... but when I attempt the program I get a soap 111 error code Unallowed RFC-XML Tag(SOAP_EINVALDOC).  
    Am I on the right track? Is it possible to call the Webservice from ECC ABAP? 
    There are no dumps for me to analyse and I've also tried putting on RFC trace with no success.
    Could it be that the WS is not correctly formed even though it works fine when tested from the WS Navigator on the XI system?
    Thanking you in advance.
    Malick

    Clive Pennington wrote:
    Thank you Eugene, your answer is most helpful.  I supose I just wanted to do everything myself really.  If when I have made my little movies, my animations and collated all my words and pictures I have problems assembling the documents then I can always get a professional to haul it together for me but I want to put in the donkey work first.  I know it is a lot of money for the software but now the pain is giving way a little I'm really quite enjoying myself.
    The planning which you have mentioned in your reply is of imense value I will start to do that immidiately, also the constant testing through Digital editions.
    All this is really helpful and I thank you for you reply.  I have made a brave attempt at some elementary annimation and posted them on youtube for testing, the urls are here if there is any interest.  Basic and time consuming but I can do this much faster now.
    http://tinyurl.com/348wjxg
    http://tinyurl.com/2wzuhql
    http://tinyurl.com/3yzjunk
    Thanks again............ Clive
    What comes through to me from your videos is that you know your material (of course, no pun intended) and that you have a clear sense of how to present it for clear communication to, and understanding by, your audience. Without this core, no amount of professional-level visual effects will achieve your goal, a great training program.
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • J2EE Design Question -- Am I On The Right Track?

    There are multiple tables in my database. Each table has a primary key, and the table that relates to other tables has foreign keys. I have to match the primary key and foreign key to go from one table to another. The specifics are spelled out below:
    The first table has login, pwd, and a primary key as fields, the second table contains completely different fields plus a primary key and foreign keys. The fields in the third table are different from those in the first and second tables plus its primary key. Queries to the third table can be made only if the user login and pwd are found in the first table, and through the second table's relation to the first table and the third table�s relation to the second table.
    The fields of all those tables may be accessed concurrently, but the fields are read-only (for the time being).
    I have a servlet to handle browser interactions. And I have a session bean to handle the workflow and business logic. However, I am confused with the choices between VO and entity beans.
    I first thought that I should use value objects to represent the data fields of the specific rows I looked for in those tables. Here is what I read about Value Object:
    "If a business object merely represents a structure to hold data fields, and the only behavior it provides are get and set method for the fields, then it would be wasteful of system resources to implement it as an enterprise bean. To avoid expensive remote methods calls (system resources and network bandwidth) to get the value of entity object fields, a value object is used to represent the details of the entity object. Only one remote call is required to retrieve the value object and then a client�s request to query the state of the object can then be met via local get methods on this details object."
    On my second thought, I think I should use entity beans to represent the specific rows I am looking for in those tables because I must use primary key and foreign key relations to go from one table to another.
    I do not use DAO because I am using CMP. The first call is within the session bean. It is a remote call to look for a specific row in the first table in my database. Subsequently, the mapping of the row in the first table to the second table, and the mapping of the row in the second table to the third table are all invoked on the �local" interfaces of those entity beans.
    client(browser)-->front controller(servlet)-->session facade(session ejb)-->entity ejb-->entity ejb -- > entity ejb
    Please advise if this is the right design. Am I on the right track? Is there improvement to be made?

    I might not explain my question well in my previous post -- there is no business logic involved in what I am doing to go from the first entity bean to the second entity bean and to go from the second entity bean to the third entity bean.
    Based on the login information, I have to go through those entity beans to find the very specific row in the third table in order to get the data field I need. That is to say, only thing involved is searching for rows.
    In my view, session bean -- > 1st entity bean -- > 2nd entity bean -- > 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the 1st entity bean for locating the 2nd entity bean
    2. 1st entity bean -- > 2nd entity bean: local call and returns the key to the 2nd entity bean for locating the 3rd entity bean
    3. 2nd entity bean -- > 3rd entity bean: local call and then returns the value of the specific field to the session bean
    The alternative approach is:
    session bean
    |
    + + +
    1st entity bean 2nd entity bean 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the session bean for locating the 2nd entity bean
    2. session bean -- > 2nd entity bean: remote call
    and returns the key to the session bean for locating the 3rd entity bean
    3. session bean -- > 3rd entity bean: remote call and the session bean can get the value of the specific field from the 3rd entity bean
    I do not know which approach to go for. Please provide guidance. Thanks.

  • Design Question -- Am I On The Right Track

    There are multiple tables in my database. Each table has a primary key, and the table that relates to other tables has foreign keys. I have to match the primary key and foreign key to go from one table to another. The specifics are spelled out below:
    The first table has login, pwd, and a primary key as fields, the second table contains completely different fields plus a primary key and foreign keys. The fields in the third table are different from those in the first and second tables plus its primary key. Queries to the third table can be made only if the user login and pwd are found in the first table, and through the second table's relation to the first table and the third table�s relation to the second table.
    The fields of all those tables may be accessed concurrently, but the fields are read-only (for the time being).
    I have a servlet to handle browser interactions. And I have a session bean to handle the workflow and business logic. However, I am confused with the choices between VO and entity beans.
    I first thought that I should use value objects to represent the data fields of the specific rows I looked for in those tables. Here is what I read about Value Object:
    "If a business object merely represents a structure to hold data fields, and the only behavior it provides are get and set method for the fields, then it would be wasteful of system resources to implement it as an enterprise bean. To avoid expensive remote methods calls (system resources and network bandwidth) to get the value of entity object fields, a value object is used to represent the details of the entity object. Only one remote call is required to retrieve the value object and then a client�s request to query the state of the object can then be met via local get methods on this details object."
    On my second thought, I think I should use entity beans to represent the specific rows I am looking for in those tables because I must use primary key and foreign key relations to go from one table to another.
    I do not use DAO because I am using CMP. The first call is within the session bean. It is a remote call to look for a specific row in the first table in my database. Subsequently, the mapping of the row in the first table to the second table, and the mapping of the row in the second table to the third table are all invoked on the �local" interfaces of those entity beans.
    client(browser)-->front controller(servlet)-->session facade(session ejb)-->entity ejb-->entity ejb -- > entity ejb
    Please advise if this is the right design. Am I on the right track? Is there improvement to be made?

    I might not explain my question well in my previous post -- there is no business logic involved in what I am doing to go from the first entity bean to the second entity bean and to go from the second entity bean to the third entity bean.
    Based on the login information, I have to go through those entity beans to find the very specific row in the third table in order to get the data field I need. That is to say, only thing involved is searching for rows.
    In my view, session bean -- > 1st entity bean -- > 2nd entity bean -- > 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the 1st entity bean for locating the 2nd entity bean
    2. 1st entity bean -- > 2nd entity bean: local call and returns the key to the 2nd entity bean for locating the 3rd entity bean
    3. 2nd entity bean -- > 3rd entity bean: local call and then returns the value of the specific field to the session bean
    The alternative approach is:
    session bean
    |
    + + +
    1st entity bean 2nd entity bean 3rd entity bean
    1. session bean -- > 1st entity bean: remote call and returns the key to the session bean for locating the 2nd entity bean
    2. session bean -- > 2nd entity bean: remote call
    and returns the key to the session bean for locating the 3rd entity bean
    3. session bean -- > 3rd entity bean: remote call and the session bean can get the value of the specific field from the 3rd entity bean
    I do not know which approach to go for. Please provide guidance. Thanks.

  • Strategy Pattern, Am i on the right Track?

    The question:
    Design a small, prototype, application, which creates, stores and amends warehouse records. This may have little more than a StockItem class.
    Using each of the patterns Strategy, Decorator, Adaptor and in turn provide three different adaptations to your prototype application which will enable a user to view the warehouse records in at least three different ways, e.g. by location, alphabetically, by value, by quantity in stock, as continuous plain text, as formatted text, in a list pane, as a printout etc
    My Code
    package warehouse;
    public class StockItem
        private int id;
        private String describtion;
        private double price;
        private int  quantity;
        private String location;
        ViewByLocationBehavior locationVar;
        public StockItem()
        public void setId(int id)
            this.id=id;
        public int getId()
            return id;
        public void setDescribtion(String describtion)
            this.describtion=describtion;
        public String getDescribtion()
            return describtion;
         public void setPrice(double price)
            this.price=price;
        public double getPrice()
            return price;
        public void setQuantity(int quantity)
            this.quantity=quantity;
        public int getQuantity()
            return quantity;
        public void setLocation(String location)
            this.location=location;
        public String getLocation()
            return location;
        public void setViewByLocationBehavior(ViewByLocationBehavior locationVar )
            this.locationVar=locationVar;
       public void displayByLocation()
        locationVar.displayByLocation();
        public String toString()
            return String.format("%d %S %f %d %S",id ,describtion,price,quantity,location);
    }The interface
    package warehouse;
    public interface ViewByLocationBehavior
        void displayByLocation();
    }Concrete classes arepackage warehouse;
    public class PlainText extends StockItem implements ViewByLocationBehavior
        public void displayByLocation()
            System.out.println("Display PlainText");
    package warehouse;
    public class FormattedText extends StockItem implements ViewByLocationBehavior
        public void displayByLocation()
            System.out.println("Display Formatted Text ");
    package warehouse;
    public class ListPane extends StockItem implements ViewByLocationBehavior
        public void displayByLocation()
            System.out.println("Display ListPane");
    package warehouse;
    public class PrintOut extends StockItem implements ViewByLocationBehavior
        public void displayByLocation()
            System.out.println("Display PrintOut ");
    package warehouse;
    public class StockTest
        public static void main(String args[])
            StockItem obj = new StockItem();
            obj.setViewByLocationBehavior(new PlainText());
            obj.displayByLocation();
            System.out.println(obj.toString());
    }But my questions is Am i on the right track applying the Strategy pattern?
    Because next i will make the other Interfaces: View by alphabetically, by value, by quantity, and their Concrete Classes are
    Display as continuous plain text, formatted text, in a list pane, and printout.
    Each interface have four concrete classes
    Need your comments Please?

    But my questions is Am i on the right track applying
    the Strategy pattern?Your assignment explicitly calls for the strategy pattern:
    "> Using each of the patterns Strategy, Decorator,
    Adaptor and in turn provide three different
    adaptations to your prototype application which will
    enable a user to view the warehouse records in at
    least three different ways, e.g. by location,
    alphabetically, by value, by quantity in stock, as
    continuous plain text, as formatted text, in a list
    pane, as a printout etc"I'm not sure I care for that interface much. I would have expected something more like this (I'm not 100% sure about the parameter that I'd pass, if any):
    public interface StockItemFilter
        List<StockItem> filter(List<StockItem> unfilteredStockItems);
    }Now you'll pass in an unfiltered List of StockItems and return the List of appropriate StockItems filtered alphabetically, by location, etc. If you want to combine the fetching of StockItems with filtering, replace the unfiltered List with some Criterion.
    Your ViewByLocationBehavior doesn't seem to accept any input or return anything. What good is it?
    %

  • Selling Macbook and erasing and restoring to Lion.  Am I on the right track?

    Hi All,
    I'm planning to sell a Macbook from 2008 that originally came with Snow Leopard.  I have since upgraded it to Lion.   
    I've read the discussions and I think I'm on the right track.  So far, I restarted and held the command and R keys.  That brought me to Disk Utility.  I chose "Macintosh HD" from the left hand bar and the format of "Mac OS Extended (Journaled)", selected to erase it, and chose the 7 pass security option. 
    In addition to being able to choose "Macintosh HD" there was "Mac OS X Base System".  However, I don't think I was able to perform an erase function on that.  Perhaps I can just leave that alone.
    Anyway, I successfully erased Macintosh HD with 7 pass.  I assume my next step would be to reinstall Lion.  When I try to I'm told to connect to my wi fi network and re-install Lion from the Apple site.  I had previously upgraded to Lion using a thumb drive which I no longer have.  I guess I have no choice but to reinstall from the Apple site.  That's fine for me as long as I get it to work.
    Before doing so though I'd like to know whether I missed any steps.  Was there anything else I should have done before I go ahead and reinstall Lion?
    Also, will the person buying the Macbook be able to operate it since the Lion OS would be tied to my Apple ID?
    Thank you.

    Follow these instructions step by step to prepare a Mac for sale:
    Step One - Back up your data:
           A. If you have any Virtual PCs shut them down. They cannot be in their "fast saved" state. They must be shut down from inside Windows.
           B. Clone to an external drive using using Carbon Copy Cloner.
              1. Open Carbon Copy Cloner.
              2. Select the Source volume from the Select a source drop down menu on the left side.
              3. Select the Destination volume from the Select a destination drop down menu on the right
                  side.
              4. Click on the Clone button. If you are prompted about creating a clone of the Recovery HD be
                  sure to opt for that.
                   Destination means a freshly erased external backup drive. Source means the internal
                   startup drive.
    Step Two - Prepare the machine for the new buyer:
              1. De-authorize the computer in iTunes! De-authorize both iTunes and Audible accounts.
              2, Remove any Open Firmware passwords or Firmware passwords.
              3. Turn the brightness full up and volume nearly so.
              4. Turn off File Vault, if enabled.
              5. Disable iCloud, if enabled: See.What to do with iCloud before selling your computer
    Step Three - Install a fresh OS:
         A. Snow Leopard and earlier versions of OS X
              1. Insert the original OS X install CD/DVD that came with your computer.
              2. Restart the computer while holding down the C key to boot from the CD/DVD.
              3. Select Disk Utility from the Utilities menu; repartition and reformat the internal hard drive.
                  Optionally, click on the Security button and set the Zero Data option to one-pass.
              4. Install OS X.
              5. Upon completion DO NOT restart the computer.
              6. Shutdown the computer.
         B. Lion and Mountain Lion (if pre-installed on the computer at purchase*)
             Note: You will need an active Internet connection. I suggest using Ethernet if possible because
                       it is three times faster than wireless.
              1. Restart the computer while holding down the COMMAND and R keys until the Mac OS X
                  Utilities window appears.
              2. Select Disk Utility from the Mac OS X Utilities window and click on the Continue button.
              3. After DU loads select your startup volume (usually Macintosh HD) from the left side list. Click
                  on the Erase tab in the DU main window.
              4. Set the format type to Mac OS Extended (Journaled.) Optionally, click on the Security button
                  and set the Zero Data option to one-pass.
              5. Click on the Erase button and wait until the process has completed.
              6. Quit DU and return to the Mac OS X Utilities window.
              7. Select Reinstall Lion/Mountain Lion and click on the Install button.
              8. Upon completion shutdown the computer.
    *If your computer came with Lion or Mountain Lion pre-installed then you are entitled to transfer your license once. If you purchased Lion or Mountain Lion from the App Store then you cannot transfer your license to another party. In the case of the latter you should install the original version of OS X that came with your computer. You need to repartition the hard drive as well as reformat it; this will assure that the Recovery HD partition is removed. See Step Three above. You may verify these requirements by reviewing your OS X Software License.

  • Need to reinstall HTML DB - Am I on the right track????

    I have a problem with my admin password not working. This is on a single user computer with htmldb installed in a local personal Oracle 9 database that I use specifically for development and testing. I don't know why the HTML DB admin password stopped working as it is just a lower case version of the ADMIN name. I can still access the user I created and have been working with that. No one else has access to this computer - so somehow I managed to screw something up.
    My question is - if I drop / wipe out the FLOWS_020000 and FLOWS_FILES users and then reinstall HTML DB, and then recreate my admin and user(s), will this solve my problem??
    Is there anything else I need to do to restore HTML DB?? I assume the HTTP SERVER should still be ok?
    I guess what I really need is confirmation that I am on the right track and not about to totally screw up a partially functional HTML DB install.
    Thanks for your help
    Glenn

    Please ignore the above thread - problem solved. My brainfart. Did 2 installs - kept the handwritten docs for the wrong one. Tracing my way through the install program jarred the memory.
    Thanks for the help Mark
    Nothing like a little bit of public embarassment
    glenn

  • I would like to convert a continuous waveform (created in Labview with the waveform generator vi) into digital form...am I on the right track (see below)

    I would like to simulate a sample and hold circuit. I was thinking of using the zero order hold vi (for continuous to discrete conversion) in combination with the AC to DC vi? Am I on the right track, or could anyone suggest a better way to do this? Many thanks in advance! 

    Hi,
    The answer to this question was answered in the forum post below:
    http://forums.ni.com/t5/LabVIEW/How-can-I-create-and-sample-and-hold-circuit-in-Labview/m-p/2369050#...
    If this question is different then please clarify and let me know. 
    Regards
    Arham H
    Applications Engineer
    National Instruments

  • Am I on the right track with the 'secret'  OPTION key?

    Everyone has questions about 'sharing' itune libraries. I just wanted to know how to keep them separate!
    After reading I got this far:
    Hold down the option key to view a different library, internal or external as long as it is plugged in and on the desktop.
    How to open alternate iTune library
    What happens, it a dialog comes up saying that the other users folder is locked or I don't have permission to access.
    Troubleshooting permissions on locked folders
    then I found a lot of great key cuts (for iPod) too~but using the option key in various configurations;
    Keyboard shortcuts
    itunes is on an external drive which complicates things, i think. Am I on the right track if
    * have to partition the external HD, one for each user.
    * drag the actual user folder to the external drive
    * change itune music folder for each user to selected partition
    * select "copy files to itunes music folder..." (which I still don't really understand)
    * make sure sharing is on all the way around
    And another discussion of "add to library" and more info on how to use play lists would be helpful.
    Is there a less cumbersome way to
    Load itunes, load a particular library
    then add to it via a playlist?
    First Gen iMac G5 17"   Mac OS X (10.4.8)   iMac G3 350/6GB/1GB/OSX Panther

    See, on the external, I can't have three folders that all say iTunes music folder, each one belonging to a different user.
    Sure you can. Put them in separate folders (John's music, Mary's music and Sam's music).
    But you should be creating new iTunes folders, not simply iTunes music folders. The iTunes music folder is in the iTunes folders but so it the iTunes library file.
    Any reason you want the music separated? You can put it all in one library. Everyone uses the same and simply create a playlist of the music they want. This way, if you have any of the same music, you won't have it on the computer more than once.

  • Could you please tell me if I am in the right track?

    I am required to develop a online shopping web application which uses JSP and EJB. The first page I need to create is the login page. I would like to know if I am in the right track to implement this system in EJB design pattern.
    I got the following classes:
    User.java
    ===============================
    package assignment;
    import java.rmi.*;
    import javax.ejb.*;
    import java.util.Vector;
    public interface User extends EJBObject {
         public boolean Login(String id,String pwd,String role) throws RemoteException;
         public Vector getMusicCategories() throws RemoteException;
         public Vector getCategoryItems(String category) throws RemoteException;
         public MusicRecording getMusicRecording(String id) throws RemoteException;
    }UserHome.java
    ========================
    package assignment;
    import java.rmi.*;
    import javax.ejb.*;
    public interface UserHome extends EJBHome {
         public User create() throws RemoteException, CreateException;
    }UserBean.java
    ====================
    package assignment;
    import java.rmi.*;
    import javax.ejb.*;
    import java.util.Vector;
    public class UserBean implements SessionBean {
         // data item to hold a reference to a passed Session context
         private SessionContext ctx;
         // save the session context
         public void setSessionContext(SessionContext x) { ctx = x;}
         // the various method implementations
         // imposed on us by interface
         public void ejbCreate() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void ejbRemove() {}
         public boolean Login(String id,String pwd,String role) throws RemoteException{
         } //returns true if the user is invalid,else returns false
         public Vector getMusicCategories() throws RemoteException{
         public Vector getCategoryItems(String category) throws RemoteException{
    public MusicRecording getMusicRecording(String id) throws RemoteException{
    }Login.jsp
    ====================
    <%@ page import="Assignment.User,Assignment.UserHome,javax.ejb.*, java.math.*, javax.naming.*, javax.rmi.PortableRemoteObject, java.rmi.RemoteException" %>
    <%!
       private User u = null;
       public void jspInit() {
          try {
             InitialContext ic = new InitialContext();
             Object objRef = ic.lookup("UserBean");
             UserHome home = (UserHome )PortableRemoteObject.narrow(objRef, UserHome.class);
             u = home.create();
          } catch (RemoteException ex) {
                System.out.println("Remote Exception:"+ ex.getMessage());
          } catch (CreateException ex) {
                System.out.println("Create Exception:"+ ex.getMessage());
          } catch (NamingException ex) {
                System.out.println("Unable to lookup home: "+ ex.getMessage());
       public void jspDestroy() {   
             u = null;
    %>
    <html>
    <head>
    </head>
    <body bgcolor="#0066CC">
    <h1><b><font color="#FFFFFF">E Music CD Shopping System</font></b></h1>
    <hr>
    <br>
    <br>
    <form name="login" method="get">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="259">
      <tr>
        <td width="33%" height="46" align="center"><b><font color="#FFFFFF">User ID:</font></b></td>
        <td width="33%" height="46"><input type="text" name="id" size="20"></td>
        <td width="34%" height="46">&#12288;</td>
      </tr>
      <tr>
        <td width="33%" height="68" align="center"><b><font color="#FFFFFF">Password:</font></b></td>
        <td width="33%" height="68"><input type="password" name="pwd" size="20"></td>
        <td width="34%" height="68">&#12288;</td>
      </tr>
      <tr>
        <td width="33%" height="59" align="center"><b><font color="#FFFFFF">Role:</font></b></td>
        <td width="33%" height="59"><select size="1" name="role">
        <option value="Member">Member</option>
        <option value="Admin">Admin</option>
        </select></td>
        <td width="34%" height="59">&#12288;</td>
      </tr>
      <tr>
        <td width="100%" colspan="3" height="83"><center><input type="submit" value="Submit"><input type="reset" value="Reset"></center></td>
      </tr>
    </table>
    </form>
    </body>
    </html>
    <%
    String id=request.getParameter("id");
    String pwd=request.getParameter("pwd");
    String role=request.getParameter("role");
    boolean validUser=false;
    if(id!=null && pwd!=null && role!=null) {
    validUser=u.Login(id,pwd,role);
    if (validUser==true)
    response.sendRedirect("main.jsp"); //go the the main page of the system.
    else
    response.sendRedirect("loginfailed.jsp");
    else {
    response.sendRedirect("loginfailed.jsp");
    %>Please help me.
    Any advice would be very much appreciated.
    Many thanks to you all.

    EJB stuff looks ok.
    The only comment I could make is that the UserBean should probably implement the User interface
    Mixing JSP and scriptlet code is bad.
    If you need to do java code most of the time that should be in a Servlet, which then uses the request dispatcher to forward to a jsp to display the result.
    The entire java code for retrieving the EJB and testing for login could be in a servlet. It is completely unrelated to displaying a login page.
    Cheers,
    evnafets

  • Is CF the right one for me?

    I am trying to decide if CF is the right language for a side
    project I am beginning. I am not a beginner to web design but am
    far from advanced. I have made stuff in the past and have a
    knowledge of html. I also use to write software in VB6 (nothing to
    crazy just small side stuff). I am embarking on a project to write
    some intranet workbench software for my company. I want it to serve
    as a salesmen ordering/tracking system as well as a project
    management system. Obviously it is a big task and I am going to
    break it into small pieces to work on over time and continue to
    expand and use it.
    I have seen CF before and know people who swear by it. I have
    used it briefly so I have some understanding.
    My question would be as to the correct way to move forward on
    this project.
    First, is a web project vs. a standalone installed product
    the way to go?
    Second, what is the right technology (CF, ASP?) I have no
    knowledge of ASP so that would be a learning curve.
    It is not expected to be hit by a tremendous amount of
    employees. Currently we have 29 and I was going to use an access
    database so any server technology should be less of a bottleneck
    than my database.
    I guess before I start in the wrong direction I wanted to get
    some feedback on what direction you all would recommend?

    Coldfusion is a kids language, a dying language, an out of
    date
    language, ect, ect.
    No seriously, the main problem with CF is adoption. Some folk
    complain about
    cost, but the issue is adoption (though I am sure there is a
    connection).
    If CF not being as popular as other soultions is not a
    problem (popularity
    isn't everything), then go for it if you can afford it.
    Personally I would
    be considering better priced options that offer more RAD
    features (Ruby On
    Rails, for example, is free) - but that wuold be mostly
    becasue I am not
    sure what the future holds for CF and I happen to know that
    the Ruby option
    is much faster to code.
    If CF is something you are comfortable with, then there is no
    reason to not
    use it - it WILL get the job done.
    "ivanjay" <[email protected]> wrote in
    message
    news:[email protected]...
    > I am trying to decide if CF is the right language for a
    side project I am
    > beginning. I am not a beginner to web design but am far
    from advanced. I
    have
    > made stuff in the past and have a knowledge of html. I
    also use to write
    > software in VB6 (nothing to crazy just small side
    stuff). I am embarking
    on a
    > project to write some intranet workbench software for my
    company. I want
    it to
    > serve as a salesmen ordering/tracking system as well as
    a project
    management
    > system. Obviously it is a big task and I am going to
    break it into small
    > pieces to work on over time and continue to expand and
    use it.
    >
    > I have seen CF before and know people who swear by it. I
    have used it
    briefly
    > so I have some understanding.
    >
    > My question would be as to the correct way to move
    forward on this
    project.
    >
    > First, is a web project vs. a standalone installed
    product the way to go?
    > Second, what is the right technology (CF, ASP?) I have
    no knowledge of
    ASP so
    > that would be a learning curve.
    >
    > It is not expected to be hit by a tremendous amount of
    employees.
    Currently
    > we have 29 and I was going to use an access database so
    any server
    technology
    > should be less of a bottleneck than my database.
    >
    > I guess before I start in the wrong direction I wanted
    to get some
    feedback on
    > what direction you all would recommend?
    >

  • What is the right charger for a MacBook Pro 13"  mid 2009 model?

    What is the right charger for a MacBook Pro 13" mid 2009 model? I have two chargers for two different Mac and don't know which is  thankswhich. I'm really looking for specific details such as voltage/watts and all the rest to idenify my charger.  A link to where to web page where I could purchase the correct charger would also be very useful. Many thanks.
    All help much appreciated. THANK YOU

    Both power adapter I have are different (at the magnet end) from the one in link.
    Earlier adapters have T shaped connectors, which Apple later changed to the L shape, presumably to make them more abuse-proof. Either one is fine and the one you are using will not damage your Mac.
    Retina MBPs and new MBAs use a completely different MagSafe 2 connector which will not fit (without an adapter).

Maybe you are looking for