Datasource info access restriction/encryption
Hello! Is there any way to have username/password in encrypted form in the datasources.xml file, or the only way to secure DB access is to restrict access to datasources.xml file itself? Alex.
SV: Orion and Sax/JDom
To follow the java extenssion mechanism, you should have a class-path entry in the EJB jar file that points to the other jar file bundled with the ear. WR -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För The elephantwalker Skickat: den 6 september 2001 01:27 Till: Orion-Interest Ämne: RE: Orion and Sax/JDom Steve, You can include your library files in the ear file. We do it all of the time. Create a directory called lib at the root of the ear. In the orion-application.xml file, specify the library directory like this: library path=lib / Make sure that this is after the persistance tag and before the principals tag. This works for us in version 1.5.2. I don't even think you need this tag...but it doesn't hurt. regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stephen Davidson Sent: Wednesday, September 05, 2001 4:25 AM To: Orion-Interest Subject: re: Orion and Sax/JDom Greetings. I was having some similiar issues with classes from Xerces/Xalan. We found an effective workaround was by copying/linking the xerces.jar and xalan.jar files into the lib directory under Orion. I am thinking that this may be part of the same issue where utility jars in ear files are not being read. This is something I currently have an open support call with Orion for. (Workaround was the same, copy the utility jars to the lib directory...) -Steve
Re: Orion and Sax/JDom
Title: Message If you're using Windows you might want to check your registry. If you can type java -server -jar orion.jar the settings should be ok. Look for anything in the registry that says javasoft and make sure it points to your jdk installation dir. If it is not pointing to your jdk install dir but to program files\JavaSoft\JRE1.3 or 1.3.1 that might be your problem. Johan - Original Message - From: Bryant Bunderson To: Orion-Interest Sent: Wednesday, September 05, 2001 5:22 PM Subject: RE: Orion and Sax/JDom I use this command to run Orion Server. It solved my Xerces and JDOM problems. java -classpath xerces.jar;orion.jar com.evermind.server.ApplicationServer -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Michael LaccettiSent: Tuesday, September 04, 2001 1:10 PMTo: Orion-InterestSubject: RE: Orion and Sax/JDom I did a fresh install, downloaded the latest zip and installed it. I've tried downloading the latest version of xerces and replacing the version with 1.5.2 with that. Again, still getting the SAX2 not found exception. Is there a specific order to setin the classpath? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of The elephantwalkerSent: Tuesday, September 04, 2001 12:04To: Orion-InterestSubject: RE: Orion and Sax/JDom Michael, We use jdom b7 and orion 1.5.2 all of the timewith no problems.We use jdom with crimson, which is the default parser with jdom and orion version 1.5.2.Orion 1.4.6 used an old version of xerces. Did you use autoupdate.jar to install 1.5.2 or did you use a fresh install? Autoupdate.jar is a little unreliable, so I would do a fresh install. regards, the elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Michael LaccettiSent: Tuesday, September 04, 2001 8:33 AMTo: Orion-InterestSubject: Orion and Sax/JDom I've recently installed Orion 1.5.2 on a linux test machine, and installed our app on it. It worked fine under 1.4.6, but for some reason, when I dump it under 1.5.2 I keep getting a SAX2 exception: SAX2 driver class not found. Has anybody seen this before, and better yet, fixed it? I've tried everything that I can think of. I even grabbed the latest version of JDom and installed that. Please help! -Michael LaccettiDeveloper, Eldan Software[EMAIL PROTECTED]
R: Memory leak using session bean - how to make sure?
Ciao, Anch'io ho gli stessi tuoi problemi vedi miei precedenti messaggi.. Non ho scoperto come risolvere la cosa.. -Messaggio originale- Da: Diego Amicabile [mailto:[EMAIL PROTECTED]] Inviato: mercoledì 5 settembre 2001 15.24 A: Orion-Interest Oggetto: Memory leak using session bean - how to make sure? Hi, I am trying to find out why the application we deployed on Orion has memory leaks. It happens since we created a stateful session bean, which is very big, which is associated with a HttpSession. How do I find out how many stateful session beans are running, since the console is buggy (always 0 instances , stateless session bean - happens also with the Cart example). I remove the session bean when the HttpSession is closed, but this does not seem to work. How can I know for sure that too many session beans are living and are not getting passivated / removed? What could be the reason for it? Greetings Diego __ Do You Yahoo!? Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
Stored procedures and J2EE
Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business objects fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child objects table reference the primary key field of the parent objects table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parents initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans?Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: Stored procedures and J2EE
A bean is just a representation of data in a datastore with a collection of finder and business methods. You can use cmp's to access data which is already in a datastore. Astateless session beancan be used to fire off your create procedures, and this slsb can be in your cmp create (or not, for that matter). As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more. If you are doing this to filter your output or because you need custom joins, etc. there are much easier ways to do this...such as using a custom finder method in orion (its a five minute job in the orion-ejb-jar.xml file) or a slsb. regards, the elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian DonciulescuSent: Thursday, September 06, 2001 1:41 AMTo: Orion-InterestSubject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business objects fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child objects table reference the primary key field of the parent objects table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parents initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans? Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Datasource info access restriction/encryption
äÏÂÒÏÅ ×ÒÅÍÑ ÓÕÔÏË! Hello! Is there any way to have username/password in encrypted form in the datasources.xml file, or the only way to secure DB access is to restrict access to datasources.xml file itself? îÉËÔÏ ÎÅ ÍÅÛÁÅÔ ÎÁÐÉÓÁÔØ ËÌÁÓÓ ÎÁÓÌÅÄÎÉË ÏÔ com.evermind.sql.DriverManagerDataSource É ÐÅÒÅÏÐÒÅÄÅÌÉÔØ ÔÁÍ ÍÅÔÏÄ getConnection(). ôÏÇÄÁ × ÜÔÏÍ ÍÅÔÏÄÅ ÍÏÖÎÏ ÄÅËÒÉÐÔÉÔØ ÐÁÒÏÌØ É ×ÙÚÙ×ÁÔØ ÍÅÔÏÄ ÐÒÅÄËÁ. ðÏÞÔÉ ÔÏ ÖÅ ÓÁÍÏÅ É ÄÌÑ ÏÓÔÁÌØÎÙÈ ËÌÁÓÓÏ× ÔÉÐÁ com.evermind.sql.DriverManager. äÏËÁ ÎÁ ÎÉÈ Õ orion'Á ÅÓÔØ, ÐÒÏÐÉÓÁÔØ ÎÏ×ÏÉÓÐÅÞ£ÎÎÙÅ ËÌÁÓÓÙ × ÐÕÔØ orion'Á ÎÅÔ ÐÒÏÂÌÅÍ, ÎÕ É ÐÏÄÐÒÁ×ÉÔØ ÉÍÅÎÁ ËÌÁÓÓÏ× × data-sources.xml... ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, áÌÅËÓÅÊ. P.S. ëÁË ÖÉ×£ÔÓÑ ÔÏ?
RE: OracleAQ and Orion
I don't know Oracle Advanced Queueing, but I had a similar problem integrating SonicMQ and Orion. I solved it following the architecture described in this paper from Sonic Software http://www.sonicsoftware.com/white_papers/appserver.pdf that describe the integration of SOnicMQ and Weblogic, but is suitable for every application server/messaging system with some modification. Luciano -Original Message- From: Antonio Cruz [mailto:[EMAIL PROTECTED]] Sent: mercoledì 5 settembre 2001 12.46 To: Orion-Interest Subject: Re: OracleAQ and Orion I've talked to someone in Oracle that says that its possible to access a Queue in Oracle with the current version, this might be possible?? Thanks Antonio Cruz At 08:30 05-09-2001 +0200, you wrote: ciao Antonio i know for sure that oc4j integration with ojms (oracle jms) is a planned feature in 9ias v2. ciao Paolo Antonio Cruz wrote: Does anyone know how to use Oracle Advanced Queueing with Orion (OC4J)? I've try to use access a queue in Oracle AQ using AQApi.jar but when i try to connect to AQ i always get a connection error message. Thanks in advance, Tony Cruz
RE: Datasource info access restriction/encryption
îÉËÔÏ ÎÅ ÍÅÛÁÅÔ ÎÁÐÉÓÁÔØ ËÌÁÓÓ ÎÁÓÌÅÄÎÉË ÏÔ com.evermind.sql.DriverManagerDataSource É ÐÅÒÅÏÐÒÅÄÅÌÉÔØ ÔÁÍ ÍÅÔÏÄ getConnection(). ôÏÇÄÁ × ÜÔÏÍ ÍÅÔÏÄÅ ÍÏÖÎÏ ÄÅËÒÉÐÔÉÔØ ÐÁÒÏÌØ É ×ÙÚÙ×ÁÔØ ÍÅÔÏÄ ÐÒÅÄËÁ. ðÏÞÔÉ ÔÏ ÖÅ ÓÁÍÏÅ É ÄÌÑ ÏÓÔÁÌØÎÙÈ ËÌÁÓÓÏ× ÔÉÐÁ com.evermind.sql.DriverManager. äÏËÁ ÎÁ ÎÉÈ Õ orion'Á ÅÓÔØ, ÐÒÏÐÉÓÁÔØ ÎÏ×ÏÉÓÐÅÞ£ÎÎÙÅ ËÌÁÓÓÙ × ÐÕÔØ orion'Á ÎÅÔ ÐÒÏÂÌÅÍ, ÎÕ É ÐÏÄÐÒÁ×ÉÔØ ÉÍÅÎÁ ËÌÁÓÓÏ× × data-sources.xml... OK, jag forstar precis, tack sa mycket. Please write in English!
How to call A EJB in OC4j from other Servers
Dear All, I would like to know, how to invoke a EJB bean in OC4J from another machine. What are the steps I have to follow. It would appreciated if any one help in this regard. Thanking you With regards Venkata
RE: Stored procedures and J2EE
Thanks for your help. The reasonI want to use stored procedures it that we want to make use of a datamodel that we already have. This data-model uses stored procedures intensively. What would you suggest? Keep the data model as is and adapt the J2EE code to it or change the data-model so that we don't use the storedprocedures that much?Christian From: "The elephantwalker" <[EMAIL PROTECTED]> Reply-To: Orion-Interest <[EMAIL PROTECTED]> To: Orion-Interest <[EMAIL PROTECTED]> Subject: RE: Stored procedures and J2EE Date: Thu, 6 Sep 2001 02:23:29 -0700 A bean is just a representation of data in a datastore with a collection of finder and business methods. You can use cmp's to access data which is already in a datastore. A stateless session bean can be used to fire off your create procedures, and this slsb can be in your cmp create (or not, for that matter). As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more. If you are doing this to filter your output or because you need custom joins, etc. there are much easier ways to do this...such as using a custom finder method in orion (its a five minute job in the orion-ejb-jar.xml file) or a slsb. regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian Donciulescu Sent: Thursday, September 06, 2001 1:41 AM To: Orion-Interest Subject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business objects fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child objects table reference the primary key field of the parent objects table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parents initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans? -- Get your FREE download of MSN Explorer at http://explorer.msn.com Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Datasource info access restriction/encryption
ðÒÉ×ÅÔ, ìÅÛÁ! óÐÁÓÉÂÏ, ÐÏÐÒÏÂÕÀ. óÏ×ÓÅÍ ÚÁÂÙÌ ÐÒÏ ÜÔÏÔ ÏÒÉÏÎÏ×ÓËÉÊ ÆÉÎÔ Ó ÕÎÉ×ÅÒÓÁÌØÎÙÍ DS. ÷ÏÏÂÝÅ ÖÉÚÎØ ×ÒÏÄÅ ÎÉÞÅÇÏ, ×ÏÔ ÚÁ×ÔÒÁ ÉÌÉ × ÐÏÎÅÄÅÌØÎÉË ÄÅÍÏÎÓÔÒÁÃÉÑ ÒÅÚÕÌØÔÁÔÁ ÎÁÞÁÌØÓÔ×Õ. äÁÌØÛÅ ÎÁÄÅÀÓØ ÎÁ ÒÁÚ×ÉÔÉÅ ÐÒÏÅËÔÁ, ÔÅÍ ÂÏÌÅÅ, ÞÔÏ ×ÚÑÌÉ ÎÅÄÁ×ÎÏ ËÏ ÍÎÅ × ÇÒÕÐÐÕ ÅÝÅ Ä×ÏÉÈ ÓÉÌØÎÙÈ ÒÅÂÑÔ, Ó ËÏÎËÒÅÔÎÙÍ ÏÐÙÔÏÍ ÐÏ J2EE + EJB. á ÞÔÏ Õ ÔÅÂÑ ÎÏ×ÏÇÏ? óÁÛÁ. - Original Message - From: Dragonchick [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, September 06, 2001 14:03 Subject: Re: Datasource info access restriction/encryption äÏÂÒÏÅ ×ÒÅÍÑ ÓÕÔÏË! Hello! Is there any way to have username/password in encrypted form in the datasources.xml file, or the only way to secure DB access is to restrict access to datasources.xml file itself? îÉËÔÏ ÎÅ ÍÅÛÁÅÔ ÎÁÐÉÓÁÔØ ËÌÁÓÓ ÎÁÓÌÅÄÎÉË ÏÔ com.evermind.sql.DriverManagerDataSource É ÐÅÒÅÏÐÒÅÄÅÌÉÔØ ÔÁÍ ÍÅÔÏÄ getConnection(). ôÏÇÄÁ × ÜÔÏÍ ÍÅÔÏÄÅ ÍÏÖÎÏ ÄÅËÒÉÐÔÉÔØ ÐÁÒÏÌØ É ×ÙÚÙ×ÁÔØ ÍÅÔÏÄ ÐÒÅÄËÁ. ðÏÞÔÉ ÔÏ ÖÅ ÓÁÍÏÅ É ÄÌÑ ÏÓÔÁÌØÎÙÈ ËÌÁÓÓÏ× ÔÉÐÁ com.evermind.sql.DriverManager. äÏËÁ ÎÁ ÎÉÈ Õ orion'Á ÅÓÔØ, ÐÒÏÐÉÓÁÔØ ÎÏ×ÏÉÓÐÅÞ£ÎÎÙÅ ËÌÁÓÓÙ × ÐÕÔØ orion'Á ÎÅÔ ÐÒÏÂÌÅÍ, ÎÕ É ÐÏÄÐÒÁ×ÉÔØ ÉÍÅÎÁ ËÌÁÓÓÏ× × data-sources.xml... ó ÎÁÉÌÕÞÛÉÍÉ ÐÏÖÅÌÁÎÉÑÍÉ, áÌÅËÓÅÊ. P.S. ëÁË ÖÉ×£ÔÓÑ ÔÏ?
Re[2]: Session share problem.
Hello Jishan, There is an option (shared=true as stated in other posting) to share session between different instances of the SAME application. The keyword is SAME. If you use different applications for each of your normal site and your secure site then that solution won't work. What you can do in that case is to send the sessionId() of the nonsecure site to the secure site, and viceversa. For example: To enter the secure site, use a link like : secure.jsp?nonsecureId=Nonsecure Id To reenter the non-secure site: nonsecure.jsp;jsessionId=Nonsecure Id?secureId=Secure Id To reenter the secure site: secure.jsp;jsessionId=Secure Id?nonsecureId=Nonsecure Id Wednesday, September 05, 2001, 9:34:33 PM, you wrote: GM i think there's a share=true attribute that you have to put in the web-site.xml file ??? check out the doco in www.orionserver.com GM - Original Message - GM From: Li GM To: Orion-Interest GM Sent: Wednesday, September 05, 2001 7:42 PM GM Subject: Session share problem. GM Hi, GM I have session share problem between ssl site and non-ssl site. My ssl site name is secure.mysite.com and non-ssl site name is www.mysite.com. when I start my server, and visit GM www.mysite.com firstly, everything goes well. But when I visit secure.mysite.com firstly after I starting my orion server, and then back to www.mysite.com every request on www.mysite.com create GM a new session. So my user login, shopping cart won't work!!! GM Is there any one can help me? GM Thanks! GM Jishan Li. -- Best regards, Rafaelmailto:[EMAIL PROTECTED]
RE: IIS Orion AJP13
The official response I received from K. Avedal (June 2001) about the AJP13 support: Hello, It was found to be broken and was deactivated until it's fixed. It seems the deactivation somehow didn't end up in changes.txt, sorry about that. Regards, Karl Avedal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: mercoledì 5 settembre 2001 10.52 To: Orion-Interest Subject: IIS Orion AJP13 I am using IIS as a frontend to Orion. Since the relese notes shows that Orion supports AJP13 (version 1.48), I figured that IIS could be configured to redirect specific http requests to Orion using the ajp13 protocol. As a starting point I tried to use and configure the isapi_redirect.dll (see link below) to work with Orion instead of Tomcat. Debug mode shows that it actually filters out the specified urls. The problem starts when talking to Orion, I get the tcp message: Error - Wrong message format. I haven´t found any documentation on how to use the ajp13 protocol with Orion or a specification of the protocol. Does somebody have some more information about ajp13 implementation in Orion? Tomcat IIS Howto (isapi_redirect.dll) http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-iis-howto.html) regards, Tore
UNSUSCRIBE
RE: Stored procedures and J2EE
Christian, It will make your life more complex, because it sounds like some of your business methods are built into the stored procedures (before j2ee, this was why we used stored procedures!). All in all, the cost of qa/qc on a new data model should be weighed against the cost of maitenance for the old data-modelin the future. Here are steps for a quick and dirty integration with j2ee: 1. create cmp's with the same datafields as your datastore. 2. if store procedures are used to create rows, then use a slsb to do this. You can embed the slsb within your cmp,or not. Typically, slsb's are usedas facades forspecific jdbc/sql actions. Essentially, the same stored procedures are used. 3. Use a slsb as a facade/controllor for all cmp access. Thus business methods which use stored procedures can be used, and if the business methods is in the cmp, then the cmp business method can be used. 4. Modify your cmp finders in your cmp to match the efficiency of the original pl/sql queries...easily done in Orion with the orion-ejb-jar.xml. Over time, you can drop store procedures as your qc verifies the accuracy of business methods in the slsb or cmp. With this approach you can achieve integration with j2ee quickly and the design allows you to migrate to a total j2ee solution in the future. Also, your j2ee client/web front will not have to change as the underlying data-structure is migrated from stored procedures to j2ee. regards, the elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian DonciulescuSent: Thursday, September 06, 2001 6:38 AMTo: Orion-InterestSubject: RE: Stored procedures and J2EE Thanks for your help. The reasonI want to use stored procedures it that we want to make use of a datamodel that we already have. This data-model uses stored procedures intensively. What would you suggest? Keep the data model as is and adapt the J2EE code to it or change the data-model so that we don't use the storedprocedures that much?Christian From: "The elephantwalker" <[EMAIL PROTECTED]> Reply-To: Orion-Interest <[EMAIL PROTECTED]> To: Orion-Interest <[EMAIL PROTECTED]> Subject: RE: Stored procedures and J2EE Date: Thu, 6 Sep 2001 02:23:29 -0700 A bean is just a representation of data in a datastore with a collection of finder and business methods. You can use cmp's to access data which is already in a datastore. A stateless session bean can be used to fire off your create procedures, and this slsb can be in your cmp create (or not, for that matter). As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more. If you are doing this to filter your output or because you need custom joins, etc. there are much easier ways to do this...such as using a custom finder method in orion (its a five minute job in the orion-ejb-jar.xml file) or a slsb. regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian Donciulescu Sent: Thursday, September 06, 2001 1:41 AM To: Orion-Interest Subject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business objects fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child objects table reference the primary key field of the parent objects table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parents initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans?
Re: Datasource info access restriction/encryption
OK, jag forstar precis, tack sa mycket. Please write in English! Sorry, my fault... One more time: Is there any way to have username/password in encrypted form in the datasources.xml file? I think, yes. data-source class=com.evermind.sql.DriverManagerDataSource name=Oracle schema=database-schemas/oracle.xml location=jdbc/OracleCoreDS xa-location=jdbc/xa/OracleXADS ejb-location=jdbc/OracleDS connection-driver=oracle.jdbc.driver.OracleDriver username=myuser password=mypass url=jdbc:oracle:thin:@oracleurl:1521:orcl inactivity-timeout=30 / You can inherit com.evermind.sql.DriverManagerDataSource and overlap his getConnection() method like this: package test; public class MyDriverManagerDataSource { protected String decriptPassword(String password) { // TO DO: decript and return decripted password } java.sql.Connection getConnection(String username, String password) { String realpass = decriptPassword(password); return super.getConnection(username, realpass); } } Put your test.MyDriverManagerDataSource to orion classpath. Change data-sources.xml: data-source class=test.MyDriverManagerDataSource !-- class changed! -- name=Oracle schema=database-schemas/oracle.xml location=jdbc/OracleCoreDS xa-location=jdbc/xa/OracleXADS ejb-location=jdbc/OracleDS connection-driver=oracle.jdbc.driver.OracleDriver username=myuser password=ErwERQ2r@rw !-- password encripted! -- url=jdbc:oracle:thin:@oracleurl:1521:orcl inactivity-timeout=30 /
Re: How to call A EJB in OC4j from other Servers
ciao i used to access a remote ejb from a servlet. put the home and remote in the -cp java option java -cp .\orion.jar;.yourhomeremote com.evermind.server.ApplicationServer code like this. the servlet: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; import java.net.*; import javax.naming.*; import javax.rmi.*; public class MyServlet extends HttpServlet { private static final String CONTENT_TYPE = text/html; public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Context context = null; Hashtable env = new Hashtable(); response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); //env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, paolo); env.put(java.naming.provider.url, ormi://localhost:23791/ejb2); //env.put(Context.PROVIDER_URL, ormi://localhost:23791/ejb1); env.put(java.naming.factory.initial, com.evermind.server.rmi.RMIInitialContextFactory); env.put(dedicated.connection ,true); try { out.println(EJBCellerServlet before context); context = new InitialContext (env); //context = new InitialContext (); out.println(EJBCallerServlet after context); } catch(Exception e) { e.printStackTrace(); } try { out.println(EJBCellerServlet before lookup); // MySessionEJBHome home = (MySessionEJBHome)context.lookup(MySessionEJB); Object objref = context.lookup(MySessionEJB1); // Object objref = context.lookup(java:comp/env/ejb/MySessionEJB1Home); out.println(EJBCellerServlet after lookup); out.println(EJBCellerServlet before cast); MySessionEJB1Home home = (MySessionEJB1Home)PortableRemoteObject.narrow(objref, MySessionEJB1Home.class); out.println(EJBCellerServlet after cast); MySessionEJB1 hello = home.create(); } catch (Exception e) { e.printStackTrace(out); } //response.setContentType(CONTENT_TYPE); //PrintWriter out = response.getWriter(); out.println(html); out.println(headtitleCallerServlet/title/head); out.println(body); out.println(pThe servlet has received a GET. This is the reply./p); out.println(/body/html); out.close(); } } and the web.xml file: ?xml version = '1.0' encoding = 'UTF-8'? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app descriptionEmpty web.xml file for Web Application/description servlet servlet-namemyservlet/servlet-name servlet-classMyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern/myservlet/url-pattern /servlet-mapping session-config session-timeout30/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list ejb-ref descriptiontest 3/description ejb-ref-nameMySessionEJB1/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeMySessionEJB1Home/home remoteMySessionEJB1/remote /ejb-ref /web-app hope this helps ciao Paolo Venkata_Nallam wrote: Dear All, I would like to know, how to invoke a EJB bean in OC4J from another machine. What are the steps I have to follow. It would appreciated if any one help in this regard. Thanking you With regards Venkata begin:vcard n:ramasso;paolo x-mozilla-html:FALSE adr:;; version:2.1 email;internet:[EMAIL PROTECTED] fn:paolo ramasso end:vcard
RE: How to call A EJB in OC4j from other Servers
Hi all, that is really good question as I am trying to make it running second day. Documentation says NOTHING about it or, at least I don't know where to search. If anybody could help it would be really great. ...or, at least share your experience concerning that point. thank you. -Original Message- From: Venkata_Nallam [mailto:[EMAIL PROTECTED]] Sent: 06 September 2001 15:14 To: Orion-Interest Subject: How to call A EJB in OC4j from other Servers Dear All, I would like to know, how to invoke a EJB bean in OC4J from another machine. What are the steps I have to follow. It would appreciated if any one help in this regard. Thanking you With regards Venkata
Re: Stored procedures and J2EE
I'm interested as to how you cansay this... we just did a series of tests here to see what the effect of pulling out some fairly complex stored procedures into CMP beans, and the performance impact was enormous. We've actually gone the other way, that is, developing stored procedures for each anticipated database. The fallback is that the logic is done in the beans, but that is a worst-case scenario. Now, I realize that this would be considered such bad form in a Sun-controlled world of pure J2EE that I hesitate to even mention it... but in the real world, any significant hit on performance is enough to convince us to denormalize a bit, so to speak. I don't think that you can say "there's absolutely no hit on performance" not to use stored procedures, particularly if that procedure requires repeated queries of the data in a pseudo-recursive way. Do you really think that any performance hit that we've seen is a result of poor design? I'm really interested in your reasoning. Rian - Original Message - From: The elephantwalker To: Orion-Interest Sent: Thursday, September 06, 2001 2:23 AM Subject: RE: Stored procedures and J2EE As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more.
Re: UNSUSCRIBE
- Original Message - From: Sadie Contini [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 10:51 AM Subject: UNSUSCRIBE
RE: Stored procedures and J2EE
Rian, If you access the stored procedures from a slsb, its just like you ran a jdbc from a stand alone program or a servlet, only you are using the middle-tier to provide the business method facade to the stored procedure. I would not recommend accessing the stored procedures through the cmp...use a slsb. If a create in the cmp is used, and the stored procedure is necessary for the create or postcreate, use the slsb from the cmp create or postcreate. An example of stored procedures is Jive's forum application. It uses stored procedures directly from jdbc calls. Jives runs the java forums on the sun site. I believe the code is freely available. I think the message filters are stored procedures, which means that every access of a forum message goes through a store procedure from a servlet...and this forum ispretty darnfastso there should be no bottle neck from using jdbc and store procedures. As for migrating the business methods from the stored procedures to the slsb's, this can be done more easily if the slsb is used as a facade for the cmp. Thus you can use business methods which require direct jdbc access (count(), for example versus a cmp findAll().size()) or cmp access or stored procedures (again, jdbc access) as necessary for performance. So...if the architecture is properly implemented, there should be no hit on performance. Regards, the elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rian SchmidtSent: Thursday, September 06, 2001 9:51 AMTo: Orion-InterestSubject: Re: Stored procedures and J2EE I'm interested as to how you cansay this... we just did a series of tests here to see what the effect of pulling out some fairly complex stored procedures into CMP beans, and the performance impact was enormous. We've actually gone the other way, that is, developing stored procedures for each anticipated database. The fallback is that the logic is done in the beans, but that is a worst-case scenario. Now, I realize that this would be considered such bad form in a Sun-controlled world of pure J2EE that I hesitate to even mention it... but in the real world, any significant hit on performance is enough to convince us to denormalize a bit, so to speak. I don't think that you can say "there's absolutely no hit on performance" not to use stored procedures, particularly if that procedure requires repeated queries of the data in a pseudo-recursive way. Do you really think that any performance hit that we've seen is a result of poor design? I'm really interested in your reasoning. Rian - Original Message - From: The elephantwalker To: Orion-Interest Sent: Thursday, September 06, 2001 2:23 AM Subject: RE: Stored procedures and J2EE As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more.
RE: Stored procedures and J2EE
I (empirically) reached the same conclusion; but instead of dropping CMP, we provided performance improvements ON TOP of the EJB's (VO's and VO caches). Thank god we did it this way, because the DB can't scale as easily as the app-server cluster. My 2c, JP -Original Message-From: Rian Schmidt [mailto:[EMAIL PROTECTED]]Sent: Jueves, 06 de Septiembre de 2001 12:51To: Orion-InterestSubject: Re: Stored procedures and J2EE I'm interested as to how you cansay this... we just did a series of tests here to see what the effect of pulling out some fairly complex stored procedures into CMP beans, and the performance impact was enormous. We've actually gone the other way, that is, developing stored procedures for each anticipated database. The fallback is that the logic is done in the beans, but that is a worst-case scenario. Now, I realize that this would be considered such bad form in a Sun-controlled world of pure J2EE that I hesitate to even mention it... but in the real world, any significant hit on performance is enough to convince us to denormalize a bit, so to speak. I don't think that you can say "there's absolutely no hit on performance" not to use stored procedures, particularly if that procedure requires repeated queries of the data in a pseudo-recursive way. Do you really think that any performance hit that we've seen is a result of poor design? I'm really interested in your reasoning. Rian - Original Message - From: The elephantwalker To: Orion-Interest Sent: Thursday, September 06, 2001 2:23 AM Subject: RE: Stored procedures and J2EE As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more.
Auto-reply: Re: Stored procedures and J2EE
I will be on vacation with no access to email until September 10, 2001. For issues concerning the Online Studio, please contact Jiong Wang ( [EMAIL PROTECTED] ). For issues concerning device support (including stylesheets), please contact Young Lee ( [EMAIL PROTECTED] ). Thanks, Attila Bodis Development Manager, Mobile Hosting I'm interested as to how you cansay this... we just did a series of tests here to see what the effect of pulling out some fairly complex stored procedures into CMP beans, and the performance impact was enormous. We've actually gone the other way, that is, developing stored procedures for each anticipated database. The fallback is that the logic is done in the beans, but that is a worst-case scenario. Now, I realize that this would be considered such bad form in a Sun-controlled world of pure J2EE that I hesitate to even mention it... but in the real world, any significant hit on performance is enough to convince us to denormalize a bit, so to speak. I don't think that you can say "there's absolutely no hit on performance" not to use stored procedures, particularly if that procedure requires repeated queries of the data in a pseudo-recursive way. Do you really think that any performance hit that we've seen is a result of poor design? I'm really interested in your reasoning. Rian - Original Message - From: The elephantwalker To: Orion-Interest Sent: Thursday, September 06, 2001 2:23 AM Subject: RE: Stored procedures and J2EE As for distributing your business logic between the datastore and middle tier...aren't you making your life more complex than it needs to be? There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more.
Instantiating a SAX parser (Xerces)
I am trying to instantiate a SAX parser with the following code in a JSP: // Instantiate a parser XMLReader parser = XMLReaderFactory.createXMLReader(org.apache.xerces.parsers.SAXParser); However, each time I do I receive the following exception: 500 Internal Server Error java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:118) at /report/index.ibs._jspService(/report/index.ibs.java:95) (JSP page line 45) at com.orionserver[Orion/1.5.2 (build 10460)].http.OrionHttpJspPage.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)].server.http.JSPServlet.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source) I have imported the proper packages and installed xerces.jar in the lib directory of WEB-INF, however, I am unable to get this to work. For the record, in a standalone java app, the instantiation of a parser works beautifully. Any help you can offer is appreciated. -dhs
RE: Stored procedures and J2EE
Using EJB means that you can use CMP, BMP or an Object/Relation Mapping tool. I have found CMP to be very limited. I have found BMP with stored procedures way moreflexible when working with relational database and I have found Object/Relation mapping even better. An O/R mapping tool like Cocobase allows youdecouple your objects from your data model via dynamic binding. CMP will tightly bind your objects to your data - which according to the Patterns community is a bad thing. My experiencewith CMP leads me to believe that its creators/supporters area religious myopic bunch. First there is EJB 1.0, then EJB 1.1 and now EJB 2.0 which btw cannot handle Primary Key creation via Identity/Sequence column without a hack. In heterogeneous environments where you have multiple applications talking to the same database, thedatabase engine must be in charge of Primary key generation. As for "There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more." It is a fact that static SQL runs faster that dynamic SQL, and (generally) pre-compiled Stored procedures run faster than static SQL. So, in a model that employs multiple tiers, improving the speed in one tier can improve the overall speed of you application, watch out for network I/O though. My 2 cents, Bill G... -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian DonciulescuSent: Thursday, September 06, 2001 1:41 AMTo: Orion-InterestSubject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business object's fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child object's table reference the primary key field of the parent object's table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parent's initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans? Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Session share problem.
In order to share a web-app between a HTTP and HTTPS site at the same context path, do the following. I just tried this on my machine and it works fine. I am using Orion1.5.2 on Windows2000. config/server.xml - ?xml version=1.0? !DOCTYPE application-server PUBLIC Orion Application Server Config http://www.orionserver.com/dtds/application-server.dtd; application-server application-directory=../applications deployment-directory=../application-deployments ... web-site path=./default-web-site.xml/ web-site path=./secure-web-site.xml/ ... /application-server config/default-web-site.xml --- ?xml version=1.0? !DOCTYPE web-site PUBLIC Orion Web-site http://www.orionserver.com/dtds/web-site.dtd; web-site port=80 secure=false display-name=Default Orion WebSite default-web-app application=default name=defaultWebApp shared=true/ ... /web-site config/secure-web-site.xml --- ?xml version=1.0? !DOCTYPE web-site PUBLIC Orion Web-site http://www.orionserver.com/dtds/web-site.dtd; web-site port=443 secure=true display-name=Secure Orion WebSite ssl-config keystore=../keys/server.keystore keystore-password=myPassword / default-web-app application=default name=defaultWebApp shared=true / ... /web-site and delete the file D:\orion\application-deployments\default\defaultWebApp\persistence\state.ser before restarting orion. Good Luck.
RE: Stored procedures and J2EE
Well I do like R.E.M., and that religion song, but interestingly enough, I don't wear glasses ;). But seriously, I have also tried this both way's. And cmp dev can be done in 1/4 the time...see below for performance comparisons. Take a look at McGouphlin's column on pk generation in the Flashzone. You can use orion's home-grown pk generation (this is fast and works everytime, and is based upon the database ;)), or you can use slsb's and the database to create your pk's. Fast and safe, and no triggers. Sql finds with joins and the like will always be with us, but these are fast and easy to do in orion (see the orion-ejb-jar.xml doc's) and where necessary slsb's can be used. oo mapping is also easy to do with orion (using Set and Collection's are a one line affair in the cmp ejb). There is a place for stored procedures...but their need is usually very specific. However, its important that implementers stay away from stored procedures as a solution for all performance problems. One jvm in a database cannot compete with 42 or more jvm's in a fully distributed application. In the extreme case of a filter on text output, the app-servers' jvms will leave the database jvm in the dust. Seriously, there is room for agreement here. I was asked a question on a specific project and how to use j2ee to transition an older database from store-procedures to j2ee business methods. I gave a very low risk strategy for doing this. Its important the project members test performance at every step during the project. There is no one and all encompasing solution to bring legacy database applications into the 21st century. j2ee, cmp ejb's, and slsb's are just some of many tools in our quiver to solve these problems. Regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill G Sent: Thursday, September 06, 2001 1:40 PM To: Orion-Interest Subject: RE: Stored procedures and J2EE Using EJB means that you can use CMP, BMP or an Object/Relation Mapping tool. I have found CMP to be very limited. I have found BMP with stored procedures way more flexible when working with relational database and I have found Object/Relation mapping even better. An O/R mapping tool like Cocobase allows you decouple your objects from your data model via dynamic binding. CMP will tightly bind your objects to your data - which according to the Patterns community is a bad thing. My experience with CMP leads me to believe that its creators/supporters are a religious myopic bunch. First there is EJB 1.0, then EJB 1.1 and now EJB 2.0 which btw cannot handle Primary Key creation via Identity/Sequence column without a hack. In heterogeneous environments where you have multiple applications talking to the same database, the database engine must be in charge of Primary key generation. As for There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more. It is a fact that static SQL runs faster that dynamic SQL, and (generally) pre-compiled Stored procedures run faster than static SQL. So, in a model that employs multiple tiers, improving the speed in one tier can improve the overall speed of you application, watch out for network I/O though. My 2 cents, Bill G... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian Donciulescu Sent: Thursday, September 06, 2001 1:41 AM To: Orion-Interest Subject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business object's fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the primary key of the child object's table reference the primary key field of the parent object's table. This reference means that the child inherits the fields of the parent. Thus, the constructor of a child object, which is passed all the parameters required for itself and its parent's initialization, will call the constructor of its parent passing the appropriate parameters. The question is: How could such constructors be used without conflicting with the create methods of the CMP entity beans? Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: Auto-reply: Re: Stored procedures and J2EE
-Original Message- From: ATTILA.BODIS [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 2:27 PM To: Orion-Interest Subject: Auto-reply: Re: Stored procedures and J2EE I will be on vacation with no access to email until September 10, 2001. For issues concerning the Online Studio, please contact Jiong Wang ( [EMAIL PROTECTED] ). For issues concerning device support (including stylesheets), please contact Young Lee ( [EMAIL PROTECTED] ). Thanks, Attila Bodis Development Manager, Mobile Hosting
UNSUSCRIBE
RE: Stored procedures and J2EE
One jvm in a database cannot compete with 42 or more jvm's in a fully distributed application. In the extreme case of a filter on text output, the app-servers' jvms will leave the database jvm in the dust. That might be true if you had one jvm in one db host, but the reality is that a cluster of db hosts that share state like Sybase ASE have operated within the most intensive applications environments around, like the NYSE for example. Bill G. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of The elephantwalker Sent: Thursday, September 06, 2001 3:00 PM To: Orion-Interest Subject: RE: Stored procedures and J2EE Well I do like R.E.M., and that religion song, but interestingly enough, I don't wear glasses ;). But seriously, I have also tried this both way's. And cmp dev can be done in 1/4 the time...see below for performance comparisons. Take a look at McGouphlin's column on pk generation in the Flashzone. You can use orion's home-grown pk generation (this is fast and works everytime, and is based upon the database ;)), or you can use slsb's and the database to create your pk's. Fast and safe, and no triggers. Sql finds with joins and the like will always be with us, but these are fast and easy to do in orion (see the orion-ejb-jar.xml doc's) and where necessary slsb's can be used. oo mapping is also easy to do with orion (using Set and Collection's are a one line affair in the cmp ejb). There is a place for stored procedures...but their need is usually very specific. However, its important that implementers stay away from stored procedures as a solution for all performance problems. One jvm in a database cannot compete with 42 or more jvm's in a fully distributed application. In the extreme case of a filter on text output, the app-servers' jvms will leave the database jvm in the dust. Seriously, there is room for agreement here. I was asked a question on a specific project and how to use j2ee to transition an older database from store-procedures to j2ee business methods. I gave a very low risk strategy for doing this. Its important the project members test performance at every step during the project. There is no one and all encompasing solution to bring legacy database applications into the 21st century. j2ee, cmp ejb's, and slsb's are just some of many tools in our quiver to solve these problems. Regards, the elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill G Sent: Thursday, September 06, 2001 1:40 PM To: Orion-Interest Subject: RE: Stored procedures and J2EE Using EJB means that you can use CMP, BMP or an Object/Relation Mapping tool. I have found CMP to be very limited. I have found BMP with stored procedures way more flexible when working with relational database and I have found Object/Relation mapping even better. An O/R mapping tool like Cocobase allows you decouple your objects from your data model via dynamic binding. CMP will tightly bind your objects to your data - which according to the Patterns community is a bad thing. My experience with CMP leads me to believe that its creators/supporters are a religious myopic bunch. First there is EJB 1.0, then EJB 1.1 and now EJB 2.0 which btw cannot handle Primary Key creation via Identity/Sequence column without a hack. In heterogeneous environments where you have multiple applications talking to the same database, the database engine must be in charge of Primary key generation. As for There is absolutely no hit on performance if you pull out all of your business logic into a slsb or cmp...there's just no need to use store procedures any more. It is a fact that static SQL runs faster that dynamic SQL, and (generally) pre-compiled Stored procedures run faster than static SQL. So, in a model that employs multiple tiers, improving the speed in one tier can improve the overall speed of you application, watch out for network I/O though. My 2 cents, Bill G... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cristian Donciulescu Sent: Thursday, September 06, 2001 1:41 AM To: Orion-Interest Subject: Stored procedures and J2EE Is it possible (and recommended) to use stored procedures with the J2EE architecture? We would be interested in creating objects directly into the database, bypassing the create method of the enterprise bean. Is this possible when using CMP (Container Managed Persistence)? If not, in your opinion, which is best: using BMP and stored procedures or using CMP? Example: We have an Oracle DB that uses packages associated to the business objects of the system. These packages contain the PL/SQL methods of the corresponding business objects. Additionally every business object's fields are stored as columns of a specific table. The constructor of a business object is also a method in the associated package. The inheritance relation between two objects is modeled by making the
UNSUSCRIBE
-- ???: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] : 2001?9?7? ?? 03:58 ???: [EMAIL PROTECTED] ??: Re: UNSUSCRIBE - Original Message - From: Sadie Contini [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 10:51 AM Subject: UNSUSCRIBE
Re: Re[2]: Session share problem.
Thanks, Greg Rafael. I post this message yesterday but it was lost, I think. Try again today, hope to get some help. Yes. I have share="true", the secure and non-secure site is within a SAME application. My configs like followings.. 1) when I start the orionserver, d:\orionjava -jar orion.jarOrion/1.4.5 initialized 2) Then I typed https://secure.mysite.com in my web browser, to request my webapp. The webapp ran. 3) And then I came back to http://www.mysite.com and tried to put some products to the shopping cart, the shopping cart was alway empty. I placed this in my cart detail page, % System.out.println("session is new - " + session.isNew()); % The console was always printing session is new - true . It seems that the server creates a new session for EACH http request. 4) but if I restart the orionserver now. 5) And I visit http://www.mysite.com first, this time. shopping cart works. and session share between www.mysite.com and secure.mysite.com works fine. Does the server start the app in different way according to the protocol of the first request could you provide more help? Thank you! Jishan Li. default-web-site.xml?xml version="1.0"?!DOCTYPE web-site PUBLIC "Orion Web-site" "http://www.orionserver.com/dtds/web-site.dtd"web-site host="[ALL]" port="80" display-name="Default Orion WebSite"default-web-app application="default" name="defaultWebApp" /web-app application="myweb" name="myWeb" root="/" shared="true" /access-log path="../log/default-web-access.log" //web-site =secure-web-site.xml=?xml version="1.0"?!DOCTYPE web-site PUBLIC "Orion Web-site" "http://www.orionserver.com/dtds/web-site.dtd"web-site host="[ALL]" display-name="Default Orion WebSite" secure="true" default-web-app application="default" name="defaultWebApp" /web-app application="myweb" name="myWeb" root="/" shared="true"/access-log path="../log/default-web-access.log" /ssl-config keystore="../my/keystore" keystore-password="123456" //web-site =server.xml=?xml version="1.0"?!DOCTYPE application-server PUBLIC "Orion Application Server Config" "http://www.orionserver.com/dtds/application-server.dtd"application-serverapplication-directory="../applications"deployment-directory="../application-deployments"rmi-config path="./rmi.xml" /jms-config path="./jms.xml" /principals path="./principals.xml" /logfile path="../log/server.log" //logglobal-application name="default" path="application.xml" /global-web-app-config path="global-web-application.xml" /web-site path="./default-web-site.xml" /web-site path="./secure-web-site.xml" /application name="myweb" path="../applications/myweb.ear" //application-server =/EWB-INF/orion-web.xml=?xml version="1.0"?!DOCTYPE orion-web-app PUBLIC "-//Evermind//DTD Orion Web Application 2.3//EN" "http://www.orionserver.com/dtds/orion-web.dtd"orion-web-appdeployment-version="1.3.8"jsp-cache-directory="./persistence"temporary-directory="./temp"servlet-webdir="/servlet/"session-tracking cookie-domain=".mysite.com"/ejb-ref-mapping location="ejb/applicationservice" name="ejb/applicationservice" //orion-web-app
Re: Session share problem.
My problem is that if the first request to the webapp is https://... , session share is not proper. If the first request is http://.. everything goes well! What is the problem? - Original Message - From: Al-Akhras, Khaled [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Friday, September 07, 2001 5:12 AM Subject: Re: Session share problem. In order to share a web-app between a HTTP and HTTPS site at the same context path, do the following. I just tried this on my machine and it works fine. I am using Orion1.5.2 on Windows2000. config/server.xml - ?xml version=1.0? !DOCTYPE application-server PUBLIC Orion Application Server Config http://www.orionserver.com/dtds/application-server.dtd; application-server application-directory=../applications deployment-directory=../application-deployments ... web-site path=./default-web-site.xml/ web-site path=./secure-web-site.xml/ ... /application-server config/default-web-site.xml --- ?xml version=1.0? !DOCTYPE web-site PUBLIC Orion Web-site http://www.orionserver.com/dtds/web-site.dtd; web-site port=80 secure=false display-name=Default Orion WebSite default-web-app application=default name=defaultWebApp shared=true/ ... /web-site config/secure-web-site.xml --- ?xml version=1.0? !DOCTYPE web-site PUBLIC Orion Web-site http://www.orionserver.com/dtds/web-site.dtd; web-site port=443 secure=true display-name=Secure Orion WebSite ssl-config keystore=../keys/server.keystore keystore-password=myPassword / default-web-app application=default name=defaultWebApp shared=true / ... /web-site and delete the file D:\orion\application-deployments\default\defaultWebApp\persistence\state.ser before restarting orion. Good Luck. ÿÿü:¢æÿügÊ«~·ÿ¡¢Ü¢fv·¬±«a¶Úÿÿù_òj(ýÊ
Debugging with Orion/Kawa Pro 5.0
I appreciate Dave Smith's write-up on debugging with Orion/Kawa but, unfortunately, I think I'm missing something and need more info. Here is what I did: Created a new project with all of my java files (servlets, EJBs, and regular Java). Added Orion.jar to the Kawa classpath. Set the class to run to com.evermind.server.ApplicationServer Made sure JVMDI was turned off Added breakpoints, hit F5 and... nothing happens, I don't see orion starting in Kawa's output pane... I don't see anything. Next, I open a web browser set to a localhost url that works fine when I run Orion from DOS and, of course, the page is not found. Because Orion hasn't started, I'm sure. Does anybody know what I'm doing wrong (Why Kawa isn't starting Orion)? Below I'll print Dave Smith's debugging tips, if anybody can tell me anything that is missing I would greatly appreciate it. Thanks, Dennis Dave Smith adds: Debugging with Orion and Kawa is a pleasure. Get Kawa Pro (not the enterprise version) from Tek-Tools and install it. Configure your JDK as required when you first run Kawa. (Note that Kawa is a Win32 application, which is one of the reasons I don't use it.) Create a new project for your servlets or EJBs. Add orion.jar, any additional jars required by the application, and the deployed class directory (i.e., c:\applications\myApp\myApp-web\WEB-INF\classes or c:\applications\myApp\myApp-ejb, or both). From the Project/Interpreter menu, set the Java class to run to com.evermind.server.ApplicationServer and remember to tell it to use this class (as this image, given me by Chris Miller, shows). Turn off JVMDI debugger from the Customize/Options/Advanced Paths form, which is for performance only and is not vital. Add the breakpoints to your servlets and/or EJBs. F5 starts debugging, and Dave adds to Relax, sit back and enjoy the ride. The speed kills NetBeans dead. Also from Dave: For a real screamer, use Jikes: Customize/Options/Advanced Paths/Compiler = D:\jikes\jikes.exe +E And set Orion to use jikes from $ORION/server.xml.
Re: Re[2]: Session share problem.
Dear Rafael: Thanks a lot. I've solved the session share problem. I found the clue in your old message: http://www.mail-archive.com/orion-interest@orionserver.com/msg15659.html Sometimes I can't post message to the mailing list, so I email you, and thank you. I think it is someting different between the two ways to load the web application. If the first request is via https, it load as a secure instance first, otherwise, as a non-secure instance first. What I need to do is to make sure it startup and load the app as a non-secure instance first. So I use the load-on-startup attribute. web-app application=mywebapp name=myweb root=/ shared=true load-on-startup=true / for non secure web-site.xml web-app application=mywebapp name=myweb root=/ shared=true load-on-startup=false / for secure web-site.xml Thanks again! Jishan - Original Message - From: Rafael Alvarez [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, September 06, 2001 10:20 PM Subject: Re[2]: Session share problem. Hello Jishan, There is an option (shared=true as stated in other posting) to share session between different instances of the SAME application. The keyword is SAME. If you use different applications for each of your normal site and your secure site then that solution won't work. What you can do in that case is to send the sessionId() of the nonsecure site to the secure site, and viceversa. For example: To enter the secure site, use a link like : secure.jsp?nonsecureId=Nonsecure Id To reenter the non-secure site: nonsecure.jsp;jsessionId=Nonsecure Id?secureId=Secure Id To reenter the secure site: secure.jsp;jsessionId=Secure Id?nonsecureId=Nonsecure Id Wednesday, September 05, 2001, 9:34:33 PM, you wrote: GM i think there's a share=true attribute that you have to put in the web-site.xml file ??? check out the doco in www.orionserver.com GM - Original Message - GM From: Li GM To: Orion-Interest GM Sent: Wednesday, September 05, 2001 7:42 PM GM Subject: Session share problem. GM Hi, GM I have session share problem between ssl site and non-ssl site. My ssl site name is secure.mysite.com and non-ssl site name is www.mysite.com. when I start my server, and visit GM www.mysite.com firstly, everything goes well. But when I visit secure.mysite.com firstly after I starting my orion server, and then back to www.mysite.com every request on www.mysite.com create GM a new session. So my user login, shopping cart won't work!!! GM Is there any one can help me? GM Thanks! GM Jishan Li. -- Best regards, Rafaelmailto:[EMAIL PROTECTED] ÿÿü:¢æÿügÊ«~·ÿ¡¢Ü¢fv·¬±«a¶Úÿÿù_òj(ýÊ
Re: How to call A EJB in OC4j from other Servers
ciao you hato do code somethibg like this: import addressbook.ejb.*; import javax.ejb.*; import java.rmi.*; import javax.rmi.PortableRemoteObject; import javax.naming.*; import java.util.*; import java.net.*; public class AddressBookClient extends java.lang.Object { public AddressBookClient() { Context context = null; final String location = java:comp/env/ejb/AddressBook; addressbook.ejb.AddressBook addressBook = null; Hashtable env = new Hashtable(); env.put(java.naming.provider.url, ormi://localhost/addressbook); env.put(java.naming.factory.initial, com.evermind.server.ApplicationClientInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, paolo); try { context = new InitialContext (env); // paolo for remote ejb lookup context = new InitialContext(); } catch (Exception e) { e.printStackTrace(); } try { System.out.println(before lookup); Object boundObject = context.lookup(location); System.out.println(after lookup); // Try to convert it to an instance of AddressBook, the home // interface for our bean. System.out.println(before cast); addressBook = (addressbook.ejb.AddressBook) PortableRemoteObject.narrow(boundObject, addressbook.ejb.AddressBook.class); System.out.println(after cast); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args){ new AddressBookClient(); } } and you need a application-client.xml like this: ?xml version=1.0? !DOCTYPE application-client PUBLIC -//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN http://java.sun.com/j2ee/dtds/application-client_1_2.dtd; application-client display-nameAddressbook/display-name ejb-ref ejb-ref-nameejb/AddressBook/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homeaddressbook.ejb.AddressBook/home remoteaddressbook.ejb.AddressEntry/remote /ejb-ref /application-client put it in a meta-inf dir under the root where you run your client ciao Paolo Venkata_Nallam wrote: Dear paola, I am thankful to you for your help. I need to call the EJB from remote machine in a STANDALONE APPLICATION, not servlets or jsp. Which class/interface files I have to copy to remove and which configuration xml file we have to write at remote machine. Thanking you With regards Venkata begin:vcard n:ramasso;paolo x-mozilla-html:FALSE adr:;; version:2.1 email;internet:[EMAIL PROTECTED] fn:paolo ramasso end:vcard