Re: [Xdoclet-user] Data Object vs Value Object
Title: Message James, What sort of patches are you working on for Value Objects? As Marcus said, Value Objects currently DO work with CMP 2.0, as I am also using them in my own CMP 2.0 project. There are still a few small bugs I think, andmaybe some improvements could be made. But whatexactly are you working on? Thanks, Steve - Original Message - From: Hicks, James To: JD Brennan ; [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 8:26 PM Subject: RE: [Xdoclet-user] Data Object vs Value Object Ive heard the concept called all3: Value Object, Data Object, and Data Transfer Object. I believe Value Object best describes the concept. Value Object is used for moving data between remote clients and the server. It takes a copy of the values on theserver and sends them to the client. You get just the values, not a reference. If you are working with CMP 2.0, valueobject subtask in XDoclet will not work. I am currently working on apatch for this, which hopefully, if everything goes right, will be finished this coming weekend. James Hicks C.A.D.G. - Application Developer BERRYDirect Email: [EMAIL PROTECTED] Phone: 936.462.4655 Fax: 936.462.4655 Pager: 936.568.4296 I-Pager: [EMAIL PROTECTED] -Original Message-From: JD Brennan [mailto:[EMAIL PROTECTED]]Sent: Wednesday, April 10, 2002 2:02 PMTo: [EMAIL PROTECTED]Subject: RE: [Xdoclet-user] Data Object vs Value Object Thanks. That makes sense. Martin Fowler uses the name Data Transfer Object for the Sun pattern Value Object. Has the Java community settled on the name Value Object, or might the name Data Transfer Object be more appropriate for XDoclet? I don't really care one way or the other, I'm just trying to stick my finger in the air to see which way the wind is blowing. ;-) Tx! JD -Original Message-From: Vincent Harcq [mailto:[EMAIL PROTECTED]]Sent: Tuesday, April 09, 2002 10:07 PMTo: 'JD Brennan'; [EMAIL PROTECTED]Subject: RE: [Xdoclet-user] Data Object vs Value Object DO is the same concept as VO. VO will replace DO in the future. More powerful. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of JD BrennanSent: mercredi 10 avril 2002 2:39To: '[EMAIL PROTECTED]'Subject: [Xdoclet-user] Data Object vs Value Object What's difference between data object and value object in XDoclet? I've found documentation for the Value Object pattern (http://java.sun.com/blueprints/patterns/j2ee_patterns/value_object/index.html) and for the Data Access Object pattern (http://java.sun.com/blueprints/patterns/j2ee_patterns/data_access_object/) But I can't find a definition of the "Data Object" pattern. It seems that in XDoclet the dao subtask is different from the dataobject subtask, so am I correct in assuming the dao and dataobject don't have anything to do with each other in XDoclet? Thanks for any enlightenment! JD "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination, or other use of, or taking of, any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers."
[Xdoclet-user] (no subject)
Mit freundlichen Grüßen Sven Efftinge lohndirekt.de/aktiengesellschaft Lise-Meitner-Straße 19 - D 24941 Flensburg Telefon: 0461/7071 - 133 Telefax: 0461/7071 - 107 E-Mail: mailto:[EMAIL PROTECTED] Internet: http://www.lohndirekt.de ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
ValueObjects was :RE: [Xdoclet-user] cmp v1.1
-Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: den 11 april 2002 13:56 To: Ralf Krakowski; [EMAIL PROTECTED] Subject: Re: [Xdoclet-user] cmp v1.1 Have you found the samples in XDoclet? Now I have. (Why didn't I look there???) :-) It would be nice if you could have these on the xdoclet homepage... A few questions. How do I handle value objects? Looking at the AccountBean sample, all stuff regarding the value object and the related ejbCreate methods are commented out. Why? I can that part to work. Thanks Ralf Krakowski Astrakan AB Maskingatan 5 417 64 Göteborg e-mail:[EMAIL PROTECTED] direct +46 (0)31 7793543 mobile +46 (0)703733543 fax +46 (0)31 7793599 www.aderagroup.com - Original Message - From: Ralf Krakowski To: [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 6:33 PM Subject: [Xdoclet-user] cmp v1.1 Could someone please provide a full java CMP v1.1 example with a primary key class and a value object class. Both the java files and the build file would be great. I am having problems generating the classes with xdoclet. Thank you. Ralf Krakowski Astrakan AB Maskingatan 5 417 64 Göteborg e-mail:[EMAIL PROTECTED] direct +46 (0)31 7793543 mobile +46 (0)703733543 fax +46 (0)31 7793599 www.aderagroup.com ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
[Xdoclet-user] Pattern syntax
What is the syntax for pattern attributes? For example I have a Bean named SchemaManagerBean and I want the remote interface named SchemaManager. {0} refers to SchemaManagerBean . How do I cut off some parts of the name - here Bean? remoteinterface pattern=?/ Bernd ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
[Xdoclet-user] using xdoclet error(help)
using xdoclet error(help) ejb: test.ejb.AccountBean;(CMP) test.ejb.TellerBean(Stateless) client: test.client.Test error: 1.when i use TellerUtil.getHome(); can not get TellerHome; solution: modify the TellerUtil.getHome() from: java.lang.Object objRef = initialContext.lookup(test.interfaces.TellerHome.COMP_NAME); modified to: java.lang.Object objRef = initialContext.lookup(test.interfaces.TellerHome.JNDI_NAME); 2.when i call test.client.Test printStackTrace: 23:27:35,244 INFO [EJBDeployer] Deploying mall/Account 23:27:35,244 INFO [EJBDeployer] Deploying mall/Teller 23:27:35,504 ERROR [XmlFileLoader] XmlFileLoader: File file:/C:/jboss-3.0.0beta/ tmp/deploy/75.samples-ejb.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 5 2. Error message: Element dependent-value-classes requires additional elements . 23:27:35,764 INFO [mall/Account] Created table 'account' successfully. 23:27:49,895 ERROR [JRMPInvoker] operation failed java.rmi.ServerException: argument type mismatch; nested exception is: java.lang.IllegalArgumentException: argument type mismatch java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S tatelessSessionContainer.java:642) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat elessSessionInstanceInterceptor.java:77) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte rceptor.java:96) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep torCMT.java:167) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:6 1) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:127) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai ner.java:308) at org.jboss.ejb.Container.invoke(Container.java:630) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15 55) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15 23) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java: 364) at java.lang.reflect.Method.invoke(Native Method) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) at sun.rmi.transport.Transport$1.run(Transport.java:152) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:148) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 65) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:706) at java.lang.Thread.run(Thread.java:484) source /* * test.ejb.AccountBean / package test.ejb; import javax.ejb.*; import test.interfaces.AccountPK; import test.interfaces.AccountData; import test.interfaces.Account; /** * This is an account bean. It is an example of how to use the XDoclet tags. * * @ejb:bean name=mall/Account type=CMP jndi-name=ejb/mall/Account * @ejb:finder signature=Collection findAll() unchecked=true transaction-type=NotSupported * @ejb:interface remote-class=test.interfaces.Account * * @jboss:table-name account * @jboss:create-table ${jboss.create.table} * @jboss:remove-table ${jboss.remove.table} * @jboss:tuned-updates ${jboss.tuned.updates} * */ public abstract class AccountBean implements EntityBean{ /** * * @ejb:pk-field * @ejb:persistent-field * * @jboss:column-name id */ public abstract String getID(); public abstract void setID(String ID); /** * Balance of the account. * * @ejb:interface-method * @ejb:persistent-field * * @jboss:column-name balance */ public abstract float getBalance(); public abstract void setBalance(float balance); /** * Owner of this account. * * @ejb:interface-method * @ejb:persistent-field * * @jboss:column-name owner */ public abstract String getOwner(); /** * @ejb:interface-method */ public abstract void setOwner(String Owner); /** * @ejb:create-method */ public AccountPK
RE: [Xdoclet-user] Data Object vs Value Object
I was unaware that anyone was fixing it to work with CMP2. The last i heard was that no special work was going to be performed to make it work with cmp2. I have a CVS snapshot from about 2 weeks ago. Here is one build setup I use that causes errors with the version of valueobject that im using: - bean class has 1-n relationship with another bean (CMR) - the other bean is already built and packaged. - xdoclet generates cmp implementation for bean, local home and local object interfaces - the bean class declares the getValueObject and setValueObject methods as abstract. - xdoclet generates the value object for the bean. it includes the value objects for the 1-n relationship - when xdoclet goes to generate the cmp implementation with get and set methods, it croaks. Since it has been a week since I worked with it, i don't remember the exact error message. But the error is caused when it trys to write the update*, add*, and remove methods in the bean for the relationship. When i get home tonight, i will run it and email the stack trace. I will also get the latest CVS and try it. James Hicks C.A.D.G. - Application Developer BERRYDirect Email: [EMAIL PROTECTED] Phone: 936.462.4655 Fax: 936.462.4655 Pager: 936.568.4296 I-Pager: [EMAIL PROTECTED] -Original Message- From: Marcus Brito [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 9:54 PM To: Lista XDoclet-User Subject: RE: [Xdoclet-user] Data Object vs Value Object Em Qua, 2002-04-10 às 21:26, Hicks, James escreveu: If you are working with CMP 2.0, valueobject subtask in XDoclet will not work. I am currently working on a patch for this, which hopefully, if everything goes right, will be finished this coming weekend. Hey, it DOES work. I've put some effort into Value Objects recently and I think that the current state is OK for CMP2. If you find anything that doesn't work, file a bug on sourceforge.net and someone (me or vincent, probably) should take care of it. I'm even using the VO task in my own project (w/ CMP2). -- Pazu [EMAIL PROTECTED] Anime Gaiden - De fãs para fãs, sempre. http://www.animegaiden.com.br The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination, or other use of, or taking of, any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
RE: [Xdoclet-user] Data Object vs Value Object
Title: Message Are you using container managed relationships ( 1-n or n-n )? This seems to cause errors with the version i have. I will get a new CVS version tonight and see what happens. James Hicks C.A.D.G. - Application Developer BERRYDirect Email: [EMAIL PROTECTED] Phone: 936.462.4655 Fax: 936.462.4655 Pager: 936.568.4296 I-Pager: [EMAIL PROTECTED] -Original Message-From: Steve Knight [mailto:[EMAIL PROTECTED]]Sent: Thursday, April 11, 2002 7:34 AMTo: [EMAIL PROTECTED]Subject: Re: [Xdoclet-user] Data Object vs Value Object James, What sort of patches are you working on for Value Objects? As Marcus said, Value Objects currently DO work with CMP 2.0, as I am also using them in my own CMP 2.0 project. There are still a few small bugs I think, andmaybe some improvements could be made. But whatexactly are you working on? Thanks, Steve - Original Message - From: Hicks, James To: JD Brennan ; [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 8:26 PM Subject: RE: [Xdoclet-user] Data Object vs Value Object Ive heard the concept called all3: Value Object, Data Object, and Data Transfer Object. I believe Value Object best describes the concept. Value Object is used for moving data between remote clients and the server. It takes a copy of the values on theserver and sends them to the client. You get just the values, not a reference. If you are working with CMP 2.0, valueobject subtask in XDoclet will not work. I am currently working on apatch for this, which hopefully, if everything goes right, will be finished this coming weekend. James Hicks C.A.D.G. - Application Developer BERRYDirect Email: [EMAIL PROTECTED] Phone: 936.462.4655 Fax: 936.462.4655 Pager: 936.568.4296 I-Pager: [EMAIL PROTECTED] -Original Message-From: JD Brennan [mailto:[EMAIL PROTECTED]]Sent: Wednesday, April 10, 2002 2:02 PMTo: [EMAIL PROTECTED]Subject: RE: [Xdoclet-user] Data Object vs Value Object Thanks. That makes sense. Martin Fowler uses the name Data Transfer Object for the Sun pattern Value Object. Has the Java community settled on the name Value Object, or might the name Data Transfer Object be more appropriate for XDoclet? I don't really care one way or the other, I'm just trying to stick my finger in the air to see which way the wind is blowing. ;-) Tx! JD -Original Message-From: Vincent Harcq [mailto:[EMAIL PROTECTED]]Sent: Tuesday, April 09, 2002 10:07 PMTo: 'JD Brennan'; [EMAIL PROTECTED]Subject: RE: [Xdoclet-user] Data Object vs Value Object DO is the same concept as VO. VO will replace DO in the future. More powerful. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of JD BrennanSent: mercredi 10 avril 2002 2:39To: '[EMAIL PROTECTED]'Subject: [Xdoclet-user] Data Object vs Value Object What's difference between data object and value object in XDoclet? I've found documentation for the Value Object pattern (http://java.sun.com/blueprints/patterns/j2ee_patterns/value_object/index.html) and for the Data Access Object pattern (http://java.sun.com/blueprints/patterns/j2ee_patterns/data_access_object/) But I can't find a definition of the "Data Object" pattern. It seems that in XDoclet the dao subtask is different from the dataobject subtask, so am I correct in assuming the dao and dataobject don't have anything to do with each other in XDoclet? Thanks for any enlightenment! JD "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination, or other use of, or taking of, any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers." "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination, or other use of, or taking of, any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers."
Re: RE: [Xdoclet-user] Data Object vs Value Object
Just a suggestion for testing and debugging this value baby: Use Middlegen. With 8 related tables you'll get 7 relationships, right? That's enough to cover all combinations of cardinality and directionality: 1--1 1--n 1--n m--m m-m 1-1 1-n It would be error prone and painful to code all these test classes (which you do need indeed) by hand. Make your life easier and your code better. You'll have to edit the entity-cmp.j template in Middlegen in order to make it generate value objects (isn't value _classes_ more correct?). Middlegen/XDoclet will stress the value object to the max with all these combinations. There should be some JUnit tests to test it too. This stuff is too complex for ad hoc testing. (This would go to Vincent too if I had his email handy, but I don't. He'll read it anyway). Regards, Aslak - Original Message - From: Hicks, James [EMAIL PROTECTED] Date: Thursday, April 11, 2002 5:34 pm Subject: RE: [Xdoclet-user] Data Object vs Value Object I was unaware that anyone was fixing it to work with CMP2. The last i heard was that no special work was going to be performed to make it work withcmp2. I have a CVS snapshot from about 2 weeks ago. Here is one build setup I use that causes errors with the version of valueobject that im using: - bean class has 1-n relationship with another bean (CMR) - the other bean is already built and packaged. - xdoclet generates cmp implementation for bean, local home and local object interfaces - the bean class declares the getValueObject and setValueObject methods as abstract. - xdoclet generates the value object for the bean. it includes the valueobjects for the 1-n relationship - when xdoclet goes to generate the cmp implementation with get and set methods, it croaks. Since it has been a week since I worked with it, i don't remember the exact error message. But the error is caused when it trys to write the update*, add*, and remove methods in the bean for the relationship. When i get home tonight, i will run it and email the stack trace. I will also get the latest CVS and try it. James Hicks C.A.D.G. - Application Developer BERRYDirect Email: [EMAIL PROTECTED] Phone: 936.462.4655 Fax: 936.462.4655 Pager: 936.568.4296 I-Pager: [EMAIL PROTECTED] -Original Message- From: Marcus Brito [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 9:54 PM To: Lista XDoclet-User Subject: RE: [Xdoclet-user] Data Object vs Value Object Em Qua, 2002-04-10 às 21:26, Hicks, James escreveu: If you are working with CMP 2.0, valueobject subtask in XDoclet will not work. I am currently working on a patch for this, which hopefully, if everything goes right, will be finished this coming weekend. Hey, it DOES work. I've put some effort into Value Objects recently and I think that the current state is OK for CMP2. If you find anything that doesn't work, file a bug on sourceforge.net and someone (me or vincent,probably) should take care of it. I'm even using the VO task in my own project (w/ CMP2). -- Pazu [EMAIL PROTECTED] Anime Gaiden - De fãs para fãs, sempre. http://www.animegaiden.com.br The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/orprivileged material. Any review, retransmission, dissemination, or other use of, or taking of, any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you receivedthis in error, please contact the sender and delete the material from all computers. ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
Re: [Xdoclet-user] Pattern syntax
A wise old hermit known only as Bernd Kuehl [EMAIL PROTECTED] once said: What is the syntax for pattern attributes? For example I have a Bean named SchemaManagerBean and I want the remote interface named SchemaManager. {0} refers to SchemaManagerBean . No, {0} refers to the beans' name as specified in the name parameter of the @ejb:bean tag. It also picks a sensible default for this value - see the documentation for the ejbClassNameSuffix parameter of ejbdoclet, A comma-separated list of endings which should be removed from the bean class name to generate a bean's name if no name parameter is specified in the @ejb:bean tag. (default is Bean,EJB,Ejb) So in your case, it would use SchemaManager by default, which is what you wanted... How do I cut off some parts of the name - here Bean? remoteinterface pattern=?/ ejbdoclet ejbClassNameSuffix=Bean/ remoteinterface pattern={0}/ /ejbdoclet But it's unnecessary because, as I said, the default settings will do that anyway... Andrew. ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
[Xdoclet-user] JBoss 3.0 incompatibilities
Looks like XDoclet is currently out of sync with the expectations of JBoss 3.0. Using the latest CVS versions of both, XDoclet generates: jbosscmp-jdbc defaults datasourcejava:/BlahDS/datasource type-mappingMS SQLSERVER2000/type-mapping /defaults but this needs to be: jbosscmp-jdbc defaults datasourcejava:/BlahDS/datasource datasource-mappingMS SQLSERVER2000/datasource-mapping /defaults Thanks, Jeff Schnitzer [EMAIL PROTECTED] ___ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user