Beginner's EJB Question

I've been going through the J2EE tutorial and generally understand how it works but I have a question about application clients. I get the general concept that a client uses JNDI to look up the environment entry to find an EJB. However, I think my question is "how does the JNDI entry get set in the application client's machine?" In a web client it makes sense to me because the JSP hits the server (and the server is where the JNDI entry is). On the application client the only way I can think that the entry gets there is through maybe a jar file created when the application is compiled on the app server. My guess is that that's packaged with the application client and each user who installs the application client has to put the jar in their classpath. Is that correct?
In a very much related question, I'm also wondering how the client calls methods on the enterprise beans. I assume that the jar files have some code in them that make a network connection to the app server. I just wanted to verify that my understanding of how this all works is correct.

I've been going through the J2EE tutorial and
generally understand how it works but I have a
question about application clients. I get the
general concept that a client uses JNDI to look up
the environment entry to find an EJB. However, I
think my question is "how does the JNDI entry get set
in the application client's machine?" In a web
client it makes sense to me because the JSP hits the
server (and the server is where the JNDI entry is).
On the application client the only way I can think
k that the entry gets there is through maybe a jar
file created when the application is compiled on the
app server. My guess is that that's packaged with
the application client and each user who installs the
application client has to put the jar in their
classpath. Is that correct?
Not really. JNDI binding exists on server only. When client does a lookup it connects to server's naming service (via remote call) and asks an object with specific JNDI name.
In a very much related question, I'm also wondering
how the client calls methods on the enterprise beans.
I assume that the jar files have some code in them
m that make a network connection to the app server.
I just wanted to verify that my understanding of how
w this all works is correct.
Yes, it's correct. Code that makes a network connection is called a stub (or client stub). For some app. servers (SUN AS) you need to generate stubs of EJB's and put them into clien't classpath. For others (JBoss) it's not required, because a stub can be downloaded from server.

Similar Messages

  • Beginner entity EJB question.

    Hi,
    I am researching into whether to use JDO for my application.
    I have read that polymorphism, inheritance and complex relations are absent from EJB's. Is this true? I am thinking that maybe the place where I have read this are biased towards JDO, which is why they have stated this, and would like to get a neutral opinion.
    Also, I read at JDOCentral that The acceptance of the Java Community Process� (JCP) JSR 243, also known as JDO 2.0, is in jeopardy. The recent vote by the JCP Executive Committee in the so called Public Review Ballot resulted in 5 YES votes and 10 NO votes and 1 abstention. I am a little confused. I keep hearing that JDO is so good, if that is the case, why was it rejected?
    You see, I am going to use it for my project, cos I read so many good things about it, but am now unsure of whether to use it, cos if it was really that good, there would not have been 10 votes against.
    Any advice would be appreciated.
    Thanks.

    I am researching into whether to use JDO for my
    application.Good to see the sensei reseaching :)
    I have read that polymorphism, inheritance and
    complex relations are absent from EJB's. Is this
    true? I am thinking that maybe the place where I have
    read this are biased towards JDO, which is why they
    have stated this, and would like to get a neutral
    opinion.There are many threads on the forum as well as on http://theserverside.com on the same.
    Also, I read at JDOCentral that The acceptance of
    the Java Community Process� (JCP) JSR 243, also known
    as JDO 2.0, is in jeopardy. The recent vote by the
    JCP Executive Committee in the so called Public
    Review Ballot resulted in 5 YES votes and 10 NO votes
    and 1 abstention. I am a little confused. I keep
    hearing that JDO is so good, if that is the case, why
    was it rejected?Might have something to do with EJB 3.0
    http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/05/07#ejb3
    This blog discusses about the problem with JDO specs.
    You see, I am going to use it for my project, cos I
    read so many good things about it, but am now unsure
    of whether to use it, cos if it was really that good,
    there would not have been 10 votes against.This should really prevent you from using it! If JDo fits your design, you might still use it. But consider taking a look at Hibernate!
    Cheers!
    ***Annie***

  • EJB question: How to use abstract class in writing a session bean?

    I had written an abstract class which implements the session bean as follow:
    public abstract class LoggingSessionBean implements SessionBean {
    protected SessionContext ctx;
    protected abstract Object editRecord(Object obj) throws Exception;
    public LoggingSessionBean()
    super();
    private final String getBeforeUpdateImage(Object obj) throws Exception {
    // implement the details of extracting the backup image ...
    public void setSessionContext(SessionContext ctx)
    this.ctx = ctx;
    private final void writeThisImageToDatabase(String aStr) {
    // connect to database to write the record ...
    public final Object update(final Object obj) {
    try {
    final String aStr = getBeforeUpdateImage(obj);
    writeThisImageToDatabase(aStr);
    editRecord(obj);
    } catch (Exception e) {
    ctx.setRollbackOnly();
    This abstract class is to write the backup image to the database so that other session beans extending it only need to implement the details in editRecord(Object Obj) and they do not need to take care of the operation of making the backup image.
    However, some several questions for me are:
    1. If I write a class ScheduleSessionBean extending the above abstract class and the according 2 interfaces ScheduleSession and ScheduleSessionHome for this session bean (void update(Object obj); defined in ScheduleSession), do I still need to write the interfaces for LoggingSession and LoggingSessionHome?
    2. If I wrote the interface LoggingSession extending EJBObject where it defined the abstract methods "void update(Object obj);" and "void setSessionContext(SessionContext ctx);", that this meant I needed to write the ScheduleSession to implement the Logging Session?
    3. I used OC4J 9.0.4. How can I define the ejb-jar.xml in this case?

    Hi Maggie,
    1. do I still need to write
    the interfaces for LoggingSession and
    LoggingSessionHome?"LoggingSessionBean" can't be a session bean, because it's an abstract class. Therefore there's no point in thinking about the 'home' and 'remote' interfaces.
    2. this
    meant I needed to write the ScheduleSession to
    implement the Logging Session?Again, not really a question worth considering, since "LoggingSessionBean" can't be an EJB.
    3. I used OC4J 9.0.4. How can I define the
    ejb-jar.xml in this case?Same as you define it for any version of OC4J and for any EJB container, for that matter, since the "ejb-jar.xml" file is defined by the EJB specification.
    Let me suggest that you create a "Logging" class as a regular java class, and give your "ScheduleSessionBean" a member that is an instance of the "Logging" class.
    Alternatively, the "ScheduleSessionBean" can extend the "Logging" class and implement the "SessionBean" interface.
    Good Luck,
    Avi.

  • Stateless Session Bean + EJB Question + Jboss

    Hello,
    If I have a stateless session bean on a linux machine and it works locally what do i need to do to access a method in the session bean from a remote windows machine.
    I would like to be able to execute my client jar file on a windows machine and have it access the jboss server on the linux machine. what do i need to do?
    i have the session bean working locally on both windows and linux machine. do i need to to have a JSP/Servlet to access the session bean? can the session bean not be accessed directly? what should my classpath look like? do I need to include extra jar files in my client jar file.?
    Thanks,
    Joyce

    Thanks guys for the help but I am still a little lost.
    My Client windows machine has the client jar file and all the other jar files. This is my client class
    package helloworld.client;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    import java.util.Properties;
    import helloworld.interfaces.HelloWorldHome;
    import helloworld.interfaces.HelloWorld;
    public class HelloClient
         public static void main(String[] args)
              Hashtable prop = new Hashtable();
              prop.put ("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
              prop.put ("java.naming.provider.url","jnp://172.16.220.160:1099");
              prop.put ("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
              try
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("ejb/helloworld/HelloWorld");
                   System.out.println(obj);
                   HelloWorldHome home = (HelloWorldHome)javax.rmi.PortableRemoteObject.narrow(obj, HelloWorldHome.class);
                   HelloWorld helloWorld = home.create();
                   String str = helloWorld.sayHelloEJB("JOYCE is COOL");
                   System.out.println(str);
                   helloWorld.remove();
              catch(Exception e)
                   e.printStackTrace();
    I get a NullPointer ie the home object is null. The IP address is the IP of the Linux machine that has Jboss running on.
    Questions are:
    1. Do I need to have Tomcat running on my client machine if I am to connect via HTTP? Does this alter my client code.?
    2. My JNDI lookup is what is causing the problem. Does my jboss.xml and my ejb-jar.jar look okay to you.
    jboss.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <jndi-name>ejb/helloworld/HelloWorld</jndi-name>
    </session>
    </enterprise-beans>
    <resource-managers>
    </resource-managers>
    </jboss>
    ejb-jar.jar
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description>No Description.</description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <description><![CDATA[No Description.]]></description>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <home>helloworld.interfaces.HelloWorldHome</home>
    <remote>helloworld.interfaces.HelloWorld</remote>
    <ejb-class>helloworld.session.HelloWorldBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    -->
    <!-- Entity Beans -->
    <!--
    To add entity beans that you have deployment descriptor info for, add
    a file to your merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    -->
    <!-- Message Driven Beans -->
    <!--
    To add message driven beans that you have deployment descriptor info for, add
    a file to your merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    -->
    </enterprise-beans>
    <!-- Relationships -->
    <!-- Assembly Descriptor -->
    <assembly-descriptor >
    <!-- finder permissions -->
    <!-- transactions -->
    <!-- finder transactions -->
    </assembly-descriptor>
    </ejb-jar>
    Do I need RMI ? Do I need to concern myself with CORBA? All Im looking for is a step by step to understanding what I need to configure? Is their some way I can debug?
    Thanks alot,
    Joyce

  • Simple Java EJB question.

    When it comes to EJB v3 Remote and Local interfaces,
    (With JBoss EJB Container Software in mind, for this question,)
    -Does the Remote interface for the EJB include method signatures from the Bean class
    -that are to be seen
    -that are to be hidden?
    -Does the Local interface for the EJB include method signatures from the Bean class
    -that are to be seen
    -that are to be hidden?
    Which is which for
    -EJB 2.1 ?
    -EJB 3.x ?
    - is EJB 3.x reverse compatible in that it allows use of the javax.ejb.* interfaces,
    and would accept a EJB 2.1 approach, or does it force one to use Annotations
    exclusively?
    Edited by: Zac1234 on Jul 21, 2010 5:21 PM

    muiajc wrote:
    I know this is a simple question, but I can't search for the answer to this because it involves syntax that Google and the like don't seem to search for..
    I am trying to figure out some Java code that I have found. I would like to know what:
    a[--i] and a[++j] mean.
    It mean increase/decrease the int i/j by 1. This is done before it gets you the value of a[]. for example if i=5 and you said a[--i] it is really a[4] and i is now equal to 4;

  • * * * From a beginner in EJB * * *

    I'm not a newbie programmer but all this stuff regarding EJB sometimes cause me a headache, you know.
    I'm following "Enterprise JavaBeans Fundamentals" tutorial from developerWorks. You can reach this at IBM site. I've been reading a lot
    of materials and until now this tutorial is the best I've ever found and
    the examples work as expected.
    Let's say I have an app with some EJBs (session (stateless and stateful) and entity beans), it doesn't matter what they do, I just have them. My question is about ejb-jar.xml file(s):
    Do I need a deployment descriptor for each bean or I can have just only one in which I have all information about the beans ???
    My best regards,
    Romualdo Rubens de Freitas.

    Greetings,
    Hi Tony,
    Based on what you said "...a composite of objects...",
    if I have a Customer bean and an Order bean, both of
    them can be a single EJB with a single ejb-jar.xml
    file, right ??? If so, suppose a customer can haveThey can be "singly composed" within their own jar files or "multiply composed" within the same jar file. The thing to keep in mind here is that 'ejb-jar' file is what is actually the "EJB" - it is what is ultimately "distributed" and used to assemble larger applications...
    zero or more orders, how can I specify (in
    ejb-jar.xml) that a customer is "linked" with an order
    or an order is "linked" with a customer ???Depends on what exactly you are refering to... "bean linkage" or "data linkage". The latter most appropriately regards CMP/EJB-QL and, therefore, is specific to EJB 2.0 Entity Beans. The former, however, regards bean-to-bean (actually, any J2EE application component-to-bean ;), references and are common to all bean types in EJB 1.1 and later. Also called "EJB references", these would seem most relevant to the issue at hand... Regardless of how they are packaged (above), one bean(/component) must reference another through the same mechanism as other components and clients: by looking it (it's "Home object" ;) up in the naming service and calling a lifecycle method.
    Note: The argument for "Local interface types" should be recognized here but with the following caveats: 1) local interfaces are available as of EJB 2.0 only; 2) local interfaces are NOT specific to "multiply composed" EJBs but have, in fact, as their only requirement that the inter-referencing components are co-located within the same VM instance; and, consequently, 3) local interfaces do not need to be "narrowed" (since they are not being tunneled through the server's communication protocol ;).
    As with other components making co-located references, the real burden here is on the Deployer (as in the "role of" ;) who must make sure that all 'coded references' are linked to actual 'JNDI bindings' at deployment time. This, naturally, is done according to the server vendor's method of doing so ("RTFM").
    Greetings to you, my friend,
    Romualdo Rubens de Freitas.Regards,
    Tony "Vee Schade" Cook

  • EJB Question Please help me

    Hi
    I am preparing for certification exam. I don't know the correct answer of these question. Please help me.
    Regards
    Arghya Banerjee
    ========================================================================
    1. While testing a BMP Entity Bean, a developer discovers that a transaction rollback does not cause a rollback of the changes made to the bean as it should. Which of the following should the developer suspect?
    A.     The ejbPassivate() method has a bug.
    B.     The ejbStore() method has a bug.
    C.     The ejbCreate() method has a bug.
    D.     The datastore does not support JTA.
    E.     The transaction does not implement javax.transaction.UserTransaction.
    Select 2 answers.
    2.     A Servlet must perform 3 operations that are independent of one another. They are time consuming with each operation consuming about 10 msec of CPU. The Servlet's response depends on the completion of all three operations. The developer decides to perform each operation on a separate worker thread to run them concurrently. Which of the following describe important parts of this implementation?
    A.     The Servlet should implement MultiThreadModel
    B.     The Servlet should implement SingleThreadModel
    C.     Access to the HttpSession must be synchronized.
    D.     The worker threads must not write to the ServletOutputStream.
    E.     The worker threads must not read from the ServletInputStream.
    Select the best answer.
    3. A client invokes the create() method on an CMP entity bean. Which of the following is a correct sequence in which the operations mentioned below are performed?
    a.     Container creates an EJBObject.
    b.     EJB home object invokes ejbCreate() on Bean instance
    c.     Bean instance is associated with EJBObject.
    d.     Container creates new bean instance.
    e.     Container calls setEntityContext() on bean instance.
    f.     Container creates the bean representation in a database.
    g.     ejbPostCreate() method is invoked on bean instance.
    A.     b -> f -> a -> c -> g
    B.     b -> a -> f -> c -> e -> g
    C.     a -> d -> c -> b -> e -> g -> f
    D.     a -> d -> c -> b -> f -> g -> e
    E.     a -> c -> e -> b -> f -> g
    Select the best answer.
    4.     A Web site is getting a lot of 'hits' and the amount of session data managed by the server is becoming too large for it to handle. Which of the following are appropriate ways to solve the problem?
    A.     Expand the capacity of the server.
    B.     Add additional servers to share the load.
    C.     Store the session data in a Cookie.
    D.     Store all session data in hidden fields on the web pages that are served.
    5. A developer wishes to make a server function available to an applet via a Servlet. The applet passes the Servlet a serialized object as an argument. How should the developer implement the Servlet?
    A.     Sub-class HttpServlet and create an ObjectInputStream from the
    ServletInputStream in the doGet() method.
    B.     Sub-class HttpServlet and create an ObjectInputStream from the
    ServletInputStream in the service() method.
    C.     Sub-class GenericServlet and create an ObjectInputStream from the
    ServletInputStream in the doGet() method.
    D.     Sub-class GenericServlet and create an ObjectInputStream from the ServletInputStream in the service() method.
    Select the best answer.
    6. While testing a CMP Entity bean, a developer discovers that a change to one of the bean's properties is not being reflected in the database that contains the bean data. What are possible causes?
    A.     The ejbStore() method has a bug.
    B.     The ejbCreate() method has a bug.
    C.     The setter for the property has a bug.
    D.     The mapping of container managed fields to database fields has a bug.
    E.     The deployment descriptor has a bug.
    F.     The ejbLoad() method has a bug.
    Select 4 answers.

    Hi Arghya ,
    From where you have taken these quetions , are they from the book.
    1. While testing a BMP Entity Bean, a developer
    discovers that a transaction rollback does not cause a
    rollback of the changes made to the bean as it should.
    Which of the following should the developer suspect?
    A.     The ejbPassivate() method has a bug.
    B.     The ejbStore() method has a bug.
    C.     The ejbCreate() method has a bug.
    D.     The datastore does not support JTA.
    E.     The transaction does not implement
    javax.transaction.UserTransaction.
    Select 2 answers.
    D,B If the Transaction is rolled back there are the possibility that either the datasource doesnot support it or the bean is updating the inconsistent data, so mostly problem in ejbStore() where there is a database update.
    2.     A Servlet must perform 3 operations that are
    independent of one another. They are time consuming
    with each operation consuming about 10 msec of CPU.
    The Servlet's response depends on the completion of
    all three operations. The developer decides to perform
    each operation on a separate worker thread to run them
    concurrently. Which of the following describe
    important parts of this implementation?
    A.     The Servlet should implement MultiThreadModel
    B.     The Servlet should implement SingleThreadModel
    C.     Access to the HttpSession must be synchronized.
    D.     The worker threads must not write to the
    ServletOutputStream.
    E.     The worker threads must not read from the
    ServletInputStream.
    Select the best answer.
    Now here what is the worker Thread should not write to output stream as if it does then there will be wrong formatting of the data, we are bothered about to improve the throughput so we have spawned three worker thread.Also there is no dependency so D is proper one
    3. A client invokes the create() method on an CMP
    entity bean. Which of the following is a correct
    sequence in which the operations mentioned below are
    performed?
    a.     Container creates an EJBObject.
    b.     EJB home object invokes ejbCreate() on Bean
    instance
    c.     Bean instance is associated with EJBObject.
    d.     Container creates new bean instance.
    e.     Container calls setEntityContext() on bean
    instance.
    f.     Container creates the bean representation in a
    database.
    g.     ejbPostCreate() method is invoked on bean
    instance.
    A.     b -> f -> a -> c -> g
    B.     b -> a -> f -> c -> e -> g
    C.     a -> d -> c -> b -> e -> g -> f
    D.     a -> d -> c -> b -> f -> g -> e
    E.     a -> c -> e -> b -> f -> g
    Select the best answer.
    Client invokes the create method on the home which inturn prepares the EJBObject and attaches the bean instance to the EJBObject and returned the reference to the client.So the option E.
    >
    4.     A Web site is getting a lot of 'hits' and the
    amount of session data managed by the server is
    becoming too large for it to handle. Which of the
    following are appropriate ways to solve the problem?
    A.     Expand the capacity of the server.
    B.     Add additional servers to share the load.
    C.     Store the session data in a Cookie.
    D.     Store all session data in hidden fields on the web
    pages that are served.
    You have to use the Load balancing tech , go for distributed technology B , the processing speed is now the criteria so you distribute the work.
    5. A developer wishes to make a server function
    available to an applet via a Servlet. The applet
    passes the Servlet a serialized object as an argument.
    How should the developer implement the Servlet?
    A.     Sub-class HttpServlet and create an
    ObjectInputStream from the
    ServletInputStream in the doGet() method.
    B.     Sub-class HttpServlet and create an
    ObjectInputStream from the
    ServletInputStream in the service() method.
    C.     Sub-class GenericServlet and create an
    ObjectInputStream from the
    ServletInputStream in the doGet() method.
    D.     Sub-class GenericServlet and create an
    ObjectInputStream from the ServletInputStream in the
    service() method.
    Select the best answer.
    I have to refer some docs for this
    6. While testing a CMP Entity bean, a developer
    discovers that a change to one of the bean's
    properties is not being reflected in the database that
    contains the bean data. What are possible causes?
    A.     The ejbStore() method has a bug.
    B.     The ejbCreate() method has a bug.
    C.     The setter for the property has a bug.
    D.     The mapping of container managed fields to database
    fields has a bug.
    E.     The deployment descriptor has a bug.
    F.     The ejbLoad() method has a bug.
    Select 4 answers.
    If there is the problem in the deployment descriptor then there ejb will not deploy at all .As the problem comes in updating I can make so no problem in the ejbCreate() also , but then many other consideration has to be taken .So I have my answer as
    A,C,D,F
    That is all I can say.
    Regard
    Vicky

  • EJB question

    Dear fellow Java developers:
    I have a very straightforward question regarding ejb deployment using weblogic. In using the "jar" command of java, I have seen in various tutorials on ejb various uses of the command and want to know what is in fact happening.
    Question 1:
    the command:
    c:\jar cvf PRE_HelloworldEJB.jar -C ejb_build META-INF -C ejb_build com
    ---------> what does the -c command mean, and what does the line
    "-C ejb_build META-INF -C ejb_build com" do?
    Question 2:
    what is the difference between
    c:\jar -cv0f tmp_day05_SignOn.ar META-INF day05
    and this line:
    c:\jar cvf PRE_HelloworldEJB.jar -C ejb_build META-INF -C ejb_build com
    other than the name of the files? I mean what is the difference between jar -cvf and jar -cv0f????
    Question 3:
    In the following line:
    c:\java weblogic.ejbc -keepgenerated -g -deprecation build\tmp_day05_SignOn.jar build\day05_SignOn.jar
    what is the function of -keepgenerated -g -deprecation??? are they required?
    Question 4:
    what do the commands -g and -d mean?
    I am sorry for the simplicity of the questions, but I am trying to be thorough. I appreciate any and all help.
    Take care.
    Sincerely;
    Fayyaz

    As far as weblogic commands are concerned the options tht u have asked are
    -d : sets the destination directory for the generated XML files. This directory must exist before you run DDConverter
    -keepgenerated :saves the intermediate Java files generated during compilation.
    -C is a jar option that switches to a specified directory and includes the following file/files
    jar cf0v does not do any zip compression.it stores only
    hope that helps
    cheers
    sicilian

  • Tuxedo calling EJB question

    Folks,
    I have read some documentation about WTC and got in doubt.
    In order to have the EJB access from Tuxedo service, I have to make it as an EJB 2.0 putting the RemoteHome and Remote as some Weblogic Tuxedo classes.
    That is fine.
    My question: does the method name have to be "service" always?
    I saw that in the example and could not find any other example. Also, testing, it has not executed with any other name.
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/pdf/wtc_atmi.pdf&chrome=true
    Could you someone give me any light? :-)
    Thanks in advance.

    Hi Richardinho,
    Are you access Tuxedo Service through EJB? or trying to call an EJB from Tuxedo Service?
    If you are accessing Tuxedo Service using an EJB, it should work with any name (EJB name and method can have any name you want).
    Regards,
    Ahsan

  • Beginner Menu Layout Question

    Hello,
    I apologize since I know this question has to be answered somewhere but I'm not sure how to search it...
    What is the proper way to build a menu for a website?  I have built my homepage with the header, footer, and side menu that I like.  Now I want to build pages that the menu link while keeping the header, and menus.  What is the right approach?  My code is written in html and css.  I use to develop websites in pure html and used frames but I know they are not recommended.  Also, I don't want to have to copy my code into each link.
    If you could also recommend a good beginner tutorial on layout for css websites, I would be greatly appreciative.  I have read through w3schools tutorials and a few others.
    Thank you in advance!
    -Eric

    You have 2 choices:
    Templates    
    Server Side Includes
    Using the template function within Dreamweaver is a good way to go if it's a small site . .
    For larger sites then serverside includes would be more practical and easier for maintenance purposes.
    Templates:
    You create a master template page, you declare which areas will be the same for every page, (non-editable regions)  and then declare an area that will
    change on every page (the content area) , these are editable regions.
    Once you create the template and save it, you are then able to create 'child' pages from this template  - as many as you like  :-)  If you every need to make a change to the menu or the footer or the header, change it in the master template, save it and the changes will flow through to the child pages created from the template.
    Using DW Templates:
    http://www.adobe.com/devnet/dreamweaver/templates.html
    http://www.adobe.com/devnet/dreamweaver/articles/dw_templates.html
    The other option is to use Server Side Includes (SSI)
    A bit more about SSIs here:
    http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSc78c5058ca073340dcda9110b1f 693f21-7b6ca.html
    http://bignosebird.com/ssi.shtml
    Using PHP includes if your server supports php:
    http://www.w3schools.com/PHP/php_includes.asp 
    One major difference between using Templates and SSI and PHP Includes?
    When you make a change to a template page, you will need to re-upload all the pages to the server that were changed - may become very tedious if it is a very large site.
    With using SSI, you make a change to one file and only have to upload the one file and all pages on the server will be update accordingly.
    When to use Templates, Library Items & SSIs -
    http://www.adobe.com/devnet/dreamweaver/articles/ssi_lbi_template.html
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    http://csstemplates.com.au/
    http://twitter.com/nadiap

  • Beginner Unity Connection question

    I have a very simple beginner question I would've thought would be really easy to find the answer, but so far, I have not.
    To set up a call system call handler for your basic company main number, do I need a physical phone with the number attached to a line.
    I've tried it without the physical phone and can't get it to work, but with a line, no problem?
    thanks

    Thank You.
    Figured it would be fairly simple, just needed to know where to start.
    This might be the answer to another beginner question I have been thinking about also.
    Is it common for users to call their own number when they are calling in from outside to pick up vm and then press * to access?
    The Meridian system we are tossing has a common DID number, but the way our vm was setup, the number is internal. I'm not sure if calling your own number is common or if I need to make a new number, or another CTI rp sort of thing and forward to internal vm DN.
    Hope that makes sense.

  • Basic JNDI et EJB question

    Hello,
    I have a client accessing an EJB deployed in an EJB container.
    import javax.naming.*;
    Context ctx = getInitialContext();
    DemoHome dhome = (DemoHome) ctx.lookup("MaDemo.DemoHome");(getInitialContext returns a Context object and there is no directory server on the machine).
    My questions are as follows: Why don't I need a directory server? Am I not using JNDI here? Don't you need a directory server when you use JNDI?
    Thanks in advance,
    Balteo.

    in short no you don't always need a directory server. You use JNDI with JMS operations and there is no directory server associated with that. JNDI (Java Naming and Directory Services) has many uses.
    One such use is with JMS,and yet another is with LDAP. Seems like you are just doing a lookup with in the namespace.

  • Remote client accessing ejb - question

    This may be a very simplistic question, but here goes -
    scenario: I have a J2EE application running on a server Y with session beans/entity beans.
    I need a remote client on machine X to access EJB objects on Y.
    I have set the initial conext with INITIAL_CONTEXT_FACTORY, PROVIDER_URL etc...
    But, in order to narrow the reference of the object returned by lookup() method, I need to instantiate the Home object of my session (or entity) bean ...
    here's my problem: How do I instantiate EJBHomeInterface or EJBRemoteInterface, when they do not exist on the remote client machine?? (does this have something to do with the stub??)
    THANKS!

    This answer assumes you're using Weblogic, although most any other EJB container has a facility for this. Basically you need to distribute a client jar file with the client. This client jar is created during the EJB compile/deployment process and creates a jar separate from the normal jar file associated with your deployment. This jar file contains the class stubs you need to call for and use EJB's on a remote client.
    I hope this makes some sense.
    SeanB

  • Simple rmi-ejb question

    Hi all!
    I'm a new to ejb, just started, for the beginning got an exception:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at SimpleEjbTest.main(SimpleEjbTest.java:19)when trying to
      private static Context getInitialContext(String url, String user, String password) throws
          NamingException {
        Hashtable h = new Hashtable();
    //    h.put(Context.INITIAL_CONTEXT_FACTORY,
    //          "WHAT IS HERE?????");
        h.put(Context.PROVIDER_URL, url);
        h.put(Context.SECURITY_PRINCIPAL, user);
        h.put(Context.SECURITY_CREDENTIALS, password);
        return new InitialContext(h);
      }What to put into INITIAL_CONTEXT_FACTORY?
    Or you know easier way to make an InitialContext?
    Using jndi.properties? But what should it be then??
    Please help!
    Thanks a lot to alL!!
    Best regards, Boris.

    well, since you don't specify your app server, how's this?
    weblogic.jndi.WLInitialContextFactory
    if that doesn't work, try this
    com.inprise.j2ee.jndi.CtxFactory
    if that doesn't work, try this
    com.evermind.server.rmi.RMIInitialContextFactory
    if that doesn't work, try this
    org.jnp.interfaces.NamingContextFactory
    if that doesn't work, try this
    com.ibm.websphere.naming.WsnInitialContextFactory
    And if that doesn't work, look through your docs again, or maybe try google. Note that whatever you do, you have to have the appropriate jars on your classpath.
    Good Luck
    Lee

  • Beginner Flex2 / AS3 question

    I am a beginner by all respects and have decided to develop
    an FTP via browser application for my company website in my free
    time. Before I buy a few Flex 2 and Actionscript books for myself
    and dive in, I figured it might be smart to ask the community if
    its even possible or recommended.
    Can you (should you) use Flex2 / AS3 as the basis for a drag
    and drop .ftp through browser application? If so, feel free to
    advise me on any Flex packages or methods to use as a basis and I
    can place emphasis on that in my learning.

    One thing I'd like to point out, generally I'm all for
    recreating something on my own but for something on that magnitude
    I'd suggest checking out this link, someone has already pretty much
    created what you need to accomplish.
    http://www.onflex.org/ted/2007/05/flexftp-ftp-client-in-flex-using.php
    obviously if your not using PHP you can change the server side
    around to reflect your needs but the source there has already
    tackled some of the major issues of a(n) FTP client in Flex. One of
    the biggest ones is with sockets you don't know when it's full so
    you constantly need to clear it. However if you were to use the
    FileReference classes (based on HTTP protocol) your going to need
    to configure your server to allow large buffer sizes for files to
    be uploaded as well as setup long timeouts. The other drawback is
    using sockets theres no way to create a true progress of what's
    been done. Just my two cents. Hope this helps.

Maybe you are looking for

  • Ipod cannot sync file not found

    Itunes will not sync ipod. it says "ipod mickey cannot sync, required file not found." but it is showing my ipod in itunes. can anyone help?

  • Pages 5.1 - mail merge???

    Is it true?!? no mail merge in pages 5.1??? how do i solve it?!? I need to print labels (about 300) from a Numbers sheet ...

  • [svn] 1494: + Copy jgroups.jar to qa-regress/WEB-INF/lib folder

    Revision: 1494 Author: [email protected] Date: 2008-04-30 12:29:37 -0700 (Wed, 30 Apr 2008) Log Message: + Copy jgroups.jar to qa-regress/WEB-INF/lib folder + Add a clustered destination to remoting-config.mods.xml for codecoverage + Add url-load-bal

  • Error CX_SY_DYN_CALL_ILLEGAL_TYPE

    Hello All I am making progress on my first page thanks to some great help I have received from this community.  I now have another question. I am getting the Illegal type error at run time.  I have determined that it is the IMPORTING portion of my BA

  • Using XL reporter view in query generator

    is it possible to use XL report views in query generator ?