Simple Question - Data Transfer Object

Hey gurus,
I like the option in JBuilder to automatically create Data Transfer Objects and an Assembler for it. But what? I used to make the assembler a Session Bean, and JBuilder makes it a normal Java class with static methods. I know JBuilder always ships with the best solutions, but...
what is the advantage of the static class here? And in my case, i have the session beans and the entity beans deployed on a different server, would that make a difference for the advantage?
greets,
Nick.

Hey gurus,
I like the option in JBuilder to automatically create
Data Transfer Objects and an Assembler for it. But
what? I used to make the assembler a Session Bean,
and JBuilder makes it a normal Java class with static
methods. I know JBuilder always ships with the best
solutions, but...
well....... not always
:-)

Similar Messages

  • Business Objects(BOs) & Data Transfer Objects(DTOs)-both needed ?

    In a J2EE system...
    I know that "Business Objects" (BOs) are basically value objects (VOs) ...lots of getters and setters and some business logic. These are basically to model nouns in the system. Eg Student BO.
    I know that "Data Transfer Objects" (DTOs) are value objects (VOs)....with getters and setters... with the purpose of avoiding multiple method calls...to avoid overhead...which effects performance. eg it's better to pass a Student DTO then say...pass the student ID and student name and student age etc etc.
    Main question : Should a system have both ? If yes, why do I need a StudentBO.java and then another StudentDTO.java....when they are so similar ?...when both are basically VOs ? Can't I just use BOs to serve as DTOs ?
    Thanks.

    Hi,
    I've started using BO's and DTO's since 3 months .With my experiece i understand we nned both of them.
    The BusinessObject represents the data client. It is the object that requires access to the data source to obtain and store data.
    DTO
    This represents a Transfer Object used as a data carrier. The DataAccessObject may use a Transfer Object to return data to the client. The DataAccessObject may also receive the data from the client in a Transfer Object to update the data in the data source.
    From this i want to tell you that We are not gonna do any operation on BO's but we do operations on DTO
    Ashwin

  • Data Transfer Objects

    Is it safe to assume that Data Transfer Objects should be populated by Business Objects that are local to entity beans or whatever is being used to populate them?

    jschell wrote:
    ttb999 wrote:
    jschell wrote:
    So if the point of DTOs is to reduce network traffic, why would you initially populate them using a remote object? That doesn't have anything to do with what I said.Well that was the jist of my question.Your statement has a historical perspective which probably doesn't mean much in current DTO usage.
    Originally RMI was promoted as a a 'method' interface. As such you would have had the equivalent of a DTO with setter/getter for each attribute. Each setter/getter would invoke a remote procedure call to the server.
    Thus a data object with 5 attributes would cause 5 network calls to 'populate' the attributes.
    That was vastly inefficient.
    Consequently the first DTO type (which was not called a DTO) was promoted as a way to avoid that.
    If you want you can look up "Remote Procedure Call" (RPC) which would have been the origin of where the 'method' idiom originated.And quite apart from performance, populating a local object from the remote prevents disruption of the local data in case the network connection is (temporarilly) lost.

  • Data Transfer Object Class

    HI, i'm new with the web dynpro,  so i been told to use java web dynpro  using the Data Transfer Object, with a conection to Oracle.
    anybody has information about the web dynpro using Data Transfer Object.
    thanks in advance!!

    Hi,
    Their are lot of articles on the same here, please search for java bean models. Will give some hints
    I guess what you are planning to do is
    DB--> EJB/POJO--
    > Webdynpro
    Regards
    Ayyapparaj

  • Hierarchical data transfer objects confusing Flex compiler...

    I just posted this same query on FlexCoders... but then I
    thought this might be a better target group to ask, so here goes:
    We are working on a set of data transfer objects where we
    have matching server-side java classes and client-side AS classes.
    Some of these DTO contain lists of other DTOs. As an example:
    A.java:
    public class A {
    List<B> blist
    In A.as we have...
    class A {
    public var blist : ArrayCollection;
    And we have B.java and B.as
    Then we have a RemoteObject call to pull down a bunch of A
    objects....
    Here's the problem, Flex does not compile B.as at build-time.
    So if B.as has a compiler problem, you never know about it,
    except that the 'blist' in A never gets populated. If you break
    down the data transfer and debug it. You find that during
    RemoteObject call, the blist data comes "down the wire", but as an
    ArrayCollection generic Objects, they never get turned into
    instances of Bs...
    I am guessing that this is happening because at compile time,
    there is not direct reference to B in the clientside project. Our
    covering .mxml wants one or more A objects, and inside A the blist
    is an ArrayCollection. So the compiler doesn't see a reference to
    B..
    So anyone know how we can fairly seamlessly make sure B.as
    gets compiled at build time so we'd know of compiler issues with it
    rather than spending lots of time debugging mysterious null values?
    (This appears to happen whether the project is set to compile
    on the client-side or the server-side. We are using Flex and FDS
    2.0.1 and Java 1.5)

    up...

  • Simple Question - Data Import

    Hi,
    i have a simple question. Is it wise to change our actual import scenarios for input data from systems out of sap to XI?
    Today we have the scenario that data from outer systems will send per ftp to a special directory. After that a report will transform the data into a batchinput. The btci will send per rfbibl into the system. Now we have a huge number of such reports. Will it now be better to change to XI, which we use perhaps for MDM?
    Xi could take the file from ftp-srever maps the fields an will send per bapi to sap.
    Is it a quite simple scenario or is batchinput still the better way.

    Hi,
    If you have a scenario where you have different file formats , which needs to be converted and then send to different systems based on some conditions , then suggested is XI usage.
    However, also if you already have XI installed and running for the MDM system , then you can think of routing all messages through XI.  It may make sense to use one system for all routing and data conversion puposes.
    Hope this view helps.
    Cheerio,
    Disha

  • Can I declare arraylists in data transfer object

    Can I use arraylists in data transfer objects

    Yes, and don't double post:
    http://forum.java.sun.com/thread.jsp?thread=540027&forum=425&message=2616354
    Answers don't always come in three minutes. Be patient.

  • User-Defined Data Type (Data Transfer Objects) is null

    hi
    i try to access a nested complex datatype over blazeds. i always see that the second level of the  complex datatye is NULL but the other data's like String are ok.
    here an example:
    as you can see TT1 has a member TT2, and a String
    TT2 has a member TT3 and a string
    and TT3 has just a string.
    in the ActionScript the TT2 referenz in TT1 is always NULL.
    Java Code
    Java code:
    package clientreportingserver;
    public class TT1 {
        public String getT1s() {
            return t1s;
        public void setT1s(String t1s) {
            this.t1s = t1s;
        String t1s;
        public TT2 getTt2() {
             return tt2;
        public void setTt2(TT2 tt2) {
             this.tt2 = tt2;
        TT2 tt2;
    =================================================
    package clientreportingserver;
    public class TT2 {
        public String getT2s() {
            return t2s;
        public void setT2s(String t2s) {
            this.t2s = t2s;
        String t2s;
        public TT3 getTt3() {
             return tt3;
        public void setTt3(TT3 tt3) {
             this.tt3 = tt3;
        TT3 tt3;
    =================================================
    package clientreportingserver;
    public class TT3 {
         public String getT3s() {
            return t3s;
        public void setT3s(String t3s) {
            this.t3s = t3s;
        String  t3s;
    ActionScript DataType
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT1")]
    [Bindable]
    public class TT1
        public var t1s:String;
        public var t2:TT2
    ====================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingserver.TT2")]
    [Bindable]
    public class TT2
        public var t2s:String;
        public var t2:TT3
    ===================================================================
    package clientreporting.model
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="clientreportingapi.TT3")]
    [Bindable]
    public class TT3
        public var t3s:String;
    here the output from blazeds. for me it looks perfect, all data are transmitted
    BlazeDs output
    [BlazeDS]Deserializing AMF/HTTP request
    Version: 3
      (Message #0 targetURI=null, responseURI=/5)
        (Array #0)
          [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
            source = null
            operation = "getTT"
            destination = "exposedServiceWrapper"
            clientId = "E57066B1-170E-503A-D4EC-004166E95FC3"
            body = (Array #1)
            timeToLive = 0
            headers = (Object #2)
              DSEndpoint = "channel-amf"
              DSId = "E570490A-C218-4A29-4229-8CD6F29222FC"
            timestamp = 0
            messageId = "5FDB47AD-9066-DD95-4CD4-0CE0D3F6C337"
    [BlazeDS]Adapter 'java-object' called 'null.getTT(java.util.Arrays$ArrayList (Collection size:0)
    [BlazeDS]Result: 'clientreportingserver.TT1
      t1s = TT 1 String
      tt2 = clientreportingserver.TT2
        t2s = TT 2 String
        tt3 = clientreportingserver.TT3
          t3s = TT 3 String
    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
      (Message #0 targetURI=/5/onResult, responseURI=)
        (Externalizable Object #0 'DSK')
          (Typed Object #1 'clientreportingserver.TT1')
            t1s = "TT 1 String"
            tt2 = (Typed Object #2 'clientreportingserver.TT2')
              t2s = "TT 2 String"
              tt3 = (Typed Object #3 'clientreportingserver.TT3')
                t3s = "TT 3 String"
    1.262936445958E12
    (Byte Array #4, Length 16)
    (Byte Array #5, Length 16)
    (Byte Array #6, Length 16)
    the last Alert (accessing t2) got always a null pointer, the fist Alert works fine and print out the string i expected to see
    call in ActionScript
        public function loadTT():void {
           _policyService.getTT(loadTTHandle);
        private function loadTTHandle(content:TT1):void {
           Alert.show("" + content.t1s);
           Alert.show("" + content.t2.t2s);
    is it possible to access a nested complex type? i only could find simple examples.
    thanks for your help joe

    I found the problem
    in the flashlog.txt i found :ReferenceError: Error #1056: Cannot create property AFoo on [...]
    this let me to this blog http://blog.comtaste.com/java/  ==>
    Automating  ActionScript 3 classes generation from Java Beans in a LiveCycle Data Services context
    it was a naming problem.

  • Simple Question- WS & Custom object types

    Hi all,
    I'm sure I found some posts on this topic before but cannot seem to find them at the minute.
    I know in Web Services it is possoble to pass user defined objects, as long as they implement Serializable. But is it that simple? do you not have to define mappings and the like in the configuration files?
    Any pointers to suitable material would be appreciated. Many thanks
    Kevin

    Hi Kevin,
    I too have noticed that there are many posts on TypeMapping of complex types (I think it is mostly because people are not - yet - well acquainted with Web Services). Look at the "advanced"-JAXRPC examples in the Web Services tutorial and see that you do not need to map much. In the case of DII it is limited to the input-parameters and the result-type.

  • Flex - Java Data transfer objects. How do you usually work ? (Brainstorming)

    Hi,
    I would like to explain you how I work and to know how you guys do.
    All this discussion is just an example of how I work. I really want to know how other coders usually work. This way, maybe I can improve my code.
    I would like to know how do you do when you want to retreive data into typed objects when these data contains reference to other typed objects.
    Here is how I always work :
    I want to retreive all my customers into a flex datagrid and to display all information.
    Here is my Customer table structure (just an example)
    id, name, refCompany, refLanguage, refCountry, refCustomerGroup
    refCompany, refLanguage, refCountry, refCustomerGroup are IDs that reference to other tables.
    To ensure to retreive all data into typed object, I make a Customer,Company, Language, Country, CustomerGroup, Flex and Java classes.
    I make a query that looks like : Select * from Customer
    My java code will looks like :
    List<Customer> customers = new ArrayList<Customer>;
    ResultSet rs = myConn.execSelect(query);
    while(rs.next)
         customers.add(new Customer(rs))
    return customers;
    In my Customer class, I have a constuctor that takes a resultSet
    My customer class contains variables (refCompany that is actually a Company object (not an id), refLanguage that is actually a Language object (not an id),... )
    Customer(ResultSet rs)
         this.name = rs.getString("name")
         this.refCompany = new Company.findById(rs.getInt("refCompany"))     //This function returns a Company object
         this.refLanguage = new Language.findById(rs.getInt("refLanguage"))     // This function returns a Language object
    Here is how I always do. I don't know if it is a good way because for each customer found in the database, I will make 4 queries (4 findById to find each object : company, language, country, customerGroup of the current customer).
    But this way is generic, I don't have to make a specific query that will retreive all objects in one time. I select all customers, and in the constructor I select all objects that I have the reference...
    The big problem with this way is when I retreive objects, I always retreive all referenced objects and I do not necessarily want it.
    What do you think about the way I work ? How you guys do ? what is the best practice ?

    up...

  • Data Transfer Objects Design Pattern

    Hi All,
    Could anyone tell me more about this DTO design pattern, as such when one should prefer it.
    Second is this pattern transaction safe or one would have to implement the same manually. Any updates would prove benefecial to me.

    Hi
    I do not understand what you mean.
    A dto is just an object which you populate in one layer and use in another layer.
    you do not need any jndi look for DTO , instead you lookup for ejbs , datasources ,....
    for example you lookup for some CMP , search and find some CMPs , populate DTO with those CMP and send the DTO to front layer.
    if it is not the answer , can you explain more about your requirements(S)

  • Adobe Flex + PHP (Using Data Transfer Object pattern in amf)

    hello
    i'am using amf to connect my flex application to the php back end,but i want to use DTO(DataTransferObject), i haven't enough info about this pattern.
    can you introduce me a reference or have you any suggestion?
    thanks for your attention
    Uniqe_max (amin shahnazary)

    here is another way of doing it
    http://www.youtube.com/watch?v=1n1uHQAP18Q
    http://www.youtube.com/watch?v=fQsCBk9tvkQ

  • Is it mandatory to use Business object for data transfer and work flow?

    <font size="3">
    <pre>
    In our enterprise projects we deal with some screens where we add or update some data and again
    we retrieve that data and display to user in various ways like displaying on screen as
    a report or viewing in excel etc.. Most of the times, though we identify the business objects
    based on the nouns in requirements document, really while implementing there will not be any
    business logic in the objects. Almost all the objects which we identfy as business objects
    may have methods like add, delete, update and retrieve methods. Still in these cases, is it required to
    have business objects or can we use transfer object to send the data for saving and retriving or any other
    pattern/guideline is there for dealing such cases?
    I really appreciate your comments on this topic.
    Also I apologize ahead of time if my explanation is not clear to you.
    </pre>
    </font>
    <p>
    Thanks in advance.
    <p>
    Regards,
    <p>
    Rizwan.

    In my opinion, DAO pattern would be suitable for you. Generally the DAO (Data Access Object) will have the CRUD (create, read, update, delete) methods to retrieve data from data-source (e.g. database). Based on the data it will create the DTOs (Data Transfer Objects) and pass them to the caller. It will also receive the DTOs from the caller and save it the data-source. Thus in your case you can
    - remove the CRUD methods from the Business Objects (BO) and make them pure DTOs and use them with DAOs (If you are using JDBC codes inside your application and you don't have much of validation or processing logic in your BOs).
    http://www.corej2eepatterns.com/Patterns2ndEd/DataAccessObject.htm
    OR
    - use BOs in combination in DAOs (if using the database connection from a pool and BOs are having complicated processing logic).
    http://www.corej2eepatterns.com/Patterns2ndEd/BusinessObject.htm

  • Error while Transfer Object

    Hi,
    I have a Data-Transfer-Object which is transfered between a client and an EJB. While this transfer I get this exception:
    java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Mismatched serialization UIDs : Source (Rep. IDRMI:com.tsystems.ik.to.BANFTO:0000000000000000) = 0000000000000000 whereas Target (Rep. ID RMI:com.tsystems.ik.to.BANFTO:5F16928AAE9F82C6:70F941F18AA0F040) = 70F941F18AA0F040 vmcid: SUN minor code: 211 completed: Maybe
    Any ideas, where the error is?
    My DTO:
    import java.io.Serializable;
    public class BANFTO implements Serializable {
    private String number;
    private String name;
    public BANFTO (){}
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public String getNumber() {
    return number;
    public void setNumber(String number) {
    this.number = number;

    I had the same problem.
    I deleted automatically generated deployment and RMIC code, did a rebuild all projects, deployed on server, restarted server and it just worked out.

  • Data transfer into partition table took more time

    Scenario: We have a Staging table (consider it as Table A) which is refreshed Every month. Every month table A is truncated and inserted with 6 million records approx. Once the mandatory update done on Table A we have to move the records to main table (Table
    B). Table B is Partitioned by month wise, which contains the complete history of records from the year 2010. Table B has 1 clus. index(month column) and 3 non clustered index. Currently table B has 180,562,235 records. While transfer i didn’t disable the index,
    because it was taking more time for enabling the index again.
    Question: Data transfer from table A to table B took 2.30 hours approx. Is there any way to reduce transfer time.
    Any Suggestion to reduce the time will be helpful.

    Try with SWITCH Partition...
    eg:
    http://www.mssqltips.com/sqlservertip/1406/switching-data-in-and-out-of-a-sql-server-2005-data-partition/

Maybe you are looking for

  • Oracle 8.1.5 for linux, install help.

    Does anyone have a successful installation of Oracle 8.1.5 running on Red Hat 6.0? I have tried to install it but, I can't get the installer to run. I get java errors when I run, runInstaller. I have installed jre1.1.6. Any help would be appreciated.

  • Text field in table not overflowing onto next page!

    Hi, I have set up a table with a text field in the first row, added buttons to add and delete rows, set to allow page breaks and made the text field to expand to fit and allow multiple lines. The problem I am having is that if I put a lot of text int

  • Half of pic being cut off in FCP

    Hi, I am a high school student working on a documentary for our island and am new to FCP, so all answers are welcome and all hints to working with FCP are greatly appreciated. but my main problem is this: Whenever I open a still image picture in Fina

  • TRIED TO DOWNLOAD SOFTWARE ios7.1.2 TO MY IPAD. iPAD FROZE ON THE APPLE PICTURE AND WONT TURN OFF OR RESPOND AT ALL.

    TRIED TO DOWNLOAD SOFTWARE ios7.1.2 TO MY IPAD. iPAD FROZE ON THE APPLE PICTURE AND WONT TURN OFF OR RESPOND AT ALL. IPAD MAY NEED MORE FREE MEMORY FOR THE NEW SOFTWARE BUT HOW DO I FREE UP MEMORY IF THE IPAD IS FROZEN. CAN THIS BE DONE ON iTUNES OR

  • Making 3channel 32 bit images from 1 channel 8 bit images ( channel combining)

    Hi guys Although I have a simple problem, i could not solve it yet. I am tring to combine opencv and labview by using .dll.I succesfully process and read  8bit images from opencv to display on labview as a 8bit images. My problem encounters here. Whe