findByPrimaryKey() calling store()
dear all,i have a jsp that calls findByPrimaryKey on an entity bean.the data that the bean represents exists in the database.it seems like ejbStore is being called as a result of callingfindByPrimaryKey.also, once i have a reference to the bean, calling an accessormethod on it also seems to cause ejbStore to be called.is there something i can set to prevent the bean beingupdated when there is no (apparent?) need, or am i missing something? thanks,greg.// as a result of findByPrimaryKeySELECT id FROM sales_order WHERE id = 5UPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN// as a result of calling order.getNotes( ), an EJB method// that does not access the databaseUPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN
RE: Please help! I get null pointer exception after calling createonan EB with EJB 2.0 CMP Orion 1.3.8...
I took a quick look through and noticed one thing which looks strange. I believe that when you use a primary key class for a compound key, you should *not* make the key class a cmp member of the EJB. Rather, the EJB needs to have cmp fields which are named the same as the public fields in the primary key class. The container figures out how to map it all out. Take a look at section 9.10.1.2 of the spec. I'm pretty sure this is your problem. I seem to remember one of the Orion guys mentioning that any less-than-stellar error messages should be considered bugs to be logged in bugzilla :-) Good luck, Jeff -Original Message- From: Jim Archer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 1:54 PM To: Orion-Interest Cc: Jeff Schnitzer Subject: RE: Please help! I get null pointer exception after calling createonan EB with EJB 2.0 CMP Orion 1.3.8... OK, here is the code and deployment descriptor. I apologize that there is a lot here, but I have included one entity bean, a session bean that creates this entity bean, and the deployment descriptor. Eventually I am planning to move all the address information into a dependant object, but heck, I have to get create working first ;-) Thanks VERY much! Jim // CrHome.java package com.regtek.eb20; import java.rmi.RemoteException; import java.util.*; import javax.ejb.CreateException; import javax.ejb.EJBHome; import javax.ejb.FinderException; import com.regtek.types.RegnetCR; import com.regtek.types.RegnetTag; public interface CrHome extends EJBHome { Cr create() throws CreateException, RemoteException; Cr create(RegnetCR cr) throws CreateException, RemoteException; Cr findByPrimaryKey(RegnetTag primaryKey) throws FinderException, RemoteException; Collection findByLastname(String lastname) throws FinderException, RemoteException; Collection findByFullName(String lastname, String firstname) throws FinderException, RemoteException; Collection findByEmail(String email) throws FinderException, RemoteException; Collection findByPhone(String phone) throws FinderException, RemoteException; Collection findAll() throws FinderException, RemoteException; } // - --- // CrEJB.java // Cr EJB 2.0 Entity Bean package com.regtek.eb20; import java.rmi.RemoteException; import java.sql.*; import java.util.Enumeration; import java.util.Vector; import java.util.Date; import javax.ejb.*; import javax.naming.*; import javax.sql.DataSource; import javax.transaction.*; import com.regtek.types.RegnetCR; import com.regtek.types.RegnetTag; public abstract class CrEJB implements EntityBean { protected EntityContext ejbContext; public void setEntityContext(EntityContext ctx) { ejbContext = ctx; } public void unsetEntityContext() { ejbContext = null; } public void ejbRemove() throws RemoveException { } public void ejbLoad() { } public void ejbStore() { } public void ejbPostCreate() throws CreateException { } //public void ejbPostCreate(RegnetTag tag) throws CreateException { //} public void ejbPostCreate(RegnetCR cr) throws CreateException { } // public RegnetTag ejbCreate() { trace("ejbCreate() entered"); initToNull(); trace("ejbCreate() entered"); // In CMP, should return null. return null; } // public RegnetTag ejbCreate(RegnetCR cr) throws CreateException { trace("ejbCreate(RegnetCR cr) entered"); initToNull(); if(cr == null) return null; setTag(cr.getTag()); setLastName(cr.getLastName()); setFirstName(cr.getFirstName()); setMiddleInitial(cr.getMiddleInitial()); setAddr1(cr.getAddr1()); setAddr2(cr.getAddr2()); setAddr3(cr.getAddr3()); setCity(cr.getCity()); setState(cr.getState()); setPostalCode(cr.getPostalCode()); setCountryCode(cr.getCountryCode()); setPhone(cr.getPhone()); setFax(cr.getFax()); setEmail(cr.getEmail()); Date now = new Date(); setDateAdded(now); setDateLastMod(now); trace("ejbCreate(RegnetCR cr) exiting"); // In CMP, should return null. return null; } // public void ejbPassivate() {} public void ejbActivate() {}
RE: Please help! I get null pointer exception after callingcreateonan EB with EJB 2.0 CMP Orion 1.3.8...
Hi Jeff! Thanks alot! I see I'm not the only one up at 4:00AM! I really, really appreciate your help with this. I'll look at that right away. In the meantime, I solved the problem minutes before your email arrived. Apparently, Orion does not like for the create() method on the bean class to not set a value for the primary key. I was leaving them set to null, which was causing the NPE. I replicated this in a small, simple sample that does nothing more than have a servlet create an entity bean (in EJB 2.0, of course). Anyhow, I don't know what the scoop on this is. I'm going to review the spec, since I thought that was legal behavior. Then again, anything seels legal at 4:00AM!!! Thanks again!! I'll let you know what I figure out. Jim --On Wednesday, October 18, 2000 1:16 AM -0700 Jeff Schnitzer [EMAIL PROTECTED] wrote: I took a quick look through and noticed one thing which looks strange. I believe that when you use a primary key class for a compound key, you should *not* make the key class a cmp member of the EJB. Rather, the EJB needs to have cmp fields which are named the same as the public fields in the primary key class. The container figures out how to map it all out. Take a look at section 9.10.1.2 of the spec. I'm pretty sure this is your problem. I seem to remember one of the Orion guys mentioning that any less-than-stellar error messages should be considered bugs to be logged in bugzilla :-) Good luck, Jeff -Original Message- From: Jim Archer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 1:54 PM To: Orion-Interest Cc: Jeff Schnitzer Subject: RE: Please help! I get null pointer exception after calling createonan EB with EJB 2.0 CMP Orion 1.3.8... OK, here is the code and deployment descriptor. I apologize that there is a lot here, but I have included one entity bean, a session bean that creates this entity bean, and the deployment descriptor. Eventually I am planning to move all the address information into a dependant object, but heck, I have to get create working first ;-) Thanks VERY much! Jim // CrHome.java package com.regtek.eb20; import java.rmi.RemoteException; import java.util.*; import javax.ejb.CreateException; import javax.ejb.EJBHome; import javax.ejb.FinderException; import com.regtek.types.RegnetCR; import com.regtek.types.RegnetTag; public interface CrHome extends EJBHome { Cr create() throws CreateException, RemoteException; Cr create(RegnetCR cr) throws CreateException, RemoteException; Cr findByPrimaryKey(RegnetTag primaryKey) throws FinderException, RemoteException; Collection findByLastname(String lastname) throws FinderException, RemoteException; Collection findByFullName(String lastname, String firstname) throws FinderException, RemoteException; Collection findByEmail(String email) throws FinderException, RemoteException; Collection findByPhone(String phone) throws FinderException, RemoteException; Collection findAll() throws FinderException, RemoteException; } // - --- // CrEJB.java // Cr EJB 2.0 Entity Bean package com.regtek.eb20; import java.rmi.RemoteException; import java.sql.*; import java.util.Enumeration; import java.util.Vector; import java.util.Date; import javax.ejb.*; import javax.naming.*; import javax.sql.DataSource; import javax.transaction.*; import com.regtek.types.RegnetCR; import com.regtek.types.RegnetTag; public abstract class CrEJB implements EntityBean { protected EntityContext ejbContext; public void setEntityContext(EntityContext ctx) { ejbContext = ctx; } public void unsetEntityContext() { ejbContext = null; } public void ejbRemove() throws RemoveException { } public void ejbLoad() { } public void ejbStore() { } public void ejbPostCreate() throws CreateException { } //public void ejbPostCreate(RegnetTag tag) throws CreateException { //} public void ejbPostCreate(RegnetCR cr) throws CreateException { } // public RegnetTag ejbCreate() { trace("ejbCreate() entered"); initToNull(); trace("ejbCreate() entered"); // In CMP, should return null. return null; } // public RegnetTag ejbCreate(RegnetCR cr) throws CreateException { trace("ejbCreate(RegnetCR cr) entered"); initToNull(); if(cr == null) return null; setTag(cr.getTag()); setLastName(cr.getLastName());
JSP-Compiled Servlets ??
hi all, Weknow that JSP are compiled into servlets. In Jrun, I canview the equivalent servlet source code for the JSP. ButOrion doesnt seem to provide the source as well as class file. All it creates is a binary jsp.Cache file. But my job is to get into the code and see how the servlet is getting written and compare with servlets generated thru other jsp-engines. What do i do? Regards, Santosh Santosh Kumar C == Senior Systems Engineer == Wipro Technologies == 1-8-448, Laxmi Building, S.P. Road, == Begumpet, Secunderabad - 500 003 == A.P, India. == Phone@: 91407896008 Ext 4511 == Fax @: 91407896123 == eMail@: [EMAIL PROTECTED] == url @: http://www.wipro.com == The World's First SEI CMM Level 5 Software Services Company
ejbtags.jar createBean is broken
Is anyone using the ejbtags.jar kindly provided by the Orion team? I must imagine not, because createBean doesn't work without modifying the source :-) The problem is that the UseTEI variable is set to AT_BEGIN rather than AT_END, where it needs to be for the createBean tag in the useBean body to work. Are there any references to the tag libraries on the Orion site? I searched and searched but I couldn't find a link. I had to dig up a link to the correct page from one of the reviews on theserverside.com, which I only just barely remembered seeing. For anyone else who was as confused as I was, the link is http://www.orionserver.com/tags/ejbtags/ http://www.orionserver.com/tags/ejbtags/ Since I'm on the subject of taglibs, has anyone else noticed that the taglib api feels like it was designed in a big hurry? It's really akward compared to the rest of the J2EE spec. What's up with these TEI classes? Shouldn't that information be in the deployment descriptor? And why do we need *yet another* file extension for xml files, or does someone just have a grudge against automatic syntax coloring?!? G... aside from all that, thanks Magnus for the taglibs tutorial, it's *much* more useful than the chapter in the Wrox JSP book. Jeff Schnitzer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Re: findByPrimaryKey() calling store()
Hi Greg... According to Orion1.4.0's changes.txt it said: Optimized CMP entity stores to only store updated fields. I am not 100% sure what it means though..maybe it is what u are after... James. Greg Matthews wrote: dear all, i have a jsp that calls findByPrimaryKey on an entity bean. the data that the bean represents exists in the database. it seems like ejbStore is being called as a result of calling findByPrimaryKey. also, once i have a reference to the bean, calling an accessor method on it also seems to cause ejbStore to be called. is there something i can set to prevent the bean being updated when there is no (apparent?) need, or am i missing something? thanks, greg. // as a result of findByPrimaryKey SELECT id FROM sales_order WHERE id = 5 UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN // as a result of calling order.getNotes( ), an EJB method // that does not access the database UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN
ejbtags.jar createBean is broken
Is anyone using the ejbtags.jar kindly provided by the Orion team? I must imagine not, because createBean doesn't work without modifying the source :-) The problem is that the UseTEI variable is set to AT_BEGIN rather than AT_END, where it needs to be for the createBean tag in the useBean body to work. Are there any references to the tag libraries on the Orion site? I searched and searched but I couldn't find a link. I had to dig up a link to the correct page from one of the reviews on theserverside.com, which I only just barely remembered seeing. For anyone else who was as confused as I was, the link is http://www.orionserver.com/tags/ejbtags/ http://www.orionserver.com/tags/ejbtags/ Since I'm on the subject of taglibs, has anyone else noticed that the taglib api feels like it was designed in a big hurry? It's really akward compared to the rest of the J2EE spec. What's up with these TEI classes? Shouldn't that information be in the deployment descriptor? And why do we need *yet another* file extension for xml files, or does someone just have a grudge against automatic syntax coloring?!? G... aside from all that, thanks Magnus for the taglibs tutorial, it's *much* more useful than the chapter in the Wrox JSP book. Jeff Schnitzer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Sharing Session Type Information
Hello All, I'm hoping somebody can help with this question. I've searched the list and have found several references to this problem but none that appear to work in my case. Here is the problem. I have multiple domains that all are part of the same network, including one domain that acts as my secure server, and I would like to share session information (or session type information, mainly username and a shopping cart) between them. Here is an example: www.domain1.com www.domain2.com www.domain3.com secure.domain4.com Between all the domains I want to share a username and whether or that current user is logged in for this session. I also need domains 1,2,3 to share a shopping cart with secure.domain4.com, but not with each other. Right now I have Orion configured where each domain essentially has it's own default application. I tried to setup a common default application for all of them, then use the share="true" tag, but all the domains come up to the default application root rather then the domain application required. To be honest, I'm not sure how to set it up so that a domain goes to a particular root while still having a common default application. If I knew this, the "share= true" tag might work. Maybe this is all I need to do what I want although from what I read, I'm not sure this is true. If anybody has any good ideas or a bona-fide solution, I would be extremely grateful! Thanks in advance! Respectfully, Jaymes H. Sorbel
How to know which changes have been done on each new orionserver version?
When there is a new version, how could I know which changes have been done ?
Re: JBuilder + Orion
John D'Ausilio wrote: Can't say for sure if Jbuilder debugging works, but I've had good luck (and just slight flakiness) using Forte and JPDA to debug .. I used the NetBeans notes in the FAQ to set it up, and had no major problems This was posted a while ago by Chris Miller: I have managed to get this working by doing the following: - Adding orion.jar and ejb.jar to the required libraries of the project properties 'paths' tab. - Setting the main class to 'com.evermind.server.ApplicationServer' and the VM parameters to '-Duser.dir=c:\orion' on the 'run' tab. -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
RE: JSP-Compiled Servlets ??
you can see the generated sources by setting "development=true" in one of the config files (I think either server.xml or global-web-application.xml). -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Santosh KumarSent: Wednesday, October 18, 2000 10:49To: Orion-InterestSubject: JSP-Compiled Servlets ?? hi all, Weknow that JSP are compiled into servlets. In Jrun, I canview the equivalent servlet source code for the JSP. ButOrion doesnt seem to provide the source as well as class file. All it creates is a binary jsp.Cache file. But my job is to get into the code and see how the servlet is getting written and compare with servlets generated thru other jsp-engines. What do i do? Regards, Santosh Santosh Kumar C == Senior Systems Engineer == Wipro Technologies == 1-8-448, Laxmi Building, S.P. Road, == Begumpet, Secunderabad - 500 003 == A.P, India. == Phone@: 91407896008 Ext 4511 == Fax @: 91407896123 == eMail@: [EMAIL PROTECTED] == url @: http://www.wipro.com == The World's First SEI CMM Level 5 Software Services Company
RE: JBuilder + Orion
And for what it's worth, setting up JProbe to run Orion is about as simple... Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sven van 't Veer Sent: Wednesday, October 18, 2000 7:22 AM To: Orion-Interest Subject: Re: JBuilder + Orion John D'Ausilio wrote: Can't say for sure if Jbuilder debugging works, but I've had good luck (and just slight flakiness) using Forte and JPDA to debug .. I used the NetBeans notes in the FAQ to set it up, and had no major problems This was posted a while ago by Chris Miller: I have managed to get this working by doing the following: - Adding orion.jar and ejb.jar to the required libraries of the project properties 'paths' tab. - Setting the main class to 'com.evermind.server.ApplicationServer' and the VM parameters to '-Duser.dir=c:\orion' on the 'run' tab. -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
Where are step-by-steps for servlet configuration and deployment?
Hello, Can anyone point me to the doc's or readme that explains how to configure a brand new servlet directory and deploy the servlet code? Thanks, Keith
RE: JSP-Compiled Servlets ??
You can also set the source path in orion-web.xml so you know where Orion puts the sources. the tag below is a good place to start. orion-web-app deployment-version="1.4.0" persistence-path="/persist" jsp-cache-directory="./persistence" temporary-directory="./temp" servlet-webdir="/servlet/" development = "true" source-directory="/source" HTH -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of J.T. WentingSent: Wednesday, October 18, 2000 6:43 AMTo: Orion-InterestSubject: RE: JSP-Compiled Servlets ?? you can see the generated sources by setting "development=true" in one of the config files (I think either server.xml or global-web-application.xml). -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Santosh KumarSent: Wednesday, October 18, 2000 10:49To: Orion-InterestSubject: JSP-Compiled Servlets ?? hi all, Weknow that JSP are compiled into servlets. In Jrun, I canview the equivalent servlet source code for the JSP. ButOrion doesnt seem to provide the source as well as class file. All it creates is a binary jsp.Cache file. But my job is to get into the code and see how the servlet is getting written and compare with servlets generated thru other jsp-engines. What do i do? Regards, Santosh Santosh Kumar C == Senior Systems Engineer == Wipro Technologies == 1-8-448, Laxmi Building, S.P. Road, == Begumpet, Secunderabad - 500 003 == A.P, India. == Phone@: 91407896008 Ext 4511 == Fax @: 91407896123 == eMail@: [EMAIL PROTECTED] == url @: http://www.wipro.com == The World's First SEI CMM Level 5 Software Services Company
RE: displaying xml
I'm responding to the previously included message. I have suggested that Orion look at the documentation provided by W3C, the World Wide Web Consortium, on it's Jigsaw server (which is similar in design to the Orion server). W3C is in the process of creating a three hundred or so page PDF format manual. While I don't expect Java developers to create that extensive documentation, this documentation could be farmed out to some technical writers. What will also be useful is further articles, such as those provided at www.jollem.com. -Original Message- From: Miles Daffin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 2:09 PM To: Orion-Interest Subject: Re: displaying xml If Orion included documentation that was half as decent as their most excellent server then perhaps the volume of confused, didn't read the readme.txt file, newbie questions would decrease. Where are the bird's-eye view diagrams - server architecture, topology, relationships between xml files etc? Not that hard for a good developer to knock up, and clearer by far than pages of liner descriptions. The lack of self starters? Here? You have GOT to be kidding! --On Tuesday, October 17, 2000 8:11 AM -0400 "Joseph B. Ottinger" [EMAIL PROTECTED] wrote: Or, of course, orionsupport.com, which I know at least two other people might be working on, and I'm considering reviving it myself. Although, honestly, the lack of self-starters here is rather annoying... "Why doesn't somebody ELSE do it" is a crappy way to go about development. On Mon, 16 Oct 2000, Hani Suleiman wrote: Or how about a faq-o-matic? Seems ideal for this kind of thing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Porfiriev Sergey Sent: Monday, October 16, 2000 8:33 PM To: Orion-Interest Subject: Re: displaying xml To Magnus Karl Avedal: it will be good idea to open "users contribution" topic at www.OrionServer.com http://www.OrionServer.com ( like orionsupport was). and as result traffic in orion-interest will be decreased :) - Original Message - From: Derek Akers mailto:[EMAIL PROTECTED] To: Orion-Interest mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2000 6:44 PM Subject: Re: displaying xml Hi Troy, thanks, but I've already tried. the pre /pre tags do preserve the indentation of the XML, but do not allow for the displaying of tags for some reason. 1) use xmp /xmp tags - pre can;'t help. 2) use this xsl for XML parsing - ( i use it with Salaman's Saxon XSLT engine, but it will work under Orion default XSLT (xerces)) it will display your XML as HTML with XML reformating and coloring xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform http://www.w3.org/1999/XSL/Transform" version="1.0" xsl:output method="html" encoding="windows-1251" indent="yes"/ !-- Generic stylesheet for viewing XML -- !-- This stylesheet has been modified to use modes instead of nested templates. -- !-- Last Updated by Parf: moved to lotus xsl, main tag fix -- xsl:template match="/" HTML xsl:apply-templates/ /HTML /xsl:template xsl:template match="node()" xsl:if test="name()!='xml-stylesheet'" bbigxsl:textlt;/xsl:textxsl:value-of select="name()"/xsl:textgt;/xsl:text/big/bbr/ DIV DEFANGED_STYLE="font-family:Courier; font-size:10pt; margin-bottom:0em" xsl:apply-templates mode="inside"/ /DIV bbigxsl:textlt;//xsl:textxsl:value-of select="name()"/xsl:textgt;/xsl:text/big/b /xsl:if /xsl:template xsl:template match="*" mode="inside" DIV DEFANGED_STYLE="margin-left:1em" SPAN DEFANGED_STYLE="color:blue" xsl:textlt;/xsl:text bxsl:value-of select="name()"//b xsl:for-each select="@*" xsl:call-template name="attribute"/ /xsl:for-each xsl:choose xsl:when test="self::node()" xsl:textgt;/xsl:text xsl:apply-templates mode="inside"/ xsl:textlt;//xsl:text xsl:value-of select="name()"/ xsl:textgt;/xsl:text /xsl:when xsl:otherwise xsl:text/gt;/xsl:text /xsl:otherwise /xsl:choose /SPAN /DIV /xsl:template xsl:template name="attribute" SPAN DEFANGED_STYLE="color:navy" xsl:text /xsl:text xsl:value-of select="name()"/ xsl:text="/xsl:text SPAN DEFANGED_STYLE="color:black" xsl:value-of select="."/ /SPAN xsl:text"/xsl:text /SPAN /xsl:template xsl:template match="comment()" mode="inside" SPAN DEFANGED_STYLE="color:orange" xsl:textlt;!--/xsl:textxsl:value-of select="."/xsl:text--gt;/xsl:text /SPAN /xsl:template xsl:template match="processing-instruction()" mode="inside" DIV
Problem with application-client descriptor
Title: Hello,I new with EJB and I try to develop my own EJB with the help of the product demo.The problem is when I try my client application (XSLTransClient) I receive the following error : C:\orion\demo\ejb\XSLTransjava -classpath .;../../../orion.jar;../../../ejb.jar;../../jndi.jar XSLTransClientCommunication error: Error reading application-client descriptor: No EJBHome found at MyXSLTrans as specified by ejb-ref MyXSLTrans What's append ? Can any one help me ? tanks a lot Fred [EMAIL PROTECTED]
findByXXXX don't function
Hi, is orion's implementation of the findByXXX not implemented? orion-ejb-jar.xml : ... finder-method query="" method ejb-nameejb/Task/ejb-name method-namefindAll/method-name method-params/method-params /method /finder-method finder-method partial="true" query="$1 = $username" method ejb-nameejb/Task/ejb-name method-namefindByUsername/method-name method-paramsjava.util.String/method-params /method /finder-method /entity-deployment TaskHome.java : --- public interface TaskHome extends javax.ejb.EJBHome { ... public Task findByPrimaryKey(String name) throws RemoteException, FinderException; public Collection findByUsername(String name) throws RemoteException, FinderException; public Collection findAll() throws RemoteException, FinderException; } But findByUsername(String name) is the same as findAll() ?
Re: JBuilder + Orion
- Original Message - And for what it's worth, setting up JProbe to run Orion is about as simple... Arved Sandstrom -Original Message- - Adding orion.jar and ejb.jar to the required libraries of the project properties 'paths' tab. - Setting the main class to 'com.evermind.server.ApplicationServer' and the VM parameters to '-Duser.dir=c:\orion' on the 'run' tab. Sven E. van 't Veer Unfortunately, when set up pretty much exactly as mentioned but in Together 4.1 (www.togethersoft.com), Orion chokes thusly: com.canlink.components.services.ProducerServicesException: catalog creation failed: Database error: File input/output error: ./database/defaultdb.properties; nested exception is: java.sql.SQLException: File input/output error: ./database/defaultdb.properties; --- nested com.evermind.server.rmi.OrionRemoteException: Database error: File input/output error: ./database/defaultdb.properties; nested exception is: java.sql.SQLException: File input/output error: ./database/defaultdb.properties at ProducerServices_StatelessSessionBeanWrapper3.createCatalog(ProducerServices _StatelessSessionBeanWrapper3.java:92) at com.canlink.catalog.CreateCatalogAction.perform(CreateCatalogAction.java:62) at org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.j ava:794) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:332) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at com.evermind.server.http.d3.so(JAX) at com.evermind.server.http.d3.sm(JAX) at com.evermind.server.http.ef.su(JAX) at com.evermind.server.http.ef.dn(JAX) at com.evermind.util.f.run(JAX) The '-Duser.dir=c:\orion' JVM argument is set correctly and the defaultdb.properties file is in the right place and perfectly usable to Orion when it is run outside of Together. Any ideas as to why this happens only when Orion is run within Together? P.Pontbriand Canlink Interactive Technologies
DTD for orion-ejb-jar?
Is there a more up-to-date version of this DTD somewhere? The one referenced in the xml dosn't know anything about EJB2 stuff, like message-driven-deployment, or query tag in CMP finder-method tag jd
Cart example is not stateful!?
Hi all, I need to implementing a stateful Session Bean. So, I took the Cart-example and added the following thinks to look the values of a stateful bean who shall be in the container (because by first call of this program, I added some beans). But, all Beans are destroyed. I can't see the STATEFUL beans of the last program-call! Why there not persistent? Client: // init Context java.util.Properties p = new java.util.Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory"); p.put(Context.PROVIDER_URL,"ormi://localhost/caddie"); p.put(Context.SECURITY_PRINCIPAL,"admin"); p.put(Context.SECURITY_CREDENTIALS,"metrocine"); Context context = new InitialContext(p); // get Cart bean Object homeObject = context.lookup("java:comp/env/Cart"); CartHome home = (CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class); Cart cart = (Cart)PortableRemoteObject.narrow(home.create("kuno"), Cart.class); // print-out of all item stored in the stateful bean java.util.Collection items = cart.getItems(); java.util.Iterator iterator = items.iterator(); while(iterator.hasNext()){ System.out.println((String)iterator.next()); } // Add some new items to the Cart. cart.add("Milk"); cart.add("Apples"); cart.add("Pizza"); ejb-jar.xml -- ejb-jar> display-name>Caddie for the shop of Metrocine/display-name> description>prototype v1.0/description> enterprise-beans> session> display-name>Shopping Cart/display-name> description>A simple shopping cart./description> ejb-name>Cart/ejb-name> home>metrocine.caddie.interfaces.CartHome/home> remote>metrocine.caddie.interfaces.Cart/remote> ejb-class>metrocine.caddie.ejb.CartEJB/ejb-class> session-type>Stateful/session-type> transaction-type>Container/transaction-type> /session> /enterprise-beans> assembly-descriptor/> /ejb-jar> -- -- http://zap.to/kuno - Homepage - http://www.eif.ch -- -- 026/ 494.19.56 - Telefon - 026/ 429.66.11 -- -- [EMAIL PROTECTED] - eMail - [EMAIL PROTECTED] --
Tag handler design issues concerning instance reusage
What steps might a tag handler developer need to take to avoid getting unexpected results because the container reuses tag handlers? (For example an old value for an optional attribute might still be around when the tag handler is invoked for another tag.) Should one initialize all optional attribute values somewhere? (In what method would that be?) Or should one reset all values after the tag handler is finished to give the next invocation a clean one? (This seems to imply a performance hit, small, but still there..) Best Regards, Markus -- Markus Holmberg | Give me Unix or give me a typewriter. [EMAIL PROTECTED] | http://www.freebsd.org/
support EJB2.0 or not?
When I try to write a 2.0 compliant entity bean: public abstract class ContactBean implement EntityBean { public abstract void setName(String s); public abstract String getName(); ... } Orion throws the error (at deployment): ... Bean class com.tfc.ejb.ContactBean must not be declared abstract So what did I do wrong? Does Orion 1.3.8 or 1.4.0 support EJB 2.0 entity beans like the web page advertises or not? -tim
RE: findByPrimaryKey() calling store()
Have you implemented the suggestion in the FAQ and added an isModified() method to your bean? I quote from http://www.orionserver.com/faq/: I am using CMP Entity beans and call many methods on it that do not modify the state ofthe bean. How can I help Orion figure out that I am not changing the state and that itdoes not need to talk to the database? Implement the method "public boolean isModified()" in your bean to return a boolean flag that you set each time you modify your bean and clear in ejbStore(). If isModified() returns false, Orion knows that it doesn't need to talk to the database -Original Message-From: Greg Matthews [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 18, 2000 12:52 AMTo: Orion-InterestSubject: findByPrimaryKey() calling store() dear all,i have a jsp that calls findByPrimaryKey on an entity bean.the data that the bean represents exists in the database.it seems like ejbStore is being called as a result of callingfindByPrimaryKey.also, once i have a reference to the bean, calling an accessormethod on it also seems to cause ejbStore to be called.is there something i can set to prevent the bean beingupdated when there is no (apparent?) need, or am i missing something? thanks,greg.// as a result of findByPrimaryKeySELECT id FROM sales_order WHERE id = 5UPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN// as a result of calling order.getNotes( ), an EJB method// that does not access the databaseUPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN
Re: 2 many messages - News Server needed. - Or we could split the list
Actually, I think the mail list is fine. I use a filter to move these messages into their own folder. Good idea. However, I do feel that some improvement is possible. I recomend splitting the list into a few other lists. Yes - create 2 news groups. The main point of this is the automatic ordering of threads that this allows, in my email client at least. I can see a root message and the whole, dialogic line of consequent messages. What's so wrong with that? Probably the most obvious split is between developers using Orion and administers trying to maintain, configure and install it. Like I said - 2 news groups.
Re: JSP-Compiled Servlets ??
Look in this directory (assuming your app's name is test1): orion root\application-deployments\test1\test1-web\persistence\jsp - Original Message - From: Santosh Kumar To: Orion-Interest Sent: Wednesday, October 18, 2000 10:48 AM Subject: JSP-Compiled Servlets ?? hi all, Weknow that JSP are compiled into servlets. In Jrun, I canview the equivalent servlet source code for the JSP. ButOrion doesnt seem to provide the source as well as class file. All it creates is a binary jsp.Cache file. But my job is to get into the code and see how the servlet is getting written and compare with servlets generated thru other jsp-engines. What do i do? Regards, Santosh Santosh Kumar C == Senior Systems Engineer == Wipro Technologies == 1-8-448, Laxmi Building, S.P. Road, == Begumpet, Secunderabad - 500 003 == A.P, India. == Phone@: 91407896008 Ext 4511 == Fax @: 91407896123 == eMail@: [EMAIL PROTECTED] == url @: http://www.wipro.com == The World's First SEI CMM Level 5 Software Services Company
IP restriction
How can i set ip restrictions for a directory like in an apache thx much Fox!MURDER
RE: JBuilder + Orion
Probably because together is stepping on your system properties. JPDA debugging is much easier. When I develop with TogetherJ I use JBuilder to do my debugging(But you could use many other tools). I have a JBuilder project that includes the Together project. Then I can debug using the JPDA. Very slick. BTW Together rocks, but I have never tried using JPDA directly with it. I will have to investigate that. If I find a way I will post it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Pontbriand Sent: Wednesday, October 18, 2000 10:45 AM To: Orion-Interest Subject: Re: JBuilder + Orion - Original Message - And for what it's worth, setting up JProbe to run Orion is about as simple... Arved Sandstrom -Original Message- - Adding orion.jar and ejb.jar to the required libraries of the project properties 'paths' tab. - Setting the main class to 'com.evermind.server.ApplicationServer' and the VM parameters to '-Duser.dir=c:\orion' on the 'run' tab. Sven E. van 't Veer Unfortunately, when set up pretty much exactly as mentioned but in Together 4.1 (www.togethersoft.com), Orion chokes thusly: com.canlink.components.services.ProducerServicesException: catalog creation failed: Database error: File input/output error: ./database/defaultdb.properties; nested exception is: java.sql.SQLException: File input/output error: ./database/defaultdb.properties; --- nested com.evermind.server.rmi.OrionRemoteException: Database error: File input/output error: ./database/defaultdb.properties; nested exception is: java.sql.SQLException: File input/output error: ./database/defaultdb.properties at ProducerServices_StatelessSessionBeanWrapper3.createCatalog(ProducerServices _StatelessSessionBeanWrapper3.java:92) at com.canlink.catalog.CreateCatalogAction.perform(CreateCatalogAction.java:62) at org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.j ava:794) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:332) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at com.evermind.server.http.d3.so(JAX) at com.evermind.server.http.d3.sm(JAX) at com.evermind.server.http.ef.su(JAX) at com.evermind.server.http.ef.dn(JAX) at com.evermind.util.f.run(JAX) The '-Duser.dir=c:\orion' JVM argument is set correctly and the defaultdb.properties file is in the right place and perfectly usable to Orion when it is run outside of Together. Any ideas as to why this happens only when Orion is run within Together? P.Pontbriand Canlink Interactive Technologies
RE: support EJB2.0 or not?
You need to examine your deployment descriptor and class/interface defs .. there are lots of rules to follow, and they're easy to miss. I have CMP beans and dependent objects in various types of relationships all running just fine, but I've spent many an hour trying to find mistakes evidenced by errors such as yours. Go through the contract in section 9 of the spec, and assume nothing :) (I wish I could remember just which mistake it was that caused that problem, but I cant) jd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Drury Sent: Wednesday, October 18, 2000 12:18 PM To: Orion-Interest Subject: support EJB2.0 or not? When I try to write a 2.0 compliant entity bean: public abstract class ContactBean implement EntityBean { public abstract void setName(String s); public abstract String getName(); ... } Orion throws the error (at deployment): ... Bean class com.tfc.ejb.ContactBean must not be declared abstract So what did I do wrong? Does Orion 1.3.8 or 1.4.0 support EJB 2.0 entity beans like the web page advertises or not? -tim
RE: Cart example is not stateful!?
"Stateful" in "stateful session bean" does not mean "persistent". What it means is that state, say your Collection, is retained in between method calls to that session bean. To answer your last question, stateful session beans are not persistent because they were not intended to be. That's what entity beans are for. Or you can add JDBC to the SB. Hope this clarifies things. Arved Sandstrom -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kuno BaeriswylSent: Wednesday, October 18, 2000 12:32 PMTo: Orion-InterestSubject: Cart example is not stateful!?Hi all, I need to implementing a stateful Session Bean. So, I took the Cart-example and added the following thinks to look the values of a stateful bean who shall be in the container (because by first call of this program, I added some beans). But, all Beans are destroyed. I can't see the STATEFUL beans of the last program-call! Why there not persistent? Client: // init Context java.util.Properties p = new java.util.Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory"); p.put(Context.PROVIDER_URL,"ormi://localhost/caddie"); p.put(Context.SECURITY_PRINCIPAL,"admin"); p.put(Context.SECURITY_CREDENTIALS,"metrocine"); Context context = new InitialContext(p); // get Cart bean Object homeObject = context.lookup("java:comp/env/Cart"); CartHome home = (CartHome)PortableRemoteObject.narrow(homeObject, CartHome.class); Cart cart = (Cart)PortableRemoteObject.narrow(home.create("kuno"), Cart.class); // print-out of all item stored in the stateful bean java.util.Collection items = cart.getItems(); java.util.Iterator iterator = items.iterator(); while(iterator.hasNext()){ System.out.println((String)iterator.next()); } // Add some new items to the Cart. cart.add("Milk"); cart.add("Apples"); cart.add("Pizza");ejb-jar.xml -- ejb-jar display-nameCaddie for the shop of Metrocine/display-name descriptionprototype v1.0/description enterprise-beans session display-nameShopping Cart/display-name descriptionA simple shopping cart./description ejb-nameCart/ejb-name homemetrocine.caddie.interfaces.CartHome/home remotemetrocine.caddie.interfaces.Cart/remote ejb-classmetrocine.caddie.ejb.CartEJB/ejb-class session-typeStateful/session-type transaction-typeContainer/transaction-type /session /enterprise-beans assembly-descriptor/ /ejb-jar -- -- http://zap.to/kuno - Homepage - http://www.eif.ch -- -- 026/ 494.19.56 - Telefon - 026/ 429.66.11 -- -- [EMAIL PROTECTED] - eMail - [EMAIL PROTECTED] --
RE: Orion slower than...
We tried two tests One was ** import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.zip.*; /** Example showing benefits of gzipping pages to browsers * that can handle gzip. * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class EncodedPage1 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String encodings = request.getHeader("Accept-Encoding"); String encodeFlag = request.getParameter("encoding"); PrintWriter out; String title; if ((encodings != null) (encodings.indexOf("gzip") != -1) !"none".equals(encodeFlag)) { title = "Page Encoded with GZip"; OutputStream out1 = response.getOutputStream(); out = new PrintWriter(new GZIPOutputStream(out1), false); response.setHeader("Content-Encoding", "gzip"); } else { title = "Unencoded Page"; out = response.getWriter(); } out.println("HTMLHEADTITLE" + title + "/TITLE/HEAD\n" + "BODY BGCOLOR=\"#FDF5E6\"\n" + "H1 ALIGN=CENTER" + title + "/H1\n"); String line = "Blah, blah, blah, blah, blah. " + "Yadda, yadda, yadda, yadda."; for(int i=0; i1; i++) { out.println(line); } out.println("/BODY/HTML"); out.close(); } } ** The other was %% import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.zip.*; /** Example showing benefits of gzipping pages to browsers * that can handle gzip. * P * Taken from Core Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.coreservlets.com/. * copy; 2000 Marty Hall; may be freely used or adapted. */ public class EncodedPage2 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String encodings = request.getHeader("Accept-Encoding"); String encodeFlag = request.getParameter("encoding"); PrintWriter out; String title; title = "Unencoded Page"; out = response.getWriter(); out.println("HTMLHEADTITLE" + title + "/TITLE/HEAD\n" + "BODY BGCOLOR=\"#FDF5E6\"\n" + "H1 ALIGN=CENTER" + title + "/H1\n"); String line = "Blah, blah, blah, blah, blah. " + "Yadda, yadda, yadda, yadda."; for(int i=0; i1; i++) { out.println(line); } out.println("/BODY/HTML"); out.close(); } } %% We found the one with the zipped stream to be roughly 5 times faster (sorry but we didn't take real good measurements). You can try it yourself - it's pretty easy to do. Mind you - this is not a veyr compreehnsive test - but the results over a 56K modem appeared quite compelling (over a !0mbit ethernet or a T1 you don't notice that much improvement) Thanks Nate -Original Message- From: Santosh Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 17, 2000 11:17 PM To: Orion-Interest Subject: Re:Orion slower than... Hi Nate, Do you have some figures to look at? I mean, How much was the improvement in speed? What is the size of the content file? Did you try out with various content sizes? Santosh - Original Message - From: Kirby, Nathaniel [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, October 18, 2000 12:32 AM Subject: Orion slower than it could be [WAS: Compressing the output stream] We tried using Orion to host 2 servlets, one using compression one not - the one using compression was much faster than the one without it. I assume this means that orion's JSP are not compressed. Please repsond if this is an inaccurate statement Thanks Nate -Original Message- From: Kirby, Nathaniel [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 1:30 PM To: Orion-Interest Subject: Compressing the output stream On jsp-interest [http://archives.java.sun.com/cgi-bin/wa?A2=ind9912L=jsp-inte restP=R11079 ] I read *** Date: Mon, 6 Dec 1999 12:29:14 +0100 Reply-To: Volker Turau [EMAIL PROTECTED] Sender: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] From: Volker Turau [EMAIL PROTECTED] /cgi-bin/wa?A2=ind9912L=jsp-interestD=0P=64939 Subject: Re: How to compress JSP pages using Content Encoding Comments: To: Kayser William [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED]
RE: 2 many messages - News Server needed. - Or we could split the list
It's quite feasible for me to set up a news server (nntp, usenet style) on my server if that's a viable solution. It'll take me a little bit of time, as I'm not exactly familiar with running INN, but I can figure it out. On Wed, 18 Oct 2000, Duffey, Kevin wrote: I would agree too. I think if you split the list into ejb and web, it might limit the traffic a bit. Also, maybe a newbie list, or possibly a mailing list about how to configure Orion, set it up, install ejbs, servlets, applications, etc..there are a lot of questions on that front. A fourth (the first three being web, ejb, and configuration/setup) would be database related, if possible. -Original Message- From: Miles Daffin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 18, 2000 9:51 AM To: Orion-Interest Subject: Re: 2 many messages - News Server needed. - Or we could split the list Actually, I think the mail list is fine. I use a filter to move these messages into their own folder. Good idea. However, I do feel that some improvement is possible. I recomend splitting the list into a few other lists. Yes - create 2 news groups. The main point of this is the automatic ordering of threads that this allows, in my email client at least. I can see a root message and the whole, dialogic line of consequent messages. What's so wrong with that? Probably the most obvious split is between developers using Orion and administers trying to maintain, configure and install it. Like I said - 2 news groups. --- Joseph B. Ottinger [EMAIL PROTECTED] http://cupid.suninternet.com/~joeo HOMES.COM Developer
RE: DTD for orion-ejb-jar?
You are correct, but that was not what I asked about :) orion-ejb-jar.dtd is broken (rather than ejb-jar.dtd) .. if you deploy a message-driven bean, and try and validate the deployed file (in a validating editor like Spy), the dtd lacks (at least) the message-driven-deployment entity definition -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lopez Esteban Sent: Wednesday, October 18, 2000 2:15 PM To: Orion-Interest Subject: RE: DTD for orion-ejb-jar? In orion 1.4.0 there is a dtd for EJB 2.0 and there is an example of message-driven bean (ATM) -Original Message- From: John D'Ausilio [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, October 18, 2000 11:43 AM To: Orion-Interest Subject:DTD for orion-ejb-jar? Is there a more up-to-date version of this DTD somewhere? The one referenced in the xml dosn't know anything about EJB2 stuff, like message-driven-deployment, or query tag in CMP finder-method tag jd
list archives
How can I view the list archives for reviewing the discussion on running Orion server processes as someone other then root? How do I view the list archives in general?
Re: 2 many messages - News Server needed. - Or we could split the list
IMO, the mailing list is just fine. If there are too many messages for your inbox, then you should filter it away. All the popular mail clients will handle this. I am sure I am not the only one who feels this way, nor am the only one who belongs to many other special-interest lists, all delivered via email and filtered. I belong to roughly 40 or so development lists, some of which average 40-50 messages a day. They happily get filtered away into their own folders. (In fact, I just archived my Postfix users list from the past year-- 14,000+ messages.) If the list does need to be split, it should be split by the Orion folks as they deem necessary. Please realize however, when talking about splitting the list into different development disciplines, that is no longer Orion specific, it now becomes a Java app development list-- which there are already many. If someone volunteers to setup a web-based "message board" or a separate NNTP server, then that is their perogative. But I do believe that not keeping the product support channels centralized will not only confuse the new users of Orion, but also be the cause of frustration trying to find out which method of support is actually productive. Thanks for listening. -- David S. Kenzik [EMAIL PROTECTED] - http://kenzik.com Original Music - http://mp3.com/text Joseph B. Ottinger said... It's quite feasible for me to set up a news server (nntp, usenet style) on my server if that's a viable solution. It'll take me a little bit of time, as I'm not exactly familiar with running INN, but I can figure it out. On Wed, 18 Oct 2000, Duffey, Kevin wrote: I would agree too. I think if you split the list into ejb and web, it might limit the traffic a bit. Also, maybe a newbie list, or possibly a mailing list about how to configure Orion, set it up, install ejbs, servlets, applications, etc..there are a lot of questions on that front. A fourth (the first three being web, ejb, and configuration/setup) would be database related, if possible. -Original Message- From: Miles Daffin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 18, 2000 9:51 AM To: Orion-Interest Subject: Re: 2 many messages - News Server needed. - Or we could split the list Actually, I think the mail list is fine. I use a filter to move these messages into their own folder. Good idea. However, I do feel that some improvement is possible. I recomend splitting the list into a few other lists. Yes - create 2 news groups. The main point of this is the automatic ordering of threads that this allows, in my email client at least. I can see a root message and the whole, dialogic line of consequent messages. What's so wrong with that? Probably the most obvious split is between developers using Orion and administers trying to maintain, configure and install it. Like I said - 2 news groups. --- Joseph B. Ottinger [EMAIL PROTECTED] http://cupid.suninternet.com/~joeo HOMES.COM Developer
Re: list archives
Kemp Randy-W18971 said... How can I view the list archives for reviewing the discussion on running Orion server processes as someone other then root? How do I view the list archives in general? Have you been to the Orion website? Visit the site: http://www.orionserver.com Click on "Mailing List" on the left. Click on the link that says "To read the archive of the list, 'look here'." I hope this helps. -- David S. Kenzik [EMAIL PROTECTED] - http://kenzik.com Original Music - http://mp3.com/text
Re: findByPrimaryKey() calling store()
thanks for the response. i checked again and i'm using BMP (attached is ejb-jar.xml). i haven't really got my head around how transactions work with entity beans although doing lots of reading at the moment. i'm thinking maybe the orion ejb container is treating each of my entity bean calls as a transaction (as supported by profiling the sql server database we're using), and that's why store is being called (?). we currently use stateless server beans, and handle connection pooling ourselves since all the ejb connection pooling stuff asn't that mature when we started our project. we're now relooking at entity beans, etc, and working out how to do all the simple things like controlling transaction boundaries, etc, and connection pooling. greg. - Original Message - From: "James Ho" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, October 19, 2000 6:04 AM Subject: Re: findByPrimaryKey() calling store() Hi Greg... According to Orion1.4.0's changes.txt it said: Optimized CMP entity stores to only store updated fields. I am not 100% sure what it means though..maybe it is what u are after... James. Greg Matthews wrote: dear all, i have a jsp that calls findByPrimaryKey on an entity bean. the data that the bean represents exists in the database. it seems like ejbStore is being called as a result of calling findByPrimaryKey. also, once i have a reference to the bean, calling an accessor method on it also seems to cause ejbStore to be called. is there something i can set to prevent the bean being updated when there is no (apparent?) need, or am i missing something? thanks, greg. // as a result of findByPrimaryKey SELECT id FROM sales_order WHERE id = 5 UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN // as a result of calling order.getNotes( ), an EJB method // that does not access the database UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 IF @@TRANCOUNT0 COMMIT TRAN BEGIN TRAN ?xml version="1.0" encoding="Cp1252"? !DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd' ejb-jar enterprise-beans entity ejb-nameOrderBean/ejb-name homecom.sales.OrderHome/home remotecom.sales.Order/remote ejb-classcom.sales.OrderBean/ejb-class persistence-typeBean/persistence-type prim-key-classjava.lang.Integer/prim-key-class reentrantFalse/reentrant resource-ref description reference to a jdbc datasource mentioned down in the DD section /description res-ref-namejdbc/orderDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /entity /enterprise-beans assembly-descriptor container-transaction method ejb-nameOrderBean/ejb-name method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar
Re: list archives
Searchable archives are available at http://www.mail-archive.com/orion-interest%40orionserver.com/ (linked under "Mailing list" on www.orionserver.com) -t On Wed, Oct 18, 2000 at 04:28:37PM -0500, Kemp Randy-W18971 wrote: How can I view the list archives for reviewing the discussion on running Orion server processes as someone other then root? How do I view the list archives in general? -- Tony Abbott [EMAIL PROTECTED]
RE: support EJB2.0 or not?
I believe the difference is in which dtd you specify in the deployment descriptor DOCTYPE -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Drury Sent: Wednesday, October 18, 2000 5:21 PM To: Orion-Interest Subject: RE: support EJB2.0 or not? My guess is the Orion is assuming my EJB is a 1.1 entity bean. What tell Orion that the bean is a 2.0 bean? Perhaps that is where my mistake lies. -tim -Original Message- From: John D'Ausilio [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 18, 2000 3:28 PM To: Orion-Interest Subject: RE: support EJB2.0 or not? You need to examine your deployment descriptor and class/interface defs .. there are lots of rules to follow, and they're easy to miss. I have CMP beans and dependent objects in various types of relationships all running just fine, but I've spent many an hour trying to find mistakes evidenced by errors such as yours. Go through the contract in section 9 of the spec, and assume nothing :) (I wish I could remember just which mistake it was that caused that problem, but I cant) jd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Drury Sent: Wednesday, October 18, 2000 12:18 PM To: Orion-Interest Subject: support EJB2.0 or not? When I try to write a 2.0 compliant entity bean: public abstract class ContactBean implement EntityBean { public abstract void setName(String s); public abstract String getName(); ... } Orion throws the error (at deployment): ... Bean class com.tfc.ejb.ContactBean must not be declared abstract So what did I do wrong? Does Orion 1.3.8 or 1.4.0 support EJB 2.0 entity beans like the web page advertises or not? -tim
Creating 2 Web-sites hosted from orion [V.Newbie]
I installed Orion - works great... but... I have been asked to create an intranet site (intranet.intaz.co.nz) and a dev site (dev.intaz.co.nz) hosted on the same machine (WinNT4). I got the initial site (dev.intaz.co.nz) working via client DNS search entry and an entry in the servers hosts file... Replaced the default-web-site folder contents with our intranet (that was living as a file:// based set of pages)... Works great... Now I have to put the dev site in for JSP/Servelet and EJB development... a) What do I have to change in NT to make the virtual host. (2 domains, 1 IP#) b) is the 'node' entry in the 'server.xml' and a second 'default-web-app.xml' file (with their respective 'virtual-hosts="blah.intaz.co.nz"' entries) all I need for the orion side of things? -- Aaron Scott-Boddendijk INTAZ Limited +64 7 838 3371 Voice +64 7 838 3372 Fax