Xdoclet session facade + value object

Hi Community,
I have created an value object and a session facade with:
@ejb.facade view type="local"
@ejb.value-object match="*" name="CategoryEJB"
The new facade class is missing getData() inCategoryEJBLocal.
I have extendet the CMP for the ValueObject
* @ejb.interface-method view-type = "both"
* @return
public abstract CategoryEJBValue getCategoryValue();
* @ejb.interface-method view-type = "both"
* @param categoryValue
public abstract void setCategoryValue(CategoryEJBValue categoryValue);
What I have to do to solve the error?
Many thanks in advance
Oliver

Problem solved.

Similar Messages

  • How to combine Session Facade and Transfer object?

    Hello All!
    I'm working on an enterprise application. Presentation layer is a stand alone client, business logic is build on the Glassfish v2.1 and MySQL is used as a database. The client is connection to the GlassFishj server remotely using EJBs.
    I have problems with business logic architecture.
    Here is the brief description of backend application architecture design:
    1. Session Facade pattern is used to simplify the client and application server interface and to provide application layers between backend (http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html).
    2.Transfer Object pattern to define update transfer objects strategy in order to decrease network overhead during client and application server interactions and to provide version control for objects. Transfer objects are designed as simple java business serializable objects. (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html)
    3. Originally the backend application consisted of three modules: users, storage and orders, but at the end I have decided to divide my application into the following parts - assortments, map, menu, orders, transactions, users.
    4. All MySQL database transactions are via JDBC using procedures. No use of entity beans.
    Questions:
    1. I have some doubts about using Session Facade and Transfer object patterns at the same time. At first I'd mike to cite the definitions of the patters from the SUN official web site.
    * Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
    * Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.
    * So, if I use Transfer Object along with Session Facade, it makes some difficulties with object version control, because I 2 or
    3 transfer objects controls with the 1 bean class. The best option for Transfer object Pattern is that each transfer object should have its own bean class to provide ability of object's version control. In the case it can bring the network overhead because of frequent remote calls caused by the large number of the bean classes.
    * So, should I use the both patterns? If yes, how to manage the interaction the patterns. If no, which one to use.
    2. E.g. I have a huge list of the Order objects and each Order object consists of other complicated objects. So, would I have trouble to transfer that list over network? If yes, how to manage it.
    Thank you!
    Astghik

    Astghik wrote:
    Hello All!
    I'm working on an enterprise application. Presentation layer is a stand alone client, business logic is build on the Glassfish v2.1 and MySQL is used as a database. The client is connection to the GlassFishj server remotely using EJBs.
    I have problems with business logic architecture.
    Here is the brief description of backend application architecture design:
    1. Session Facade pattern is used to simplify the client and application server interface and to provide application layers between backend (http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html).
    I would simply recommend establishing a service tier. Your services should be stateless. You can go the extra mile and have a session facade, but in the majority of cases, coding to an interface for your service accomplishes the same goals.
    2.Transfer Object pattern to define update transfer objects strategy in order to decrease network overhead during client and application server interactions and to provide version control for objects. Transfer objects are designed as simple java business serializable objects. (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html)
    The idea of the transfer object is very similar to the Command pattern. I think if you investigate that pattern, it will be more obvious. The transfer object reduces network latency by consolidating all the parameters into an object, ideally, this also consolidates multiple method calls. If you combine a transfer object (or command object) with a service tier, you get the best of both worlds. The service can delegate calls to helper objects (or other services or components) using the data in the transfer / command object.
    3. Originally the backend application consisted of three modules: users, storage and orders, but at the end I have decided to divide my application into the following parts - assortments, map, menu, orders, transactions, users.
    The is your domain. It will vary from application to application. The principles above are more general (e.g., patterns and architectural tiers) and should apply to most domains. However, your actual use case may require something different.
    4. All MySQL database transactions are via JDBC using procedures. No use of entity beans.
    Consider using something like iBatis or Spring's JDBC templating to make your life easier with JDBC.
    Questions:
    1. I have some doubts about using Session Facade and Transfer object patterns at the same time. At first I'd mike to cite the definitions of the patters from the SUN official web site.
    * Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
    * Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.
    * So, if I use Transfer Object along with Session Facade, it makes some difficulties with object version control, because I 2 or
    3 transfer objects controls with the 1 bean class. The best option for Transfer object Pattern is that each transfer object should have its own bean class to provide ability of object's version control. In the case it can bring the network overhead because of frequent remote calls caused by the large number of the bean classes.
    * So, should I use the both patterns? If yes, how to manage the interaction the patterns. If no, which one to use.
    Versioning is a separate issue. Generally, the more coarsely grained your transfer / command object is, the more changes are likely to impact dependent objects.
    Your command or transfer object does not have to be a vanilla JavaBean, where you are basically creating a bean that has data from other objects. You can simply use your command / transfer object to encapsulate already existing domain objects. I see no need to map to a JavaBean with what you have described.
    Generally, a method signature should be understandable. This means that many times it is better to pass the method, say, two coarsely grained objects than a signature with a dozen primitives. There are no hard and fast rules here. If you find a method signature getting large, consider a transfer / command object. If you want one service to delegate calls to a number of other services, you can also create a transfer / command object to furnish the controlling service with the data it needs to invoke the dependent services.
    2. E.g. I have a huge list of the Order objects and each Order object consists of other complicated objects. So, would I have trouble to transfer that list over network? If yes, how to manage it.
    This is a large, open-ended question. If you are going to display it to a user on a screen, I do not see how you avoid a network transfer with the data. The general answer is to not pass the data itself but rather a token (such as a primary key, or a primary key and a start and stop range such as you see on a Google search result). You do want to limit the data over the network, but this comes at a cost. Usually, the database will receive additional load. Once that becomes unacceptable, you might start putting things into session. Then you worry about memory concerns, etc. There is no silver bullet to the problem. It depends on what issues you are trying to address and what trade-offs are acceptable in your environment.
    Thank you!
    AstghikBest of luck.
    - Saish

  • Transfer object,  FindByPrimaryKey, session facade

    I would like to request help on coding a 'facade session' bean that invokes the FindByPrimaryKey method on a BMP entity bean, and how to put the returned values into a transfer object. I've been trying to modify the code provided in Sun's 'Duke's Bank Application' to accomplish this. Below is the code copied and pasted from Sun's session facade. 'accountIds' is a Collection that contains the values (customerId, balance, etc) of bank accounts which were retrieved with a FindBy method. AccountDetails produces a transfer object.
    try {
    Iterator i = accountIds.iterator();
    while (i.hasNext()) {
    Account account = (Account)i.next();
    AccountDetails accountDetails = account.getDetails();
    accountList.add(accountDetails);
    I was wondering how to accomplish the task of transfering values into a transfer object when invoking FindByPrimaryKey.
    I've taken a few stabs at it. My FindByPrimaryKey method doesn't throw any exceptions (as far as I can tell):
    try {
    Account account = accountHome.findByPrimaryKey(id);
    } catch (Exception ex) {
    throw new AccountNotFoundException("darn it - " + ex.getMessage());
    The error (which appears in the catalina log) occurs in the following section of code, which immediately follows the above:
    ArrayList myAccountDetails = new ArrayList();
    try {
    AccountDetails accountDetails = account.getDetails();
    myAccountDetails.add(accountDetails);
    } catch (RemoteException ex) {
    throw new EJBException("getDetails isn't working in AccountControllerBean: " + ex.getMessage());
    And here is the business method from Account:
    public AccountDetails getDetails() {
    return new AccountDetails(id, surname, firstname, balance);
    If any of the experts out there have spotted a mistake, I sure would be grateful for your help.
    James

    Thank you for your help. I think the ejbCreate method in the 'session facade' takes into account your advice:
    public void ejbCreate() {
    try {
    accountHome = EJBGetter.getAccountHome();
    } catch (Exception ex) {
    throw new EJBException("ejbCreate: " +
    ex.getMessage());
    account = null;
    accountId = null;
    I included your piece of code just the same to see if it would help anyway. Unfortunately the same error appeared in the catalina file.
    Also, there were error messages I hadn't noticed until now in the Verifier.
    One read:
    "No findByPrimaryKey method was found in home interface class [database.AccountHome]"
    The other:
    "No single argument findByPrimaryKey was found in home interface class [database.AccountHome]"
    Here is the method in the implementation class of the entity bean:
    public String ejbFindByPrimaryKey(String primaryKey)
    throws FinderException {
    boolean result;
    try {
    result = selectById(primaryKey);
    } catch (Exception ex) {
    throw new EJBException("ejbFindByPrimaryKey: " +
    ex.getMessage());
    if (result) {
    return primaryKey;
    else {
    throw new ObjectNotFoundException
    ("Row for id " + id + " not found.");
    Below is the 'selectById' method that it invokes:
    private boolean selectById(String primaryKey)
    throws SQLException {
    makeConnection();
    String selectStatement =
    "select id " +
    "from accountTable where id = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setString(1, primaryKey);
    ResultSet rs = prepStmt.executeQuery();
    boolean result = rs.next();
    prepStmt.close();
    releaseConnection();
    return result;
    Here is what I have in the home interface of the entity bean for this find method:
    public Account findByPrimaryKey(String id)
    throws FinderException, RemoteException;
    In addition here is the entire method in the 'session facade':
    public ArrayList getAccount(String id)
    throws AccountNotFoundException, InvalidParameterException {
    if (id == null)
    throw new InvalidParameterException("null id");
    try {
    account = accountHome.findByPrimaryKey(id);
    } catch (Exception ex) {
    throw new AccountNotFoundException("dag it" + ex.getMessage());
    ArrayList accountList = new ArrayList();
    try {
    AccountDetails accountDetails = account.getDetails();
    accountList.add(accountDetails);
    } catch (RemoteException ex) {
    throw new EJBException("getDetails isn't working in Account ControllerBean: " + ex.getMessage());
    return accountList;
    Thanks again for helping me out.
    James

  • Session facade vs Command object pattern

    Hello,
    I am debating using the Command pattern as my primary strategy for implementing my J2EE enterprise app business logic and would like some advice.
    The general idea is to have only a few types of abstract commands (such as a ReadComand, an UpdateCommand -- I might have a slightly finer granularity than this, I don't know) and implement each use case as a command instance. For example, I might have a command called GetOrderItemsCommand which is a ReadCommand and returns the list of order items (i.e., has a getItems() method) when execute()'d.
    The result of my design will be a very small set of stateless session beans with an execute() interface. No entity beans (will use Hibernate) and may very well eventually implement a Message bean interface with a similar executeAsynchronously() type method, if eventually necessary.
    I guess the popular alternative (or, more correctly, the norm) is to implement session facades for this.
    However, I am attracted to the Command pattern because of its simplicity, it's rapid application development angle, its disconnected-ness from EJB (e.g., a modification to a command does not mean touching any EJB at all, just the command class), and the ability for implementing cross-cutting features (such as transactions or security, although I also plan to use an AOP solution at the POJO level). At the same time, it works as a delegate of an EJB, so it's accessible for all kinds of network clients.
    I am also familiar with it's drawbacks (e.g., maintainability for large numbers of commands, per the literature, such as the Marinescu 2002 EJB Patterns book).
    So, very few types of stateless session beans (though there may be many instances) -- mainly there for remote client acceessibility and the ability to leverage application-level transactions if needed.
    Nevertheless, I have never tried the command pattern approach and was curious if others had feedback or case studies.
    Best regards --

    You normally use Command to decouple your controller from the view and model tiers. Your take on making command objects 'polymorphic' is interesting, and an angle I had not thought of. In general, I implement command objects rather like the Action class in Struts.
    Each command has implements an execute() method declared in the ICommad interface. The constructor of the command object ensures that a given command has all the variables and data required to execute properly. I also create a likes() method that returns a boolean. That way, I can add all my commands to a handler and iterate until on returns true on likes().
    - Saish

  • Session Facade design and TopLink objects

    Hi, we are just about to start using Toplink as our ORM tool. Ideally we want to wrap all business logic behind stateless session bean facades. So instead of BMP entity beans we are thinking of encapsulating the relevant Toplink objects in each facade and querying, updating that object when the session facade bean is instantiated.
    We are using Weblogic 70. Example code:
    e.g. MySessionBean implements sessionbean...
         MyTopLinkObject myObject = null;
         public void populateObject(String myID) throws java.rmi.RemoteException {
              try {
                   MyTopLinkObject myObject = new MyTopLinkObject(myID);
              catch (Exception e) {
         public void setMyTopLinkObjectsName(String name) {
         //persist this change via the toplink object...
         myObject.setName(name);
    Then in MyTopLinkObject:
    public class MyTopLinkObject {
         private String myID;
         private String myName;
    public MyTopLinkObject(String myID) {
              build(myID);
    public void build(String myID) {
              //read TOPLINK cache and populate this MyTopLinkObject name etc
    public void setName(String myName) {
         //persist this change...
         this.myName = myName;
    // more gets sets
    I will then want to update MyTopLinkObject data in for example in calling. MySessionBean.setMyTopLinkObjectsName("my name") from the remote interface on the client.
    So what I want to know is how do I can I do this efficiently. I'm too too versant with TopLink caches etc. For example to read the cache do I have to pass thru a TopLink client/server Session to each Session Facade bean so the cache is available for that read, update etc?
    Any other tips is using this design would be appreciated!
    Thanks in advance,
    J

    Don, thanks for ur advice yet again.
    I think now I am getting a better grasp of how TopLink should be used. However there is very little doco out there in terms of using TOPLInk in as EJB session facade scenario.
    After your advice my thoughts are to provide something like the TOPLInkFactory object as you say which will encapsulate the ServerSession TOPLink API and provide more fine grain access to the TOPLInk API. e.g. instead of having to create a ClientSession in each client call b4 getting a UnitOfWOrk, this factory class would provide a method to do this directly:
    public final class TOPLinkFactory {
         private static ServerSession serverSession = null;
         private static final String TOPLINK_CONFIG_FILE = "C:\\test.xml";
         private static final String TOPLINK_SESSION = "toplink";
         public TOPLinkFactory() throws Exception {
              super();
         private static ServerSession createServerSession(ClassLoader cl) throws Exception {
              try {
              Project builderProject = XMLProjectReader.read(TOPLINK_CONFIG_FILE, cl);
         serverSession = (ServerSession)builderProject.createServerSession();
              serverSession.login();
                   return serverSession;
              catch (Exception e) {
              return null;
         public static UnitOfWork getUnitOfWork(ClassLoader cl) {
              try {
                   return createClientSession(cl).acquireUnitOfWork();
         public static ClientSession createClientSession(ClassLoader cl) throws Exception {
              try {
                   if (serverSession == null) {
    serverSession = createServerSession(cl);
    ServerSession s = (ServerSession)SessionManager.getManager().getSession(TOPLINK_SESSION, cl);
                   return serverSession.acquireClientSession();
              catch (Exception e) {
              return null;
    Then in my Session EJBs I could write a method like this where Thing is a TOPLInk object mapped to the thing table:
         public boolean setThingStatus(String thingID) {
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("THING_ID").equal( Integer.parseInt(thingID));
    ClientSession s = TOPLinkFactory.createClientSession(this.getClass().getClassLoader());
    Thing thing = (Thing) s.readObject(Thing.class, expression);
    UnitOfWork uow = TOPLinkFactory.getUnitOfWork(this.getClass().getClassLoader());
    Thing thingClone = (Thing)uow.registerObject(thing);
    thingClone.setStatus("WITH JASON");
    TOPLinkFactory.commitAndReleaseUnitOfWork(uow);
    return true;
    Now if the above looks OK and there are no Thread/Session issues that you could make me aware of (or perhaps you would encourage using a full Singleton pattern instead).
    I have another question in relation to ClassLoaders. In this architecture I have been passing around the ClassLoader (as above) to the TOPLInkFactory methods to create the unit of works etc... Is this necessary? Or could I avoid it?
    Also I think some people in my team are thinking its a good idea for all TOPLink business objects to extend an abstract base class that contains this behaviour and provides these TOPLinkFactory methods. I no expert on TOPLInk but I would have thought this code should not be coupled with the TOPLink business objects for reasons such as:
    1) Why should a TOPLink Person object (attributes name, age etc) e.g. extend a class with TOPLink API methods and attributes - I just don't see the logic there as I thought TOPLink was to be non-intrusive. For example a Person object should not encapsulate a ServerSession object and nor does it need to. To this end they are then coupled and if for example we wanted to move these Person objects to work with another persistence framework then they would have to be rewritten to remove all TOPLInk attribute/method references
    2) I would have thought accessing the TOPLInk API is only necessary when the client code needs to invoke calls to the database for reads and updates. i.e. that's where you start getting your sessions, unit of works etc. Like in the setThingStatus Session EJB method (i.e. the client code) above and NOT in your business methods of for example the TOPLink Person object?
    Please tell me if I am mistaken!
    If you could clear some of this up it would be great.
    Regards,
    Jason

  • Value-list handler, value-list iterator and session-facade strategy

    Hello all,
    Further to an earlier post, I rewrote my post trying to me more accurate in my question.
    Here is my problem:
    I am trying to implement the value-list handler design pattern using the session facade strategy. In the pattern as it is described here
    (http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html) the client accesses the value-list handler AND the iterator directly.
    As I chose the session-facade strategy having my value-list handler as a stateful session ejb, I don't know how the client is going to access the iterator. I see only one option: Having the client access the iterator through the ejb value-list handler. This requires adding new methods to the ejb.
    Is this the correct way of doing it? Is there another way of doing this?
    Thanks in advance,
    Julien Martin.

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • Session Facade Pattern without EJB

    All of the session facade pattern examples that I can find are heavily emphasized on EJB. I am planning on implementing a system without EJB's, and am interested in the advantages of using the Session Facade pattern.
    Are there any good examples of using the Facade pattern outside of EJB to build a java server system? If there aren't, is there a better way to implement this type of strategy in a non-EJB system?

    What is the best way to allow the client to
    interact
    with Entity objects, without exposing them. ShouldI
    implement Value objects that are easily serialized
    for transfer across the network?
    If you are not using EJB or a distributed
    architecture, you do not need DTO's or VO's. They
    are an odious construct used to obviate the
    shortcomings of remote method calls over anetwork.
    I strongly disagree.
    They are an obvious and easy model used when the
    following characteristics of a system exist.
    - Different layers.
    - Related data items that are moved throughout the
    layers.
    - Different usage of the related data items by
    different layers.
    Yes, I agree. Note the qualification 'if you are not using a distributed architecture'.
    None of that has anything to do with remote method
    calls over a network. Point of fact the first time I
    used them was in a stand alone application with no
    network traffic except that needed by the database
    driver itself.
    Simply create your domain model objects as POJO's
    s (plain ole Java objects). Persist and retrieve
    your objects via DAO's (data access objects).Your
    service layer (facade) will sit on top of thedomain
    model, encapsulating method calls into logicalunits
    of work.
    And how exactly do you move the customer
    name/customer address from the DAO to the GUI level?I am assuming the dedicated remoting product the OP specifid, Hessian, will handle moving between the tiers, or at least between the controller/view and the business tier.
    - Saish

  • === SESSION FACADE v/s BUSINESS DELEGATE ===

    Hi
    Can anyone help me with my design here - I am not sure whether to use a Session Facade or a Business Delegate in the following scenario:
    [Our application is pure J2EE and does not use EJBs]
    PRESENTATION-TIER
    I have a Command and Control strategy employed in my presentation tier where requests are intercepted by a controller and processed by helpers delegating to appropriate commands and dispatch appropriate responses.
    PRESENTATION-TIER - COMMANDS
    The Commands will invoke appropriate Business Methods in the business tier to retrieve data (mostly).
    BUSINESS-TIER
    Now - most of my business methods use the DAO pattern to retrieve data and are effectively dealing with Data Beans (Value Object beans) - passing them back to commands.
    I can clearly see the use of a generic Interface at the Business tier - i.e., rather than expose the Buiness Methods direcly leading to increased coupling between presentation and business tiers.
    BUT THE CONFUSING PART IS - DO I USE A SESSION FACADE OR A BUSINESS DELEGATE TO INTERFACE WITH MY COMMANDS??? What is the difference? I have looked at Sun's J2EE blueprint and cant make out the clear cut difference between the two.
    Can anyone help?
    thanks
    Aswin

    I agree with you, Business delegate and Session facade are quite alike.
    I believe that you could use the Business delegate pattern as a facade. Possibly, you could argue that the Business delegate is an extension of the Session facade pattern. However, I think that SUN thinks that a Business delegate should be a singleton while a Session facade is a session EJB. My firm belief is that you could create a business delegate that is a session EJB instead.
    But, you could also use both pattern as some one else suggested.
    In your case when you do not use EJBs, I would suggest that you use a facade which could be design like a business delegate. However, as there aren't any EJBs, you will not need a service locator. In this way, you will have a design that can be extended (without any impact on the the presentation tier) to use EJBs in the future.
    Remember, SUN's core J2EE patterns assume that you use EJBs. If you don't, they have to be adapter a little bit.

  • Inserting a tree of value objects

    Let's say I have these entities in my database:
    Person
    personId (PK)
    firstName
    lastName
    PhoneNumber
    phoneNumberId (PK)
    number
    description
    personId (FK referencing Person entity)
    I have a PersonValueObject class with the following attributes:
    Integer personId
    String firstName
    String lastName
    Collection phoneNumbers (a collection of PhoneNumberValueObject's - can be populated or set to null, depending on use case)
    I have a PhoneNumberValueObject class with the following attributes:
    Integer phoneNumberId
    String number
    Strong description
    Integer personId
    PersonValueObject person (can be populated or set to null, depending on the use case)
    I have session facade with the following methods
    createPerson(PersonValueObject personVO)
    createPhoneNumber(PhoneNumberValueObject phoneNumberVO)
    My question is, how should I insert a tree containing a Person and his related PhoneNumbers? I see three options:
    1) The session facade's client calls createPerson(), which inserts the personVO and then the session facade traverses the personVO.phoneNumbers collection and calls createPhoneNumber() internally for every element in the collection. This means that the createPerson() method must have extra code to traverse the collection.
    2) The session facade's client calls createPerson(), which inserts the personVO. Next, the session facade's client traverses the personVO.phoneNumbers collection and calls createPhoneNumber() for every element in the collection. This means that the client must have extra code to traverse the collection.
    3) Add a third method called createPersonTree(PersonValueObject personVO), which internally calls createPerson() and then internally calls createPhoneNumber(). In this case, the createPersonTree() method must have the extra code to traverse the collection. The way I see it, the advantage of this approach is that the session facade's client has a choice of calling createPersonTree(), if it needs to insert a whole tree, whereas it can just call createPhoneNumber() directly if it just needs to add a new phone number to an existing person.
    Comments?

    1) Are you using session Bean for inserting the data?
    2) Are you using the Entity Beans, I mean BMP?
    3) Have you looked in the features provided by the
    CMP2.0.Let me explain all the patterns I am using. The client is a regular java class that implements the "business delegate" pattern. The business delegate communicates with a session bean that is implementing the "session facade" pattern. It is this session facade that has those methods I referred to above, namely createPerson(), createPhoneNumber() and potentially createPersonTree(). The session facade communicates with a Person entity bean and a PhoneNumber entity bean, which implement the persistence layer. Both of these entity beans use EJB 2.0 CMR and CMP. The actual inserts are performed by these entity beans. For example, inside the session facade's createPerson() method, the session facade delegates the actual insert to the Person entity bean.
    Data is passed between objects by using the "value object" pattern. For example, the business delegate passes person data to the session facade inside a Person value object. The session facade also passes this value object to the entity bean (alternatively, the session facade could pass the person's attributes individually, but I thought this was not as convenient).
    I hope that explains the situation.

  • Passing "Value Objects" from one JSP to next  (2)

              Someone posted a response from BEA which has since disappeared, it was no different
              from what I was doing and it I still can't get it to store the information in
              the Value Object.
              I get values (true/false) from a Radio button on a FORM in a JSP, press a "Next
              Step" Button.
              I have a "Value Object" in JSP_1, which I use the setters to store various information
              obtained from the <FORM>. I then "jsp:forward" to JSP_2, set different information
              and then I "jsp:forward" to JSP_3 & so on. At the end of the JSP chain only the
              last setter is has the value "true", all the other values are false, despite all
              being "set" to "true".
              The "Value Object" is not storing the information set in previous JSPs. When I
              initially create the "value object" I use;
              <jsp:useBean id="myVO" class="uk.co.notify.valueobjects.MyVO" scope="request"
              />
              <jsp:setProperty name="myVO" property="*"/>
              In JSP_2 JSP999 I don't use <jsp:setProperty> I let the setter in the VO do
              it.
              I am using WebLogic 6.1 sp2 under Windows 2K Pro.
              Any pointers. Thanks.
              [att1.html]
              

    Ok. here's the difference.
              Hitting submit is altogether a different "new" http request. It will send a
              new request from your browser to the server. Whereas, the jsp:forward is
              within the server itself.
              So the VO object whose scope is set to "request" will not retain its values
              between 2 http request.
              For such kind of parameter passing, you could very well store the info. in
              user's session object.
              I hope this helps.
              Best Regards,
              Narayan Anand
              Developer Relations Engineer
              BEA Systems, Inc.
              "Roger Lee" <[email protected]> wrote in message
              news:[email protected]...
              >
              > If I put the jsp:forward statement in all my JSPs before I test for my
              request;
              >
              > <%
              > if ( request.getParameter("SubmitStep2") != null ) {
              > String sParameter2 = request.getParameter("SubmitStep2");
              > if (sParameter2.equals("Next Step")) {
              > // CODE ETC
              > }
              > }
              >
              > The jsp will chain right to the last JSP and all the values set in my
              ValueObject
              > will remain set.
              >
              > Why does hitting a submitt button;
              >
              > <input type="submit" name="SubmitStep2" value="Next Step">
              >
              > cause the VO to lose previous stored values.
              >
              > Any information would be appreciated.
              >
              > Roger Lee
              >
              >
              > "Roger Lee" <[email protected]> wrote:
              > >
              > >Narayan,
              > >
              > >I got your example working fine.
              > >
              > >I added a few more debug statements and it appears that as I enter JSP
              > >2 the value
              > >"set" in JSP 1 is stored okay (boolean true).
              > >
              > >However after the "submit" of the button in JSP which forwards us to
              > >JSP 3 is
              > >pressed all the values are reset to their default value (false).
              > >
              > >
              > >"Narayan Anand" <[email protected]> wrote:
              > >>Hi Roger,
              > >>
              > >>I will look into your code.
              > >>In the meantime, pls try my test case in your system and see if you
              > >can
              > >>run
              > >>that without any problem.
              > >>
              > >>Best Regards,
              > >>Narayan Anand
              > >>Developer Relations Engineer
              > >>BEA Systems, Inc.
              > >>
              > >>"Roger Lee" <[email protected]> wrote in message
              > >>news:[email protected]...
              > >>>
              > >>> Narayan,
              > >>>
              > >>> Thanks for your reply. My code seems to be the same as yours! I still
              > >>can't get
              > >>> the JSPs to "set" the VO and pass it down the chain of JSPs. When
              > >I
              > >>get
              > >>the last
              > >>> JSP the first three have the boolean value set to false, whilst the
              > >>last
              > >>one is
              > >>> set to the value chosen (true).
              > >>>
              > >>> I have attached the JSPs and VO in the attached ZIP file. It must
              > >be
              > >>something
              > >>> obvious, which I can't see!
              > >>>
              > >>> Regards,
              > >>>
              > >>> Roger Lee
              > >>>
              > >>>
              > >>> "Narayan Anand" <[email protected]> wrote:
              > >>> >
              > >>> >
              > >>> >
              > >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0
              > >>> >
              > >>> >Hi Roger,
              > >>> >
              > >>> >I can still view my previous reply to your post.
              > >>>
              >
              >>>http://216.148.48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3Dweblogic.dev
              =
              > >>> >eloper.interest.jsp&item=3D10138&utag=3D
              > >>> >
              > >>> >Just now I tested this again.
              > >>> >WLS6.1SP2 on Win2k.
              > >>> >
              > >>> >JSP1 - sets one value using setProperty tag.
              > >>> >JSP2 - sets second property using the VO's setter.
              > >>> >JSP3 - retrieve and prints the values using the VO's getters and
              > >also
              > >>> >=
              > >>> >using the getProperty tag.
              > >>> >
              > >>> >attached are all the jsp's and value object.
              > >>> >Please test it in your environment. It should work.
              > >>> >Then compare it with your code to see the difference.
              > >>> >
              > >>> >I hope this will help to resolve the issue.
              > >>> >
              > >>> >Regards,
              > >>> >Narayan Anand
              > >>> >Developer Relations Engineer
              > >>> >BEA WebLogic Support
              > >>> >
              > >>> >
              > >>> >
              > >>> >
              > >>> >
              > >>> > "Roger Lee" <[email protected]> wrote in message =
              > >>> >news:[email protected]...
              > >>> >
              > >>> > Someone posted a response from BEA which has since disappeared,
              > >>it
              > >>> >was =
              > >>> >no different
              > >>> > from what I was doing and it I still can't get it to store the
              > >=
              > >>> >information in
              > >>> > the Value Object.
              > >>> >
              > >>> > I get values (true/false) from a Radio button on a FORM in a JSP,
              > >>=
              > >>> >press a "Next
              > >>> > Step" Button.
              > >>> >
              > >>> > I have a "Value Object" in JSP_1, which I use the setters to store
              > >>> >=
              > >>> >various information
              > >>> > obtained from the <FORM>. I then "jsp:forward" to JSP_2, set
              different
              > >>> >=
              > >>> >information
              > >>> > and then I "jsp:forward" to JSP_3 & so on. At the end of the JSP
              > >>chain
              > >>> >=
              > >>> >only the
              > >>> > last setter is has the value "true", all the other values are
              false,
              > >>> >=
              > >>> >despite all
              > >>> > being "set" to "true".
              > >>> >
              > >>> > The "Value Object" is not storing the information set in previous
              > >>=
              > >>> >JSPs. When I
              > >>> > initially create the "value object" I use;=20
              > >>> >
              > >>> > <jsp:useBean id=3D"myVO" class=3D"uk.co.notify.valueobjects.MyVO"
              > >>=
              > >>> >scope=3D"request"
              > >>> > />=20
              > >>> > <jsp:setProperty name=3D"myVO" property=3D"*"/>=20
              > >>> >
              > >>> > In JSP_2 JSP999 I don't use <jsp:setProperty> I let the setter
              > >>in
              > >>> >=
              > >>> >the VO do
              > >>> > it.
              > >>> >
              > >>> > I am using WebLogic 6.1 sp2 under Windows 2K Pro.=20
              > >>> >
              > >>> > Any pointers. Thanks.=20
              > >>> >
              > >>> >
              > >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0
              > >>> >
              > >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > >>> ><HTML><HEAD>
              > >>> ><META http-equiv=3DContent-Type content=3D"text/html; =
              > >>> >charset=3Diso-8859-1">
              > >>> ><META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
              > >>> ><STYLE></STYLE>
              > >>> ></HEAD>
              > >>> ><BODY bgColor=3D#ffffff>
              > >>> ><DIV><FONT face=3DArial size=3D2>Hi Roger,</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>I can still view my previous reply
              > >>to
              > >>> >=
              > >>> >your=20
              > >>> >post.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2><A=20
              > >>>
              >href=3D"http://216.148.48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3D=
              > >>> >weblogic.developer.interest.jsp&item=3D10138&utag">http://216.148=
              > >>>
              >..48.100/cgi-bin/dnewsweb?cmd=3Darticle&group=3Dweblogic.developer.int=
              > >>> >erest.jsp&item=3D10138&utag</A>=3D</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>Just now I tested this =
              > >>> >again.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>WLS6.1SP2 on Win2k.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>JSP1 - sets one value using
              setProperty
              > >>> >=
              > >>> >
              > >>> >tag.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>JSP2 - sets second property using
              > >>the
              > >>> >=
              > >>> >VO's=20
              > >>> >setter.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>JSP3 - retrieve and prints the
              values
              > >>> >=
              > >>> >using the=20
              > >>> >VO's getters and also using the getProperty tag.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>attached are all the jsp's and
              value=20
              > >>> >object.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>Please test it in your environment.
              > >>> >It =
              > >>> >should=20
              > >>> >work.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>Then compare it with your code to
              > >>see
              > >>> >=
              > >>> >the=20
              > >>> >difference.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>I hope this will help to resolve
              > >>the=20
              > >>> >issue.</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2>Regards,<BR>Narayan
              Anand<BR>Developer
              > >>> >=
              > >>> >Relations=20
              > >>> >Engineer<BR>BEA WebLogic Support</FONT></DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><DIV><FONT face=3DArial size=3D2></FONT> </DIV>
              > >>> ><BLOCKQUOTE=20
              > >>> >style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;
              > >>=
              > >>> >BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
              > >>> > <DIV>"Roger Lee" <<A=20
              > >>> > href=3D"mailto:[email protected]">[email protected]</A>> wrote
              > >in
              > >>> >=
              > >>> >message <A=20
              > >>> > =
              > >>>
              >
              >>>href=3D"news:[email protected]">news:[email protected]
              =
              > >>> >a.com</A>...</DIV><BR>Someone=20
              > >>> > posted a response from BEA which has since disappeared, it was
              > >no=20
              > >>> > different<BR>from what I was doing and it I still can't get it
              > >to
              > >>=
              > >>> >store the=20
              > >>> > information in<BR>the Value Object.<BR><BR>I get values
              (true/false)
              > >>> >=
              > >>> >from a=20
              > >>> > Radio button on a FORM in a JSP, press a "Next<BR>Step" =
              > >>> >Button.<BR><BR>I have=20
              > >>> > a "Value Object" in JSP_1, which I use the setters to store
              various=20
              > >>> > information<BR>obtained from the <FORM>. I then "jsp:forward"
              > >>> >to =
              > >>> >JSP_2,=20
              > >>> > set different information<BR>and then I "jsp:forward" to JSP_3
              > >&
              > >>> >=
              > >>> >so on. At=20
              > >>> > the end of the JSP chain only the<BR>last setter is has the value
              > >>=
              > >>> >"true", all=20
              > >>> > the other values are false, despite all<BR>being "set" to =
              > >>> >"true".<BR><BR>The=20
              > >>> > "Value Object" is not storing the information set in previous JSPs.
              > >>> >=
              > >>> >When=20
              > >>> > I<BR>initially create the "value object" I use; =
              > >>> ><BR><BR><jsp:useBean=20
              > >>> > id=3D"myVO" class=3D"uk.co.notify.valueobjects.MyVO" =
              > >>> >scope=3D"request"<BR>/>=20
              > >>> > <BR><jsp:setProperty name=3D"myVO" property=3D"*"/> <BR><BR>In
              > >>> >=
              > >>> >JSP_2=20
              > >>> > JSP999 I don't use <jsp:setProperty> I let the setter in the
              > >>> >=
              > >>> >VO=20
              > >>> > do<BR>it.<BR><BR>I am using WebLogic 6.1 sp2 under Windows 2K Pro.
              > >>> >=
              > >>> ><BR><BR>Any=20
              > >>> > pointers. Thanks. <BR></BLOCKQUOTE></BODY></HTML>
              > >>> >
              > >>> >------=_NextPart_001_02EB_01C257F2.2EC54EA0--
              > >>> >
              > >>> >
              > >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > >>> ><HTML>
              > >>> ><HEAD>
              > >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
              > >>> ><LINK REL=STYLESHEET
              > >>> > HREF="My-Style-Sheet.css"
              > >>> > TYPE="text/css">
              > >>> ></HEAD>
              > >>> >
              > >>> ><BODY>
              > >>> >
              > >>> ><CENTER>
              > >>> ><TABLE BORDER=5>
              > >>> > <TR><TH CLASS="TITLE">
              > >>> > Reusing JavaBeans in JSP</TABLE>
              > >>> ></CENTER>
              > >>> ><P>
              > >>> >
              > >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
              > >>> ><jsp:setProperty name="test"
              > >>> > property="message"
              > >>> > value="Hello forward WWW" />
              > >>> >
              > >>> ><jsp:forward page="/myjsp2.jsp" />
              > >>> >
              > >>> ></BODY>
              > >>> ></HTML>
              > >>> >
              > >>> >
              > >>> >
              > >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > >>> ><HTML>
              > >>> ><HEAD>
              > >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
              > >>> ><LINK REL=STYLESHEET
              > >>> > HREF="My-Style-Sheet.css"
              > >>> > TYPE="text/css">
              > >>> ></HEAD>
              > >>> >
              > >>> ><BODY>
              > >>> >
              > >>> ><CENTER>
              > >>> ><TABLE BORDER=5>
              > >>> > <TR><TH CLASS="TITLE">
              > >>> > Reusing JavaBeans in 2 JSP</TABLE>
              > >>> ></CENTER>
              > >>> ><P>
              > >>> >
              > >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
              > >>> >
              > >>> > <% test.setMessage1("Second message1 using setters"); %>
              > >>> >
              > >>> >
              > >>> ><jsp:forward page="/myjsp3.jsp" />
              > >>> >
              > >>> >
              > >>> ></BODY>
              > >>> ></HTML>
              > >>> >
              > >>> >
              > >>> >
              > >>> ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > >>> ><HTML>
              > >>> ><HEAD>
              > >>> ><TITLE>Reusing JavaBeans in JSP</TITLE>
              > >>> ><LINK REL=STYLESHEET
              > >>> > HREF="My-Style-Sheet.css"
              > >>> > TYPE="text/css">
              > >>> ></HEAD>
              > >>> >
              > >>> ><BODY>
              > >>> >
              > >>> ><CENTER>
              > >>> ><TABLE BORDER=5>
              > >>> > <TR><TH CLASS="TITLE">
              > >>> > Reusing JavaBeans in 2 JSP</TABLE>
              > >>> ></CENTER>
              > >>> ><P>
              > >>> >
              > >>> ><jsp:useBean id="test" scope="request" class="hall.SimpleBean" />
              > >>> >
              > >>> ><%
              > >>> >System.out.println("\nMessage is :"+test.getMessage());
              > >>> >System.out.println("\nMessage1 is :"+test.getMessage1());
              > >>> >%>
              > >>> >
              > >>> ><H1>Message: <I>
              > >>> ><jsp:getProperty name="test" property="message" />
              > >>> ></I></H1>
              > >>> >
              > >>> ><H1>Message1: <I>
              > >>> ><jsp:getProperty name="test" property="message1" />
              > >>> ></I></H1>
              > >>> >
              > >>> >
              > >>> ></BODY>
              > >>> ></HTML>
              > >>> >
              > >>> >
              > >>> >
              > >>> >package hall;
              > >>> >
              > >>> >public class SimpleBean {
              > >>> > private String message = "No message specified";
              > >>> > private String message1 = "No message1 specified";
              > >>> >
              > >>> > public String getMessage() {
              > >>> > return(message);
              > >>> > }
              > >>> >
              > >>> > public void setMessage(String message) {
              > >>> > this.message = message;
              > >>> > }
              > >>> >
              > >>> > public String getMessage1() {
              > >>> > return(message1);
              > >>> > }
              > >>> >
              > >>> > public void setMessage1(String message1) {
              > >>> > this.message1 = message1;
              > >>> > }
              > >>> >}
              > >>> >
              > >>> >
              > >>>
              > >>
              > >>
              > >
              >
              

  • Error while calling local session bean from session facade

    Hi Everybody,
    I was to execute example of session facade pattern. All the files compile properly, but when ejbc command is run, i get the following error:
    ERROR: Error from ejbc:
         In EJB *MANAGER, method create() exposes local interface types or local home interface types through the remote home interface of the bean. This is not allowed.
    ERROR: Error from ejbc:
         In EJB *MANAGER, method remove(java.lang.Object) on the home interface does not throw java.rmi.RemoteException. This is a required exception.
         In EJB *MANAGER, method create() on the home interface does not throw java.rmi.RemoteException. This is a required exception.
    ERROR: Error from ejbc: In EJB MANAGER, the home interface be.telenet.sso.servicelayer.ebiz.ManagerHome must extend the javax.ejb.EJBHome interface.
    ERROR: ejbc found errors
    Thanks
    Amit

    If you are looking a local interface up through JNDI, try using the "java:comp/env" namespace. Also, if you post these questions here about EJB, say what vendor you are using because this stuff is pretty new and there will be differences/bugs/etc.

  • Need help regarding Value Object Concept in flex/java

    I need to map the java objects to flex use value objects in flex.
    The problem is I have a class in java which is referring to another class and again that class referring another class.
    For instance
    Class A
         protected User user;
    Class User
         protected Address address;
    Now I need to map class A to the flex using value object concept and I have to display the user info in the grid as well.
    Need some help to get started.

    You need to set the "scope" property in your remoting destination definition to "session" or "application".

  • Requirements to put my own value object into the context

    Hello,
    are there any requirements to put my own value object into the context?
    I got following exception
    An error has occurred:
    "Failed to process the request."
    Please contact your system administrator.
    Hide details
    Web Dynpro product information:
    Product: null, Vendor: SAP AG, Version: null, Build ID: 6.3006.00.0000.20040617153350.0000, Build Date: Mon Aug 16 09:18:37 CEST 2004
    Error stacktrace:
    java.lang.ClassCastException
         at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:186)
         at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:230)
         at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:230)
         at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:63)
         at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.TableAdapter$ContentCell.getContent(TableAdapter.java:1295)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableCellRenderer.render(SapTableCellRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.renderSapTableRowFragment(SapTableRowRenderer.java:67)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.render(SapTableRowRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(SapTableDefaultBodyRenderer.java:96)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.render(SapTableDefaultBodyRenderer.java:29)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.renderSapTableFragment(SapTableRenderer.java:394)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.render(SapTableRenderer.java:49)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutCellFragment(GridLayoutRenderer.java:609)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutRowFragment(GridLayoutRenderer.java:312)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutFragment(GridLayoutRenderer.java:250)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.render(GridLayoutRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.renderViewContainerFragment(ViewContainerRenderer.java:93)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.render(ViewContainerRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutCellFragment(GridLayoutRenderer.java:609)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutRowFragment(GridLayoutRenderer.java:312)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.renderGridLayoutFragment(GridLayoutRenderer.java:250)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.GridLayoutRenderer.render(GridLayoutRenderer.java:57)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.renderScrollContainerFragment(ScrollContainerRenderer.java:235)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ScrollContainerRenderer.render(ScrollContainerRenderer.java:41)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.renderViewContainerFragment(ViewContainerRenderer.java:93)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.ViewContainerRenderer.render(ViewContainerRenderer.java:33)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.UiWindowRenderer.render(UiWindowRenderer.java:32)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:268)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:94)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendHtml(HtmlClient.java:454)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendResponse(HtmlClient.java:286)
         at com.sap.tc.webdynpro.clientimpl.html.client.HtmlClient.sendResponse(HtmlClient.java:178)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:632)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:57)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:249)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:139)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:101)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:45)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:383)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:333)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:311)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:811)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:235)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:144)

    Hi Jurgen,
    Can you please explain what you are trying to do in detail. Do you want to create a Node dynamically in the context or, you want to populate a Node in a Context???
    The stack trace, does not reveal what you want to do with the value object!
    Thanks and Regards,
    Vishnu Prasad Hegde

  • Business Objects, Value Objects and more

    Hey,
    I've got a general question about business objects (aka entity objects or data transfer objects). The scenario I am using is not one of my own, but it might be a future one. Thus, I'd really appreciate all feedback.
    Let's say that i've got a desktop application which purpose is to manage personal DVD collections. Shortly explained, what i would do here is to create a class Dvd to represent a physical DVD. Then i would create the classes DvdServices and DvdDao. The DvdServices class is what my application will use to retrive and store Dvd instances, and takes care of all session and transaction handling. The DvdDao class is where all database communication takes place. This class will only be used by the DvdServices class.
    Now, say that i would want to keep things simple and use the same business object both in the front end and the back end (yes, i'm using Hibernate). That is, the Dvd instances returned by the DvdServices class is the ones i also would like to use in my GUI. This is where i start to get a little uncertain about best practice.
    Let us say that i use an instance of a Dvd to present some information about a dvd to the user. However, the user would not only like to see what's already stored about that dvd - but also edit some details related to it (such as the title, description or the like). What i would do here (to support editing), is to modify the Dvd class so that it holds a DvdAttributes object which contains all its editable values like title and description (in other words, the state - except for the id and a timestamp value). Thus, i also modify the DvdServices class and create a method called updateDvd(Dvd dvd, DvdAttributes attributes). The method updateDvd() in the DvdServices class, internally, makes a reference to the existing DvdAttributes, applies the new DvdAttributes to the Dvd instance, and tries to save it. If something goes wrong, transaction is rolled back, and the old DvdAttributes are applied to the Dvd class in order to reflect the state of the Dvd instance.I like to think of the Dvd instance as the business object, and the DvdAttributes instance as a related value object (the terminology is probably all wrong here?).
    My question regarding all this is wether it "adheres" to what one might consider as "best practices" (if something like that exists in relation to this)? Could i do things smarter in this case? Is there something which does not make sense (always good to hear a second opinion!).
    All feedback appreciated!

    sbrattla wrote:
    Hey,
    I've got a general question about business objects (aka entity objects or data transfer objects). The scenario I am using is not one of my own, but it might be a future one. Thus, I'd really appreciate all feedback.
    I don't believe a DTO would ever be considered a business object.
    Let's say that i've got a desktop application which purpose is to manage personal DVD collections. Shortly explained, what i would do here is to create a class Dvd to represent a physical DVD. Then i would create the classes DvdServices and DvdDao. The DvdServices class is what my application will use to retrive and store Dvd instances, and takes care of all session and transaction handling. The DvdDao class is where all database communication takes place. This class will only be used by the DvdServices class.
    Now, say that i would want to keep things simple and use the same business object both in the front end and the back end (yes, i'm using Hibernate). That is, the Dvd instances returned by the DvdServices class is the ones i also would like to use in my GUI. This is where i start to get a little uncertain about best practice.
    It appears that 'Dvd' is in fact a DTO. Probably best to name it as such - DvdDto.
    Let us say that i use an instance of a Dvd to present some information about a dvd to the user. However, the user would not only like to see what's already stored about that dvd - but also edit some details related to it (such as the title, description or the like). What i would do here (to support editing), is to modify the Dvd class so that it holds a DvdAttributes object which contains all its editable values like title and description (in other words, the state - except for the id and a timestamp value). Thus, i also modify the DvdServices class and create a method called updateDvd(Dvd dvd, DvdAttributes attributes). The method updateDvd() in the DvdServices class, internally, makes a reference to the existing DvdAttributes, applies the new DvdAttributes to the Dvd instance, and tries to save it. If something goes wrong, transaction is rolled back, and the old DvdAttributes are applied to the Dvd class in order to reflect the state of the Dvd instance.I like to think of the Dvd instance as the business object, and the DvdAttributes instance as a related value object (the terminology is probably all wrong here?).
    As stated no.
    Process flow would normally be like this.
    Happy path (it worked)
    1. Query - returns DvdDto
    2. GUI - display DvdDto
    3. Modify DvdDto
    4. Update (send to server/backend) DvdDto
    5. (Return - It worked.)
    Sad path (it failed)
    1. Query - returns DvdDto
    2. GUI - display DvdDto
    3. Modify DvdDto
    4. Update (send to server/backend) DvdDto
    5. Exception is thrown
    6. (Return - It failed)
    Step 6 is a bit ambigous because it depends on the user and the actual client/server relationship. It could be an exception, a message or just true/false (false is failed.)
    In the above there is no step that corrects or alters the DvdDto instance that was thrown. One reason for this is that it might be a minot mistake on the users part and if you destroy everything they alread typed in they are not going to be happy.

  • Service Locator and session facade pattern

    What are differences between Service Locator and session facade pattern?
    For me it seems one and the same.
    Please explain me in detail. Expecting kind help.
    Thanks,
    Rahul
    Edited by: rahulb1 on Feb 26, 2008 5:07 PM

    rdoekes wrote:
    The ServiceLocator Pattern is a singleton which hold a map of used DataSources. The idea is that you perform a lookup once and use the cache afterwards. The session facade is just one DataSource lookup.huh? Those J2EE patterns are not really reduced to datasources and the SessionFacade has actually nothing to do with datasources.
    Session Facade
    It has Facade in it and a Facade is usually used to give a simple entrypoint by providing a standartized interface. The same is now with the Session Facade. You have a Session bean that represents a high-level business component that interacts and calls lower-level business components.
    Imagine having client a accessing 5 business objects with the remote calls, which is not an efficient way (network latency) or accessing the SessionFace and the session face is doing all the work through local access.
    Service Locator
    As J2EE components are using JDNI to lookup for ejb interfaces,DataSources, JMS components, connections etc. isntead of writing all the lookup in many code piecess across the project, you write a service locator that gives you a centralized place to handle the lookup's. It's easier to maintain and to control such a setup.
    As you can see there's quite a big difference ;-)
    cya,
    Nail

Maybe you are looking for

  • How do I copy videos and music from ipod to itunes library?

    Hi, My computer was rewritten over with WindowXP and I've restored it all now but of course my itunes stuff that is on my ipod is not longer there. How do I copy music and videos from ipod back to my itunes library so I can sync again? What apps are

  • DMS Setting required for GOS file transfer.???

    Hi I  attaching file in Purchase requestion document using  GOS in ERP6.0, now i would like to transfer attachment to shopping cart of SRM7.0. How to transfer the document from ERP to SRM system. Need to change any customizing or Standard BAPI or BAD

  • Payment Status in PO

    Hi, How can I find out whether the vendor has received the payment for the PO Created by the particular user. I want to find out from the purchasing document such as PO. Because in PO we have the PO History which has the record such as GR and IR but

  • Black Oval at Log In Screen

    My Late 2009 iMac 27 Inch has been running fine.  Earlier this year, I had the screen repaired/replaced by official Apple store under 5-year extended warranty because dust was accumulating in lines between the glass and the monitor. Now, several mont

  • How many photos are in Organizer Catalog

    How many photos are in my Organizer Catalog?