[JBoss-user] [Persistence CMP/JBoss] - how to implement bidirectional NxM CMR within subclassed ent
Hi! I'm trying to use inheritance within entity beans. The superclass defines a set of CMR methods which should be used in the subclass without the need to declare them in the subclasses again. 1xN relations don't make any trouble i think, but NxM relations will do. To make my problem a little more concrete: I have a entity bean called DeviceBean and to subclasses FTPDeviceBean and FTAMDeviceBean. Each subclass has a set of additional attributes. All entity beans are mapped in different tables. All entries have a unique id (Integer) which is unique within all device tables. Next, the DeviceBean defines a bidirectional relation to a PollingCycleBean which will be mapped in a relation table. (I hope may bad ASCII arts makes my problem clear :) DeviceBean n--m PolingCycleBean |-- FTPDeviceBean ---^ should also use relation |-- FTAMDeviceBean -^ should also use relation Relation table: __ |device_id (pk)| pc_id (pk)| __ To use the relation in my subclasses I have to declare the relation in the ejb-jar.xml for each subclass with a unique name. But next step will make trouble i think. Associating a FTP-device with a new polling cycle will add an entry to the relation table. But can the container make an inverse lookup and return the associated devices (FTP- and FTAM-devices) which are stored in different tables ? Can I use bidirectional NxM CMR in subclasses with JBoss 3.2 ? Thanks a lot for bringing some more light in my understanding of the abilities of CMR. Regards, Marcel View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842505#3842505 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842505 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Strange sql query generated from findAll ejbQL.
i had the same problem, by using jboss 3.2.5 the sql statements looks a bit better. but i have still a problem, every getMethod make one SQL-query. if you have a solution, please tell me. maybe these threads help you: http://www.jboss.org/index.html?module=bbop=viewtopict=51810 http://www.jboss.org/index.html?module=bbop=viewtopict=52043 View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842506#3842506 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842506 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: findAll and Collection result optimization
I'm still playing tester for the CMP lazy mode using JBoss 3.2.6rc1. I used a very simple test query : query-method method-namefindAll/method-name method-params / /query-method jboss-ql![CDATA[SELECT OBJECT(a) FROM Applica a]]/jboss-ql lazy-resultset-loadingtrue/lazy-resultset-loading I get the following exception when I try to parse the first element retrieved using a Collection Iterator : javax.ejb.FinderException: Find failed: java.sql.SQLException: Syntax error or access violation, message from server: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count(t0_a.IDAPPLICA) FROM applica t0_a), t0_a.IDAPP. Thanks for helping me solving this issue. Chris View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842507#3842507 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842507 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: NPE in beginLoadTask when redeploying ear on 3.2.4
This error occurs in 3.2.5 as well. If all sessions are removed or invalidated prior to redeployment, the error goes away. It would appear this only occurs on the basis of active sessions. This is a bug. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842508#3842508 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842508 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - EJB Struts and tiles
Hi, I try to develop an application with struts and EJB. But in Browser I can't display my JSP-pages : I have simply a empty page, with no error message I think, the problem is with my version of JSP I know, Jboss can interprate JSP 1.2 but not JSP 2.0, but I don't know how to change that in my JSP pages can everyone help me? Thanks Antinous View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842511#3842511 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842511 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: JMS Receive method Issue
I updated Wiki examples with latest changes in 3.2.4 http://www.jboss.org/wiki/Wiki.jsp?page=JmsReceiverBean Regards, Stephane View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842512#3842512 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842512 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Installation Configuration] - Re: How do I specify dependency order?
After following the Wiki trail a little more I see where you were going with your tip now. Thank you. Much appreciated. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842513#3842513 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842513 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: EJB Struts and tiles
Hi, Look for server errors specifically. Just to be sure, you should also be able to deploy and use one of the sample application provided with your struts release. More struts specifically, if you use struts taglibs in your JSPs check if you have added struts-html.tld at correct path. If you use forms in your JSPs, put action attribute in form tag and check it matches the same entry in your struts-config file (check your action mapping is correct). Chris View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842514#3842514 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842514 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - loosing nanoseconds in timestamp after ejbStore
Hi all, I have a problem with storing sql.Timestamp fields. Every time after an ejbStore() the nanoseconds are thrown away for ever. Im using jboss 3.2.3 and a mysql 4 db. There are no additional mappings made - only using jboss default mappings. Can someone explain me this behavior ? Thanks in advance. Greets, Marcel | /** |* @see javax.ejb.EntityBean#ejbLoad() |*/ | public void ejbLoad() throws EJBException, RemoteException { | log.debug(ejbLoad(): converting values.); | Timestamp adate = getSQLActivationDate(); | Timestamp edate = getSQLExpirationDate(); | if (adate != null edate != null) { | log.debug(adate = + adate.getTime() + nanos: + adate.getNanos()); | log.debug(edate = + edate.getTime() + nanos: + adate.getNanos()); | } | activationDate = convertSQLTimeStampToCalendar(adate); | expirationDate = convertSQLTimeStampToCalendar(edate); | | if (activationDate != null expirationDate != null) { | log.debug(activationDate = + activationDate.getTimeInMillis()); | log.debug(expirationDate = + expirationDate.getTimeInMillis()); | } | } | | /** |* @see javax.ejb.EntityBean#ejbStore() |*/ | public void ejbStore() throws EJBException, RemoteException { | log.debug(ejbStore(): converting values.); | if (activationDate != null expirationDate != null) { | log.debug(activationDate = + activationDate.getTimeInMillis()); | log.debug(expirationDate = + expirationDate.getTimeInMillis()); | } | Timestamp adate = convertCalendarToSQLTimeStamp(activationDate); | Timestamp edate = convertCalendarToSQLTimeStamp(expirationDate); | setSQLActivationDate(adate); | setSQLExpirationDate(edate); | if (adate != null edate != null) { | log.debug(adate = + adate.getTime()); | log.debug(edate = + edate.getTime()); | } | } | ... | | private Calendar convertSQLTimeStampToCalendar(Timestamp t) { | Calendar date = null; | if (t != null) { | date = Calendar.getInstance(); | date.setTimeInMillis(t.getTime() + t.getNanos() / 100); | } | return date; | } | | private Timestamp convertCalendarToSQLTimeStamp(Calendar c) { | Timestamp t = null; | if (c != null) { | t = new Timestamp(c.getTimeInMillis()); | } | return t; | } | output: | 21:48:59,396 DEBUG [PollingCycleBean:534] ejbStore(): converting values. | 21:48:59,406 DEBUG [PollingCycleBean:536] activationDate = 1086295664847 | 21:48:59,406 DEBUG [PollingCycleBean:537] expirationDate = 1117831664847 | 21:48:59,626 DEBUG [PollingCycleBean:544] adate = 1086295664847 | 21:48:59,626 DEBUG [PollingCycleBean:545] edate = 1117831664847 | 21:49:04,453 DEBUG [PollingCycleBean:514] ejbLoad(): converting values. | 21:49:04,453 DEBUG [PollingCycleBean:518] adate = 1086295664000nanos: 0 | 21:49:04,453 DEBUG [PollingCycleBean:519] edate = 1117831664000nanos: 0 | 21:49:04,453 DEBUG [PollingCycleBean:525] activationDate = 1086295664000 | 21:49:04,453 DEBUG [PollingCycleBean:526] expirationDate = 1117831664000 | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842515#3842515 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842515 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: Strange sql query generated from findAll ejbQL.
Try running your code inside a transaction. Joachim View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842516#3842516 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842516 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: loosing nanoseconds in timestamp after ejbStore
Are you sure MySQL actually stores the milliseconds? Not all database do (and I don't know enough about MySQL). Joachim View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842517#3842517 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842517 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Re: loosing nanoseconds in timestamp after ejbStore
arg. TIMESTAMP(14) = MMDDHHMMSS is the maximum. There is definitly no support for milliseconds. Thanks for that hint! Greets, Marcel View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842518#3842518 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842518 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence CMP/JBoss] - Entity Beans -- DOM / XML
Is there a way to convert a structure of entity beans to an xml file or to a DOM structure? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842519#3842519 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842519 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Nukes User] - WYSWIG Editing
How do you incorporate Kupo into the stand-alone Nukes build? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3842523#3842523 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3842523 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user