Re: [JBoss-user] Application architecture question
Eric: The reports update view on fixed interval or they are triggered by an event based on change/trade? -Asif - Original Message - From: "Eric Kaplan" <[EMAIL PROTECTED]> To: "Jboss-User" <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 1:25 PM Subject: [JBoss-user] Application architecture question > All > > We currently have a J2EE application as follows. The application is a > portfolio management reporting system. The client is a fairly heavyweight > swing client that loads a bunch of data via ejbs (session facades) and then > generates fairly complex reports on the front-end. All of the reports are > live. As data changes, either because prices change with some market data > feed or trades are done and updates are sent through the app server, the > reports recalculate and the views change to reflect these changes. We want > to lighten up the client and move the data load and report generation off of > the client. The issue we have is where should these live reports reside. > Should we make this "report server" simply another J2EE application not > residing in the ejb tier but rather itself hanging off of the app server, > possibly still managed via jmx? Does it make sense to make these reports > themselves beans? and if so, what form of bean? they are fairly complex and > the generated report is not persisted, though it may be shared in the case > of a report based off of a report definition that is publicly readable. > They are also asynchronous in that they respond to updates, suggesting an > MDB if anything, but using ejbs while theoretically nice in that these are > shared objects the view on which needs to be kept up to date across a number > of clients might be like using a sledgehammer to break an egg... Right now, > our implementation has these running on a separate instance of a jvm on the > client tier, accessed via JMS DOF (Distributed Object Framework) which is on > sourceforge and actually works quite nicely. If running on the server is > the answer but not as beans, then what? If as beans, why beyond > theoretically they are shared "components". At a glance, it would seem that > the container should be the right place for managing these, we certainly > don't want to rewrite ejb. By this logic, any object that is potentially > shared should live as a bean, but where does it end? The other thing is, > rewriting the report objects as beans could be substantial effort and it's > unclear it would be worth it. > > I'd appreciate thoughts on this, religion aside. > > Regards > > Eric > > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JBossQL problem
All: Well I am not sure about other databases but Oracle and Mysql both do not require the Column to be in the select list if you want to order by that. I just ran test on both Oracle 8i and Mysql 3.23.51 version both work fine if the order by column is not in the select statement. -Asif Rafiq Ahmed - Original Message - From: "Dain Sundstrom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 29, 2002 8:07 PM Subject: Re: [JBoss-user] JBossQL problem > That is super lame. Just another reason Oracle sucks. Can one of you > post a feature request for this and I'll add support for > order-must-be-in-select for 4.0. > > -dain > > Stephen Coy wrote: > > I know exactly what is happening here. > > > > Some databases, Oracle for one, insist that columns in an ORDER BY > > clause also appear in the SELECT clause. > > > > JBossQL generates queries like: > > > > SELECT pk FROM MyEntity WHERE [predicate] ORDER BY someOtherColumn > > > > Oracle, for instance, insists upon: > > > > SELECT pk, someOtherColumn FROM mytable WHERE [predicate] ORDER BY > > someOtherColumn > > > > I've worked around this by using load-groups and an on-find strategy: > > > > > > > > myloadgroup > >someOtherColumn > > > > > > > > > > > >ejbSelectInSequence > > > > > > > > SELECT DISTINCT OBJECT(s) FROM MyEntity AS s ORDER > > BY s. someOtherColumn ASC > > > > on-find > > 16 > > myloadgroup > > > > > > > > > > But it sure would be neater if JBoss could automatically include ORDER > > BY columns in the SELECT clause. > > > > > > On Tuesday, July 30, 2002, at 08:06 AM, Dain Sundstrom wrote: > > > >> JbossCMP only needs to load the primary key columns, and it does not > >> think lname is a pk column. You either have the pk fields > >> misconfigured or the custom pk class is not written correctly. > >> > >> -dain > >> > >> Greg Turner wrote: > >> > >>> In JBoss 3.0, I have a JBoss query: > >>> > >>> > >>> > >>> This query fails because the SQL that is executed is only selecting on > >>> customer.id, not both customer.id and customer.lname. > >>> How can I make it select on the required fields? > >>> Thanks > >>> Greg > >> > > > > > > > > --- > > This sf.net email is sponsored by: Dice - The leading online job board > > for high-tech professionals. Search and apply for tech jobs today! > > http://seeker.dice.com/seeker.epl?rel_code=31 > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > -- > > Dain Sundstrom > Chief Architect JBossCMP > JBoss Group, LLC > > > > > --- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > --- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Howto handle Alternate keys in EJB 2.0 CMP
All: Has anybody an Idea how to handle the Alternate keys elegantly as the Primary Keys are handles in ejb2.0. What is an elegant solution to handle alternate keys in ejb2.0 using cmp. When I set a CMP field which represents an alternate key to a already existing value I get javax.ejb.EJBException which has source exception of java.sql.SQLException which can be any db error. I would appreciate an Idea or even an Hint. Thanks in Advance, -Asif Rafiq Ahmed
Re: [JBoss-user] CMR...
S. Chausson Are you using Remote Interface when you are calling myElement.setPerson(myPerson). The CMRs' only work with local interfaces, either pass a local reference or map your remote to local with in the myElement.setPerson. I hope this helps. -Asif Rafiq Ahmed - Original Message - From: Sebastien CHAUSSON To: [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 4:17 AM Subject: [JBoss-user] CMR... Hi, I'm trying to populate the jboss default DB (Hypersonic) using CMR but it doesn't work (I use JBoss 3.0): I have 2 entity bean (Person and Element) which have a relationship 'one-to-many' unidirectionnal. When I deploy my component in jboss, it automatically create 2 tables in the DB : Element (with a relation column) and Person => OK When I create a Person entity, jboss just add it in the Person table => OK When I create an Element entity, jboss just add it in the Element table (leaving relation column at 'null').=> OK (I didn't chose to pass a 'Person' directly in the ejbCreate() method of the Element entity bean, but just to have setPerson() and getPerson() methods) But when I call myElement.setPerson(myPerson), I get this error message : [java] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:[java] java.rmi.ServerException: null; CausedByException is:[java] $Proxy82; nested exception is:[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] java.rmi.ServerException: null; CausedByException is:[java] $Proxy82; nested exception is:[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)[java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)[java] at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)[java] at $Proxy8.setPerson(Unknown Source)[java] at DataPopulate.createElements(DataPopulate.java:397) [java] at DataPopulate.main(DataPopulate.java:45)[java] java.lang.ClassCastException: $Proxy82[java] <>[java] Could anyone explain to me whats wrong? Thanks for any advice. S. Chausson
Reply: [JBoss-user] ERROR [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
Did any body find a solution to this problem. I am having a similar problem!. -Asif R. Ahmed Hi,When I run the test suite on reasonably recent CVS checkout of Branch_3_0 (builds an RC4) I see a few instances of stateful session bean activation failures like the log extract shown below. As far as I can tell, this bean was never passivated, yet for some reason JBoss is trying to activate it.I am also seeing similar behaviour in some of my own code. It always occurs in the context of some kind of failure when one of the bean methods is invoked - I expect to see an exception thrown. Instead, I get this mysterious activation attempt on the bean that has never been passivated.This does not look quite right does it?2002-05-28 23:11:22,124 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.setSessionContext(org.jboss.ejb.StatefulSessionEnterpriseContext$StatefulSessionContextImpl@75b454) called2002-05-28 23:11:22,125 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.ejbCreate(marc3) called2002-05-28 23:11:22,134 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.callBusinessMethodA() called2002-05-28 23:11:22,166 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.setSessionContext(org.jboss.ejb.StatefulSessionEnterpriseContext$StatefulSessionContextImpl@394c2d) called2002-05-28 23:11:22,175 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.ejbRemove() called2002-05-28 23:11:22,181 DEBUG [org.jboss.test.testbean.bean.StatefulSessionBean] StatefulSessionBean.setSessionContext(org.jboss.ejb.StatefulSessionEnterpriseContext$StatefulSessionContextImpl@15f19a) called2002-05-28 23:11:22,182 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@28d7de2002-05-28 23:11:22,182 ERROR [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failurejava.rmi.ServerException: Could not activate; nested exception is: java.io.FileNotFoundException: /Users/steve/EnterpriseJava/jboss-all/build/output/jboss-3.0.0RC4/server/default/db/sessions/nextgen.StatefulSession/1022589642358.ser (No such file or directory)java.io.FileNotFoundException: /Users/steve/EnterpriseJava/jboss-all/build/output/jboss-3.0.0RC4/server/default/db/sessions/nextgen.StatefulSession/1022589642358.ser (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:64) at java.io.FileInputStream.(FileInputStream.java:95) at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:222) at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:83) at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:177) at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166) at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380) at org.jboss.ejb.Container.invoke(Container.java:705) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362) 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:465) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706) at java.lang.Thread.run(Thread.java:496)