[JBoss-user] [EJB/JBoss] - Re: CMP - composite primary key - @ejb.primkey spec
Thanks Red, I got that part working now. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3854040#3854040 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3854040 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: hardcoded JNDI names on clientside...
Hi Raist, thanks for the tip. I'm in the middle of managing a few things at the same time (including a new job the coming Monday). So, havent been able to get back to you on this any sooner. I've bookmarked this thread, and will certainly take time to digest your every word you wrote as soon as I can manage to sit down and cool my head. But, thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3854027#3854027 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3854027 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - HELP! CMR -- generated SQL doesn't look right...
Hi, really frustating... been trying to get my CMR setup for last three days but without much success (shame). My setup is simple. I have three beans: 1. UserBean 2. GroupBean 3. GroupMembershipBean Each User (UserBean) can belong to multiple Group(s) (GroupBean). 1. UserBean maps to table USERS, table schema: Primary key: UIN Other fields: login, email, ... etc 2. GroupBean maps to table GROUPS, table schema: Primary key: UIN Other fields: name, decription, ... etc 3. GroupMembershipBean maps to table GROUPMEMBERSHIP, table schema: Composite Primary Key: {GROUPUIN, USERUIN} Foreign key on USERUIN and GROUPUIN that points to table USERS and table GROUPS There's a One-To-Many relationship between GroupBean (One-side) and GroupMembership (Many-side). 1. GroupBean: | /** | * @ejb.bean | * name="GroupEJB" | * local-jndi-name="ejb/UserGroup" | * display-name="User Group EJB" | * description="User Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="Group" | * reentrant="false" | * primkey-field="UIN" | * | * @ejb.persistence | * table-name="GROUPS" | * | * @ejb.finder | * query="SELECT OBJECT(g) FROM Group AS g" | * signature="java.util.Collection findAllGroups()" | * | * @ejb.interface | * local-extends="javax.ejb.EJBLocalObject, java.lang.Comparable, java.io.Serializable" | * local-class="com.aa.samples.interfaces.GroupLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupBean implements EntityBean, Serializable, Comparable { |... other stuff ... | /** |* @ejb.relation |*name="GroupEJB-GroupMembershipEJB" |*role-name="GroupEJB-has-GroupMembershipEJB" |* |* @ejb.interface-method |*/ | public abstract Collection getGroupMembershipBean(); | public abstract void setGroupMembershipBean(Collection memberships); | ... other stuff ... | } | 2. GroupMembershipBean: | /** | * | * @ejb.bean | * name="GroupMembershipEJB" | * local-jndi-name="ejb/GroupMembership" | * display-name="Group Membership EJB" | * description="Group Membership Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="GroupMembership" | * reentrant="false" | * | * @ejb.persistence | * table-name="GROUPMEMBERSHIP" | * | * @ejb.pk | * class="com.aa.samples.primarykeys.GroupMembershipKey" | * | * @ejb.interface | * local-extends="javax.ejb.EJBLocalObject, java.lang.Comparable, java.io.Serializable" | * local-class="com.aa.samples.interfaces.GroupMembershipLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupMembershipLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupMembershipBean implements EntityBean, Serializable, Comparable { |... other stuff ... | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="GROUPUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |* |*/ | public abstract Integer getGroupUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setGroupUIN(Integer groupUIN); | | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="USERUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getUserUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setUserUIN(Integer userUIN); | | /** |* @ejb.relation |*name="GroupEJB-GroupMembershipEJB" |*role-name="GroupMembershipE
[JBoss-user] [EJB/JBoss] - EJB Reference - what's it?
I've seen in many articles and books: * @ejb.ejb-ref view-type = "local" ejb-name = "Client" ref-name = "ejb/Client" But many times I got my bean working WITHOUT declaring EJB references... What's it for? Thanks! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853845#3853845 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853845 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: CMP - composite primary key - @ejb.primkey spec
Thanks, I'm stiill reading up on one article: http://www-106.ibm.com/developerworks/library/j-santa1/ Anyway, yes, i did put @ejb.pk-field method level tags on getters. But do we need @ejb.bean primkey-field still? I guess we do - but we specify "field name" - NOT "column name". so... here's what I have in mind, not yet put to test however: | /** | ... | @ejb.bean | ... | primkey-field="PK" QUESTION 1: Do I still need this attribute with composite key class? | ... | */ | class abstract GroupMembershipBean { | | ... | /** |* @ejb.interface-method |* QUESTION 2: DO I NEED "@ejb.pk-field" HERE? | */ | public abstract GroupMembershipKey getPK( ); | ... | | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="GROUPUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getGroupUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setGroupUIN(Integer groupUIN); | | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="USERUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getUserUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setUserUIN(Integer userUIN); | } | | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853714#3853714 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853714 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - CMR - with composite key
I'm going over this article on CMR http://technology.amis.nl/blog/index.php?p=90&page=3. The following code demonstrates how XDoclet is used to establish relationship between two entity beans: | ... other stuff ... | /** | * | * | * @ejb.interface-method | * | * @ejb.relation | *name="bibliography-may-contain-article | *role-name="BibliographyToArticle | *cascade-delete="yes | *target-cascade-delete="yes | *target-role-name="ArticleToBibliography | *target-ejb="Article | * | * @jboss.target-relation | *related-pk-field="publicationID | *fk-column="publication_id_fk | */ | public abstract ArticleLocal getArticle(); | ... other stuff ... | My question is, "related-pk-field" is a single field primary key, what if my primary key is a composite key? Thanks in advance. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853595#3853595 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853595 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: CMP - composite primary key - @ejb.primkey spec
So, I've implemented a primary key class "GroupMembershipKey" -- I still need to know what I should specify for @ejb.bean primkey-field attribute. My understanding is that @ejb.bean primkey-field is not mandatory. Will it suffice if I just specify @ejb.pk-field on primary key getters? Example: | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="GROUPUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getGroupUIN(); | | NOTE: Same for getUserUIN() | And ... | /** | * | * @ejb.bean | * name="GroupMembershipEJB" | * local-jndi-name="ejb/GroupMembership" | * display-name="Group Membership EJB" | * description="Group Membership Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="GroupMembership" | * reentrant="false" | * primkey-field="???" | * | * @ejb.persistence | * table-name="GROUPMEMBERSHIP" | * | * @ejb.pk | * class="com.aa.samples.primarykeys.GroupMembershipKey" | * | * @ejb.interface | * local-extends="javax.ejb.EJBLocalObject, java.lang.Comparable, java.io.Serializable" | * local-class="com.aa.samples.interfaces.GroupMembershipLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupMembershipLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupMembershipBean implements EntityBean, Serializable, Comparable { | ... | } | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853477#3853477 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853477 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: CMP - composite primary key - @ejb.primkey spec
Think I found part of the answer (Still need to know what XDoclet tags I need to specify) - Quoting J2EE Tutorial from Sun: Chapter: "Primary Keys for Container-Managed Persistence" If the primary key class does not belong to the J2SE or J2EE standard libraries, then you must implement the class and package it along with the entity bean. For example, if your entity bean requires a composite primary key (which is made up of multiple fields), then you need to provide a customized primary key class. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853474#3853474 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853474 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - CMP - composite primary key - @ejb.primkey spec
Hi, I have this GroupMembershipBean which has a composite primary key: 1. database field: GROUPUIN (Integer) getter: Integer getGroupUIN() setter: void setGroupUIN(Integer) 2. database field: USERUIN (Integer) getter: Integer getUserUIN() setter: void setUserUIN(Integer) My question is, what should I specify in @ejb.bean's "primkey-field" attribute? Can I specify "primkey-field" as a comma-delimited string: @ejb.bean | ... | primkey-field "GROUPUIN, USERUIN" (Do I speicfy "database field name here?) | ... | public abstract class GroupMembershipBean implements EntityBean, Serializable, Comparable { | ... | ... | } Then, for GroupUIN and UserUIN getters. specify "@ejb.pk-field" attribute (See code below) If not, do I have to implement a "primary key class" and specify "@ejb.pk class" (corresponds to in "ejb-jar.xml")? Is this a MUST (can I make do without)? | public class GroupMembershipKey implements Serializable { | public Integer GroupUIN; | public Integer UserUIN; | |public GroupMembershipKey() {} | |public GroupMembershipKey(Integer GroupUIN, Integer UserUIN) { | if(GroupUIN==null || UserUIN==null) { throw new Exception(); } | this.GroupUIN=GroupUIN; | this.UserUIN=UserUIN; | return; |} | |public Integer getGroupUIN() { | return GroupUIN; |} | |public Integer getUserUIN() { | return UserUIN; |} | |public boolean equals(Object o) { |GroupMembershipKey key=null; | if(o instanceof GroupMembershipKey) { | key=(GroupMembershipKey) o; |if(GroupUIN.equals(key.getGroupUIN) && UserUIN.equals(key.getUserUIN)) { | return true; | } else { return false; } |} else { | return false; |} |} | |public String toString() { | StringBuffer buf=new StringBuffer("GroupMembershipKey "); | buf.append(" Group UIN: ").append(GroupUIN); | buf.append(" User UIN: ").append(UserUIN); | return buf.toString(); |} | } For reference, here's GroupMembershipBean class: | /** | * | * @ejb.bean | * name="GroupMembershipEJB" | * local-jndi-name="ejb/GroupMembership" | * display-name="Group Membership EJB" | * description="Group Membership Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="GroupMembership" | * reentrant="false" | * primkey-field="???" What should I specify here? | * | * @ejb.persistence | * table-name="GROUPMEMBERSHIP" | * | * @ejb.interface | * local-extends="javax.ejb.EJBLocalObject, java.lang.Comparable, java.io.Serializable" | * local-class="com.aa.samples.interfaces.GroupMembershipLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupMembershipLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupMembershipBean implements EntityBean, Serializable, Comparable { | ... other stuff ... | | /* |* Persistence methods: |*/ | | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="GROUPUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getGroupUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setGroupUIN(Integer groupUIN); | | /** |* @ejb.persistent-field |* @ejb.persistence |*column-name="USERUIN" |*sql-type="INTEGER" |* @ejb.pk-field |* @ejb.interface-method |*/ | public abstract Integer getUserUIN(); | | /** |* @ejb.interface-method |*/ | public abstract void setUserUIN(Integer userUIN); | |... other stuff ... | | } Thanks in advance! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853470#3853470 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853470 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
[JBoss-user] [EJB/JBoss] - Re: hardcoded JNDI names on clientside...
anonymous wrote : This tag is optional, and lets you define whether or not a util class should be generated, and whether to use the logical component name (java:comp/env) or the physical JNDI name to do the lookup. If this tag is not specified, the util class will be generated using logical lookups (provided the subtask is used) | | XDoclet REF: http://xdoclet.sourceforge.net/xdoclet/tags/[EMAIL PROTECTED] | | Applies to: Applies to Entity Beans and Session Beans What's "logical component name"? or "Physical JNDI name"? When I do look up, I do something like this, using JNDI name as specified on "jboss.xml" JNDI-name-to-EJB-name mapping section: | context = new InitialContext(); | Object ref = context.lookup("ejb/UserAuthenticationManager"); //THAT's JNDI name - is there distinction between "Physical" JNDI names and other type of JNDI name? | authManagerHome = (AuthenticationManagerHome)PortableRemoteObject.narrow(ref, AuthenticationManagerHome.class); | authManager=authManagerHome.create(); | Bean: | /** | * | * @ejb.bean name="UserAuthenticationManagerEJB" | * display-name="User Authentication Manager EJB" | * description="User Authentication Manager" | * view-type="remote" | * jndi-name="ejb/UserAuthenticationManager" | * type=stateless | * @ejb.interface | * remote-class="com.aa.samples.interfaces.AuthenticationManager" | * @ejb.home | * remote-class="com.aa.samples.interfaces.AuthenticationManagerHome" | * | */ | public class AuthenticationManagerBean implements SessionBean { | ... | } | My understanding is that jndi-name="ejb/UserAuthenticationManager" gets rendered into "jboss.xml" by XDoclet: | EJB name to JNDI name mapping in "jboss.xml": | | UserAuthenticationManagerEJB | ejb/UserAuthenticationManager | | What's the distincation between: 1. Physical JNDI names 2. other kinds of JNDI names 3. Logical component names Thanks! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853409#3853409 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853409 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - EAR deployment and ScannerThread's
How come everytime I deploy my EAR modules JBoss seems to spend a lot of time before awaking from: | ... | 15:54:44,442 INFO [STDOUT] 394248 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale | 15:54:44,443 INFO [STDOUT] 394248 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale | 15:54:44,444 INFO [STDOUT] 394248 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale | 15:54:44,445 INFO [STDOUT] 394254 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale.converters | 15:54:44,446 INFO [STDOUT] 394254 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale.converters | 15:54:44,447 INFO [STDOUT] 394254 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale.converters | 15:54:44,447 INFO [STDOUT] 394254 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale.converters | 15:54:44,448 INFO [STDOUT] 394254 [ScannerThread] DEBUG org.jboss.mx.loading.ClassLoaderUtils jboss.web.deployment:id=831432746,war=UserManagementWeb.war WebModule - Multiple class loaders found for pkg: org.apache.commons.beanutils.locale.converters | ... | ... and it goes on and on... forever... while life ticks away slowly... | Is there anyway to avoid this? What's "ScannerThread"? It takes so long that I need to restart JBoss in order to redeploy my EAR package. Is there anyway to avoid this? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853405#3853405 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853405 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - hardcoded JNDI names on clientside...
Hi, I have some hardcoded JNDI names on clientside, wish to know if I have alternatives to that. Before going any further: Bean itself | /** | * @ejb.bean | * name="GroupEJB" | * local-jndi-name="ejb/UserGroup" | * display-name="User Group EJB" | * description="User Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="Group" | * reentrant="false" | * primkey-field="UIN" | * | * @ejb.persistence | * table-name="GROUPS" | * | * @ejb.finder | * query="SELECT OBJECT(g) FROM Group AS g" | * signature="java.util.Collection findAllGroups()" | * | * @ejb.interface | * local-extends="javax.ejb.EJBLocalObject, java.lang.Comparable, java.io.Serializable" | * local-class="com.aa.samples.interfaces.GroupLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupBean implements EntityBean, Serializable, Comparable { | ... | ... | } | And on clientside: | groups=(Collection) servlet.getServletContext().getAttribute(constants.AVAILABLE_GROUPS); | if(groups==null) { | home = (GroupLocalHome) context.lookup("ejb/UserGroup"); | groups=home.findAllGroups(); | ... | ... | } | Any suggestion? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853404#3853404 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853404 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc
It worked!!! Did you hear me guys?!! It worked: p6spy capture: | 1098971495056|-1||resultset|SELECT t0_g.UIN FROM GROUPS t0_g|UIN = 1 | 1098971495057|-1||resultset|SELECT t0_g.UIN FROM GROUPS t0_g|UIN = 2 | 1098971495070|11|0|commit|| | 1098971586031|25|0|statement|SELECT t0_g.UIN FROM GROUPS t0_g|SELECT t0_g.UIN FROM GROUPS t0_g | 1098971586032|-1||resultset|SELECT t0_g.UIN FROM GROUPS t0_g|UIN = 1 | 1098971586033|-1||resultset|SELECT t0_g.UIN FROM GROUPS t0_g|UIN = 2 | 1098971586040|6|0|commit|| | Cause of death is that I forgot to include jbosscmp-jdbc.xml in the EJB jar!! Anyway, thankyou guys, thankyou! Appreciate it and really thanks for going over those code fragments I posted in my earlier messages. Thanks!! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853093#3853093 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853093 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc
1. TO Raist: I just made the modification, no and much to my dismay, it's not working unfortunately. | /** | * @author [EMAIL PROTECTED] | * | * @ejb.bean | * name="GroupEJB" | * local-jndi-name="ejb/UserGroup" | * display-name="User Group EJB" | * description="User Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="Group" | * reentrant="false" | * primkey-field="UIN" | * | * @ejb.persistence | * table-name="GROUPS" | * | * @ejb.finder | * query="SELECT OBJECT(g) FROM Group AS g" | * signature="java.util.Collection findAllGroups()" | * | * @ejb.interface | * local-class="com.aa.samples.interfaces.GroupLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupBean implements EntityBean { | ... | ... | } | I'm not sure what it is... nothing is going to the database... 2. TO darranl: 2.1 What is the structure of the jar file? That's a long story, there's: a. EJB jar which contains the EJB implementation as well as META-INF with ejb-jar.xml b. client jar, which includes the interface classes c. WAR, which contains the JSP's, the libraries (ext jars) and the client jar (b). d. EAR, which contains the EJB jar (a) as well as the WAR file (c). I built it with XDoclet - can I send you the stuff by email? Anyway, for your reference - this is part of the documentation: | 7. Packaging Configurations: | 7.1 right click project | 7.2 Add four archives: | 7.2.1 UserManagementEJB.jar | a. add folder: WEB-INF/classes | include: com/aa/samples/*.class, com/aa/samples/beans/*.class, com/aa/samples/interfaces/*.class | b. add file: META-INF/ejb-jar.xml, prefix: META-INF | c. add file: META-INF/jboss.xml, prefix: META-INF | 7.2.2 UserManagementClient.jar | a. add folder: WEB-INF/classes | include: com/aa/samples/interfaces/*.class | b. add file: META-INF/ejb-jar.xml, prefix: META-INF | c. add file: META-INF/jboss.xml, prefix: META-INF | 7.2.3 UserManagementWeb.war (NOTE: The name of this file must corresponds to that in META-INF/application.xml) | a. add folder: WEB-INF | include: *.xml,*.tld | prefix: WEB-INF | b. add folder: pages | prefix: pages | c. add folder: WEB-INF/classes/resources (this would include the properties files) | include: *.* | set prefix: WEB-INF/classes/resources | d. add folder: WEB-INF/classes | set prefix: WEB-INF/classes | include: com/aa/samples/actions/*.class, com/aa/samples/forms/*.class | e. add folder: WEB-INF/lib, prefix: WEB-INF/lib | f. add file: AuthenticationManagerClient.jar, prefix: WEB-INF/lib | 7.2.4 UserManagement.ear (NOTE: The name of this file must corresponds to that in META-INF/application.xml) | a. add f
[JBoss-user] [EJB/JBoss] - Re: CMP - failed to retrieve data from database - but NO exc
1. TO Raist: I just made the modification, no and much to my dismay, it's not working unfortunately. | /** | * @author [EMAIL PROTECTED] | * | * @ejb.bean | * name="GroupEJB" | * local-jndi-name="ejb/UserGroup" | * display-name="User Group EJB" | * description="User Group EJB" | * cmp-version="2.x" | * type="CMP" | * view-type="local" | * schema="Group" | * reentrant="false" | * primkey-field="UIN" | * | * @ejb.persistence | * table-name="GROUPS" | * | * @ejb.finder | * query="SELECT OBJECT(g) FROM Group AS g" | * signature="java.util.Collection findAllGroups()" | * | * @ejb.interface | * local-class="com.aa.samples.interfaces.GroupLocal" | * | * @ejb.home | * local-class="com.aa.samples.interfaces.GroupLocalHome" | * | * @jboss.persistence | * datasource="java:/jdbc/dev01" | * datasource-mapping="mySQL" | * create-table="false" | * remove-table="false" | */ | public abstract class GroupBean implements EntityBean { | ... | ... | } | I'm not sure what it is... nothing is going to the database... 2. TO darranl: 2.1 What is the structure of the jar file? That's a long story, there's: a. EJB jar which contains the EJB implementation as well as META-INF with ejb-jar.xml b. client jar, which includes the interface classes c. WAR, which contains the JSP's, the libraries (ext jars) and the client jar (b). d. EAR, which contains the EJB jar (a) as well as the WAR file (c). I built it with XDoclet - can I send you the stuff by email? Anyway, for your reference - this is part of the documentation: | 7. Packaging Configurations: | 7.1 right click project | 7.2 Add four archives: | 7.2.1 UserManagementEJB.jar | a. add folder: WEB-INF/classes | include: com/aa/samples/*.class, com/aa/samples/beans/*.class, com/aa/samples/interfaces/*.class | b. add file: META-INF/ejb-jar.xml, prefix: META-INF | c. add file: META-INF/jboss.xml, prefix: META-INF | 7.2.2 UserManagementClient.jar | a. add folder: WEB-INF/classes | include: com/aa/samples/interfaces/*.class | b. add file: META-INF/ejb-jar.xml, prefix: META-INF | c. add file: META-INF/jboss.xml, prefix: META-INF | 7.2.3 UserManagementWeb.war (NOTE: The name of this file must corresponds to that in META-INF/application.xml) | a. add folder: WEB-INF | include: *.xml,*.tld | prefix: WEB-INF | b. add folder: pages | prefix: pages | c. add folder: WEB-INF/classes/resources (this would include the properties files) | include: *.* | set prefix: WEB-INF/classes/resources | d. add folder: WEB-INF/classes | set prefix: WEB-INF/classes | include: com/aa/samples/actions/*.class, com/aa/samples/forms/*.class | e. add folder: WEB-INF/lib, prefix: WEB-INF/lib | f. add file: AuthenticationManagerClient.jar, prefix: WEB-INF/lib | 7.2.4 UserManagement.ear (NOTE: The name of this file must corresponds to that in META-INF/application.xml) | a. add f