RE: Class.newInstance() Fails with InstantiationException.
What exactly does it do when it gets instantiated? -Original Message-From: Bill Winspur [mailto:[EMAIL PROTECTED]]Sent: Monday, February 04, 2002 9:47 PMTo: Orion-InterestSubject: Class.newInstance() Fails with InstantiationException. I have a servlet that would instantiate anobject, if everything worked. Unfortunately, it fails with the following exception from the Class.newInstance() method: java.lang.InstantiationException: com.wynnon.appletChannel.test.EchoingPort where EchoingPort is the class I would instantiate from. The api says this about the Exception thrown by newInstance(): InstantiationException - Thrown if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the instantiation fails for some other reason. I printed all the modifiers for the the class, and it is not an interface, not abstract, etc. The odd thing is, if I run the instantiation code outside orion,EchoingPort instantiates properly. Questions Does orion intervene somehow in the instantiation process ? Does anybody have a clue what I'm doing wrong ? Disclaimer This communication together with any attachments transmitted with it ('this E-mail') is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are notified that any use of this E-mail is prohibited. Addressees should check this E-mail for viruses. The Carphone Warehouse Group PLC makes no representations as regards the absence of viruses in this E-mail. If you have received this E-mail in error please notify our ISe Response Team immediately by telephone on + 44 (0)20 8896 5828 or via E-mail at [EMAIL PROTECTED] Please then immediately destroy this E-mail and any copies of it. Please feel free to visit our website: http://www.phonehouse.com
RE: EJB Sharing between applications
If you search the archives you will find my writup on this. It is not possible from within an Orion J2EE container (either web or ejb). Not only that, it is not possible to call EJBs in another instance of the same application (that is, more than one other REMOTE instance - you can call ONE other remote instance using the orion specificconfiguration)from within an Orion J2EE container. This is a severe limitation and one that will need to be addressed if Orion hopes to be ejb 1.3 compliant. There is a hack that MIGHT work if there are no circular dependencies between your EARs. You can have one application be a parent of another, and a third application be the parent of the first parent. We started experimenting with this when we decieded that it was too restrictive and we went with another J2EE imlpementation. I'm hoping that Orion fixes this problem because all in all if they fix their JNDI issues (which isthe sourceof this problem)it's not a poor quality server. -Original Message-From: Jorge Jimenez C [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 05, 2002 6:58 AMTo: Orion-InterestSubject: EJB Sharing between applications Hello everyone. I'm testing orion for use in a variety of applications. Our software company have developed many J2EE components in the form of diferents applications (diferents EAR files) that interact with each other throught its EJB and JSP pages. Reading the document at http://www.orionserver.com/docs/remote-access/remote-access.xmlI see that one application can only use funcionality from only one other application (a parent application defined in server.xml). We need to use services from EJB's in many other applications. I think there must be another way to share EJB's functionality between applications (without going throught network layer, i hope). Please, any directions will be welcome Thanks in advance.
Orion load balancing
Hi, We are planning a production environment for a J2EE application and are now wondering what kind of loads Orion can handle, say in a 2 CPU Intel with 512M RAM system? How many concurrent sessions can a box like that handle? We probably need load balancing and clustering, so I'd like to know your experiences regarding Orion about this? With Orion there comes a loadbalancer.jar, how functioning is this tool? What are my other options (I think Apache could be acting as a front end for the Orion app servers too, right?) and do they offer something that Orion's loadbalancer doesn't? Regards, Peter
Re: Class.newInstance() Fails with InstantiationException.
Obvious Question hj (in this case, com.wynnon.appletChannel.test.EchoingPort) does have a no-arg constructor, right? In other words, Object obj = new EchoingPort() is legal? /Obvious Question -Steve Bill Winspur wrote: The echoing port never gets instantiated, the attempt to instantiate, by invoking Class.newInstance(), throws an InstantiationException. However, if you are asking what is the function of EchoingPort? ... it is a test stub for for the session side of an http tunneling package to support applet/client access to ejb's via http. The relevant code follows: /** * Instantiates the session port if not yet done */ private void instantiateIt(String className) throws Exception { Class hj = null; try { hj = Class.forName(className); System.out.println( class: + hj + \n. isInterface: + hj.isInterface() + \n. isArray: + hj.isArray() + \n. isPrimitive: + hj.isPrimitive() + \n. isAbstract: + Modifier.isAbstract(hj.getModifiers()) + \n. isFinal: + Modifier.isFinal(hj.getModifiers()) + \n. isNative: + Modifier.isNative(hj.getModifiers()) + \n. isPrivate:+ Modifier.isPrivate(hj.getModifiers()) + \n. isProtected: + Modifier.isProtected(hj.getModifiers()) + \n. isPublic: + Modifier.isPublic(hj.getModifiers()) + \n. isStatic: + Modifier.isStatic(hj.getModifiers()) + \n. isStrict: + Modifier.isStrict(hj.getModifiers()) + \n. isStrict: + Modifier.isStrict(hj.getModifiers()) + \n. isTransient: + Modifier.isTransient(hj.getModifiers()) + \n. isVolatile: + Modifier.isVolatile(hj.getModifiers()) ); try { Object oj = hj.newInstance(); trace(obj: + oj); trace(Instantiated: + hj); } catch (InstantiationException e) { throw new Exception( Cant instantiate a session object: + e); } catch (IllegalAccessException e) { throw new Exception( Cant instantiate a session object + e); } } catch (Exception ex) { throw new Exception( Failed to instantiate className: + className + \n + ex.toString() ); } } private void trace(String s) { System.out.println(s); } [snip to save bandwidth] -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
apache + orion
Hello, I recently started up Orion on 127.0.0.1:8090 with apache serving up the front end. I have the proxy service working great, but I would like to get Orion to answer all .jsp request similar to how I have php setup. Is this possible? Thanks in advance. Justen Stepka
Re: EJB Sharing between applications
Thanks Jim. Anyway, what's the specific sintax for declaring a remote location to find an EJB within orion-web.xml. I guess it might be the "location" attribute in the ejb-mapping tag with an external jndi reference. It is posible ? JJ - Original Message - From: Carroll, Jim To: Orion-Interest Sent: Tuesday, February 05, 2002 10:07 AM Subject: RE: EJB Sharing between applications If you search the archives you will find my writup on this. It is not possible from within an Orion J2EE container (either web or ejb). Not only that, it is not possible to call EJBs in another instance of the same application (that is, more than one other REMOTE instance - you can call ONE other remote instance using the orion specificconfiguration)from within an Orion J2EE container. This is a severe limitation and one that will need to be addressed if Orion hopes to be ejb 1.3 compliant. There is a hack that MIGHT work if there are no circular dependencies between your EARs. You can have one application be a parent of another, and a third application be the parent of the first parent. We started experimenting with this when we decieded that it was too restrictive and we went with another J2EE imlpementation. I'm hoping that Orion fixes this problem because all in all if they fix their JNDI issues (which isthe sourceof this problem)it's not a poor quality server. -Original Message-From: Jorge Jimenez C [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 05, 2002 6:58 AMTo: Orion-InterestSubject: EJB Sharing between applications Hello everyone. I'm testing orion for use in a variety of applications. Our software company have developed many J2EE components in the form of diferents applications (diferents EAR files) that interact with each other throught its EJB and JSP pages. Reading the document at http://www.orionserver.com/docs/remote-access/remote-access.xmlI see that one application can only use funcionality from only one other application (a parent application defined in server.xml). We need to use services from EJB's in many other applications. I think there must be another way to share EJB's functionality between applications (without going throught network layer, i hope). Please, any directions will be welcome Thanks in advance.
OpenJMS and external JNDI
Has anyone successfully configured OpenJMS or Orion to cache the TopicConnectionFactory into the Orion JNDI name space? Essentially, I want to be able to lookup the TopicConnectionFactory using an RMIInitialContextFactory instead of the exolab RmiJndiInitialContextFactory. If so, what config files did you need to change or what doc's did you use to do the config? Daniel
Sendemi...???
Title: Yalnýz Kalma... Yalnýzlýktan sýkýldýnýz mý? Hepimiz zaman zaman bir dosta, bir sevgiliye ya da bir dert ortaðýna ihtiyaç duymuþuzdur deðil mi ? Peki ya o dostun sizlere bir click ötede olduðunu söylersem ne dersiniz? Þimdi sizlere bahsedeceðim sitede, yüzbinlerce erkek ve kýz derdinizi paylaþmak için hazýr bekliyor. Bu siteye üye olursanýz yalnýzlýðýnýza bir son verecek belki de yeni bir sevgili bulacaksýnýz. Sitenin yaklaþýk 50.000 Türk üyesi bulunuyor ve herbiri Türkiye'nin deðiþik yerlerinden erkek ya da bayanlar. Bu site ücretsiz olarak faaliyet gösteriyor yani ne kredi kartý ne de önemli bilgiler vermeniz gerekir. Yalnýzca kendinizi tanýtýp, ömür boyu sürecek dostluklar kuracaksýnýz. Siteye üye olmak hakkýnda ayrýntýlý bilgi için sitelerimiz : SÝTELERÝMÝZ : Biri çalýþmassa diðerini deneyebilirsiniz. SÝTE 1 SÝTE 2 SÝTE 3 SÝTE 4 SÝTE 5 SÝTE 6 Eðer bir daha bizden e-mail almak istemiyorsanýz lütfen bu maila subject kýsmýna emailinizi yazarak bos bir mailla cevap veriniz.Ýyi günler..
OpenJMS and external JNDI
Has anyone successfully configured OpenJMS to bind the TopicConnectionFactory into the Orion JNDI name space? Essentially, I want to be able to lookup the TopicConnectionFactory using an RMIInitialContextFactory instead of the exolab RmiJndiInitialContextFactory. If so, what config files did you need to change or what doc's did you use to do the config? Daniel
Re: Class.newInstance() Fails with InstantiationException.
Thank you Stephen. That nailed it. The problem was not so obvious to me. Although the API doc for Class.newInstance(), does not state it explicitly, you must code a no-args constructor into the class to instantiate it using newInstance(). Replacing my 1 arg constructor witha no-argconstructor and a setter method fixed my problem. The behaviour of of Class.newInstance() and Class.create(object), which implements programmaticinstantiation using constructors with arguments,is documented in theJava Tutorial. RYFM strikes again. - Original Message - From: "Stephen Davidson" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 9:08 AM Subject: Re: Class.newInstance() Fails with InstantiationException. Obvious Question hj (in this case, com.wynnon.appletChannel.test.EchoingPort) does have a no-arg constructor, right? In other words, Object obj = new EchoingPort() is legal? /Obvious Question -Steve Bill Winspur wrote: The echoing port never gets instantiated, the attempt to instantiate, by invoking Class.newInstance(), throws an InstantiationException. However, if you are asking what is the function of EchoingPort? ... it is a test stub for for the session side of an http tunneling package to support applet/client access to ejb's via http. The relevant code follows: /** * Instantiates the session port if not yet done */ private void instantiateIt(String className) throws Exception {Class hj = null; try { hj = Class.forName(className); System.out.println( "class: " + hj + "\n. isInterface: " + hj.isInterface() + "\n. isArray: " + hj.isArray() + "\n. isPrimitive: " + hj.isPrimitive() + "\n. isAbstract: " + Modifier.isAbstract(hj.getModifiers()) + "\n. isFinal: " + Modifier.isFinal(hj.getModifiers()) + "\n. isNative: " + Modifier.isNative(hj.getModifiers()) + "\n. isPrivate: " + Modifier.isPrivate(hj.getModifiers()) + "\n. isProtected: " + Modifier.isProtected(hj.getModifiers()) + "\n. isPublic: " + Modifier.isPublic(hj.getModifiers()) + "\n. isStatic: " + Modifier.isStatic(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isTransient: " + Modifier.isTransient(hj.getModifiers()) + "\n. isVolatile: " + Modifier.isVolatile(hj.getModifiers()) ); try { Object oj = hj.newInstance(); trace("obj: "+ oj); trace("Instantiated: " + hj); } catch (InstantiationException e) { throw new Exception( "Cant instantiate a session object: " + e); } catch (IllegalAccessException e) { throw new Exception( "Cant instantiate a session object" + e); } } catch (Exception ex) { throw new Exception( "Failed to instantiate className: " + className + "\n" + ex.toString() ); } } private void trace(String s) { System.out.println(s); } [snip to save bandwidth] -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
ATTENTION: Recovered Email Message
ATTENTION: This email was recovered from a crashed email server. The format may appear strange, but the message, in its entirety is included. There has been no attempt to filter the contents of this message, and therefore some undesirable email may get delivered that normally might not have. If the message appears valid/important, but is rendered difficult to read, please search for the address of the person who sent the message, contact that person, and request that the message be resent. Sorry for the inconvenience. Exchange Administration Team Your Email: - Received: from 209.19.139.130 by mei00wssin01.micronpc.com with ESMTP (Tumbleweed MMS SMTP Relay (MMS v4.7)); Tue, 05 Feb 2002 06:00:10 -0700 X-Server-Uuid: 2df1e23c-5bce-11d3-94b4-00902786a69c Received: from druid.evermind.net (195.58.126.196 [195.58.126.196]) by meirelay.micronpc.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id DAC9CRKN; Tue, 5 Feb 2002 06:07:43 -0700 Received: from druid.evermind.net (IDENT:[EMAIL PROTECTED] [195.58.126.196]) by druid.evermind.net (8.9.3/8.9.3) with SMTP id LAA07666; Tue, 5 Feb 2002 11:38:51 -0100 Received: from internet.int.lsnsoft.com ([195.34.97.142]) by paladin.evermind.net (8.11.6/8.11.6) with ESMTP id g15HSuV16016 for [EMAIL PROTECTED]; Tue, 5 Feb 2002 12:28:56 -0500 Received: from Sijaiko ([192.168.2.111]) by internet.int.lsnsoft.com (8.11.6/8.11.6) with SMTP id g157br901758 for [EMAIL PROTECTED]; Tue, 5 Feb 2002 09:37:56 +0200 Message-ID: [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] From: Lachezar Dobrev [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: Rmi-Http tunneling? Will it be fixed? Date: Tue, 5 Feb 2002 11:43:34 +0100 Organization: LSN Software and telecommunication systems MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Orion ListServer X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2488.0001 Sender: [EMAIL PROTECTED] Hi. Recently I decided to try RMI-Http tunneling, but to no avail. It hangs on any lookup for indefinite time. The rmi servlet is installed correctly (http://localhost/servlet/rmi returns 405 Method Not Allowed). The logs show initialization, but... It hangs... Just hangs. I looked up the list for messages about this problem. The messages for the backslashes are just nothing to be concerned about. Putting a url like: http\\:ormi\\://localhost/My_App just fall back to ormi protocol, and if one changes the ormi port of the server to something different you get connection refused. :(( Anyone to have run that? I stick with Orion 1.5.2. Lachezar P.S. ANY help (I mean ANY help) will be appreciated.
ATTENTION: Recovered Email Message
ATTENTION: This email was recovered from a crashed email server. The format may appear strange, but the message, in its entirety is included. There has been no attempt to filter the contents of this message, and therefore some undesirable email may get delivered that normally might not have. If the message appears valid/important, but is rendered difficult to read, please search for the address of the person who sent the message, contact that person, and request that the message be resent. Sorry for the inconvenience. Exchange Administration Team Your Email: - Received: from 209.19.139.130 by mei00wssin01.micronpc.com with ESMTP (Tumbleweed MMS SMTP Relay (MMS v4.7)); Tue, 05 Feb 2002 07:47:21 -0700 X-Server-Uuid: 2df1e23c-5bce-11d3-94b4-00902786a69c Received: from druid.evermind.net (195.58.126.196 [195.58.126.196]) by meirelay.micronpc.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id DAC9CTQP; Tue, 5 Feb 2002 07:54:54 -0700 Received: from druid.evermind.net (IDENT:[EMAIL PROTECTED] [195.58.126.196]) by druid.evermind.net (8.9.3/8.9.3) with SMTP id NAA09004; Tue, 5 Feb 2002 13:58:32 -0100 Received: from florida.tuxpan.cl (171-194.leased.cust.tie.cl [200.54.171.194]) by paladin.evermind.net (8.11.6/8.11.6) with ESMTP id g15JmiV17021 for [EMAIL PROTECTED]; Tue, 5 Feb 2002 14:48:45 -0500 Received: from jotabook ([192.168.85.163]) by florida.tuxpan.cl (Post.Office MTA v3.5.3 release 223 ID# 0-54072U100L2S100V35) with SMTP id cl for [EMAIL PROTECTED]; Tue, 5 Feb 2002 09:04:11 -0400 Message-ID: [EMAIL PROTECTED] From: [EMAIL PROTECTED] (Jorge Jimenez C) To: Orion-Interest [EMAIL PROTECTED] Subject: EJB Sharing between applications Date: Tue, 5 Feb 2002 08:58:22 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary==_NextPart_000_002B_01C1AE23.435CD410 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Orion ListServer X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Reply-To: Orion-Interest [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] This is a multi-part message in MIME format. --=_NextPart_000_002B_01C1AE23.435CD410 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello everyone. I'm testing orion for use in a variety of applications. Our software = company have developed many J2EE components in the form of diferents = applications (diferents EAR files) that interact with each other = throught its EJB and JSP pages. Reading the document at = http://www.orionserver.com/docs/remote-access/remote-access.xml I see = that one application can only use funcionality from only one other = application (a parent application defined in server.xml). We need to use = services from EJB's in many other applications. I think there must be another way to share EJB's functionality between = applications (without going throught network layer, i hope). Please, any directions will be welcome Thanks in advance. --=_NextPart_000_002B_01C1AE23.435CD410 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META content=3Dtext/html; charset=3Diso-8859-1 = http-equiv=3DContent-Type META content=3DMSHTML 5.00.3103.1000 name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVFONT face=3DArial size=3D2 DIVFONT face=3DArial size=3D2Hello everyone./FONT/DIV DIVFONT face=3DArial size=3D2nbsp;I'm testing orion for use in a = variety of=20 applications. Our software company have developed many J2EE components = in the=20 form of diferents applications (diferents EAR files) that interact with = each=20 other throught its EJB and JSP pages./FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2Reading the document at A=20 href=3Dhttp://www.orionserver.com/docs/remote-access/remote-access.xml;= http://www.orionserver.com/docs/remote-access/remote-access.xml/Anbsp;= I=20 see that one application can only use funcionality from only one other=20 application (a parent application defined in server.xml). We need to use = services from EJB's in many other applications./FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2I think there must be another way to = share EJB's=20 functionality between applications (without going throught network = layer, i=20 hope)./FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2Please, any directions will be = welcome/FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2Thanks in advance./FONT/DIV DIVnbsp;/DIV/FONT/DIV/BODY/HTML --=_NextPart_000_002B_01C1AE23.435CD410--
ATTENTION: Recovered Email Message
ATTENTION: This email was recovered from a crashed email server. The format may appear strange, but the message, in its entirety is included. There has been no attempt to filter the contents of this message, and therefore some undesirable email may get delivered that normally might not have. If the message appears valid/important, but is rendered difficult to read, please search for the address of the person who sent the message, contact that person, and request that the message be resent. Sorry for the inconvenience. Exchange Administration Team Your Email: - Received: from 209.19.139.130 by mei00wssin01.micronpc.com with ESMTP (Tumbleweed MMS SMTP Relay (MMS v4.7)); Tue, 05 Feb 2002 09:05:08 -0700 X-Server-Uuid: 2df1e23c-5bce-11d3-94b4-00902786a69c Received: from druid.evermind.net (195.58.126.196 [195.58.126.196]) by meirelay.micronpc.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id DAC9CV6C; Tue, 5 Feb 2002 09:08:00 -0700 Received: from druid.evermind.net (IDENT:[EMAIL PROTECTED] [195.58.126.196]) by druid.evermind.net (8.9.3/8.9.3) with SMTP id PAA10064; Tue, 5 Feb 2002 15:06:33 -0100 Received: from volvo.traffic.com ([64.94.198.4]) by paladin.evermind.net (8.11.6/8.11.6) with ESMTP id g15KufV17457 for [EMAIL PROTECTED]; Tue, 5 Feb 2002 15:56:42 -0500 Received: from postoffice.traffic.com (postoffice.traffic.com [192.168.0.32]) by volvo.traffic.com (8.11.5/8.11.3) with ESMTP id g15DAqd01600 for [EMAIL PROTECTED]; Tue, 5 Feb 2002 08:10:52 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=_=_NextPart_001_01C1AE45.FF3403DD Subject: RE: EJB Sharing between applications Date: Tue, 5 Feb 2002 08:07:00 -0500 Message-ID: [EMAIL PROTECTED] X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: EJB Sharing between applications Thread-Index: AcGuRImTaUL5IrPPR5+v9xINfdoKwwAAHGQA From: Carroll, Jim [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] X-Mailer: Orion ListServer Reply-To: Orion-Interest [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] This is a multi-part message in MIME format. --_=_NextPart_001_01C1AE45.FF3403DD Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable If you search the archives you will find my writup on this. It is not possible from within an Orion J2EE container (either web or ejb). Not only that, it is not possible to call EJBs in another instance of the same application (that is, more than one other REMOTE instance - you can call ONE other remote instance using the orion specific configuration) from within an Orion J2EE container. =20 This is a severe limitation and one that will need to be addressed if Orion hopes to be ejb 1.3 compliant. =20 There is a hack that MIGHT work if there are no circular dependencies between your EARs. You can have one application be a parent of another, and a third application be the parent of the first parent. We started experimenting with this when we decieded that it was too restrictive and we went with another J2EE imlpementation. I'm hoping that Orion fixes this problem because all in all if they fix their JNDI issues (which is the source of this problem) it's not a poor quality server. -Original Message- From: Jorge Jimenez C [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 6:58 AM To: Orion-Interest Subject: EJB Sharing between applications Hello everyone. I'm testing orion for use in a variety of applications. Our software company have developed many J2EE components in the form of diferents applications (diferents EAR files) that interact with each other throught its EJB and JSP pages. =20 Reading the document at http://www.orionserver.com/docs/remote-access/remote-access.xml I see that one application can only use funcionality from only one other application (a parent application defined in server.xml). We need to use services from EJB's in many other applications. =20 I think there must be another way to share EJB's functionality between applications (without going throught network layer, i hope). =20 Please, any directions will be welcome =20 Thanks in advance. =20 --_=_NextPart_001_01C1AE45.FF3403DD Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META HTTP-EQUIV=3DContent-Type CONTENT=3Dtext/html; = charset=3Diso-8859-1 META content=3DMSHTML 5.50.4616.200 name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVSPAN class=3D773435912-05022002FONT face=3DArial color=3D#ff = size=3D2If you=20 search the archives you will find my writup on this. It is not possible = from=20 within an Orion J2EE container (either web or ejb). Not only that, it is = not=20 possible to
Re: Class.newInstance() Fails with InstantiationException.
Please unsubscribe me - Original Message - From: Bill Winspur To: Orion-Interest Sent: February 06, 2002 4:53 AM Subject: Re: Class.newInstance() Fails with InstantiationException. Thank you Stephen. That nailed it. The problem was not so obvious to me. Although the API doc for Class.newInstance(), does not state it explicitly, you must code a no-args constructor into the class to instantiate it using newInstance(). Replacing my 1 arg constructor witha no-argconstructor and a setter method fixed my problem. The behaviour of of Class.newInstance() and Class.create(object), which implements programmaticinstantiation using constructors with arguments,is documented in theJava Tutorial. RYFM strikes again. - Original Message - From: "Stephen Davidson" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 9:08 AM Subject: Re: Class.newInstance() Fails with InstantiationException. Obvious Question hj (in this case, com.wynnon.appletChannel.test.EchoingPort) does have a no-arg constructor, right? In other words, Object obj = new EchoingPort() is legal? /Obvious Question -Steve Bill Winspur wrote: The echoing port never gets instantiated, the attempt to instantiate, by invoking Class.newInstance(), throws an InstantiationException. However, if you are asking what is the function of EchoingPort? ... it is a test stub for for the session side of an http tunneling package to support applet/client access to ejb's via http. The relevant code follows: /** * Instantiates the session port if not yet done */ private void instantiateIt(String className) throws Exception {Class hj = null; try { hj = Class.forName(className); System.out.println( "class: " + hj + "\n. isInterface: " + hj.isInterface() + "\n. isArray: " + hj.isArray() + "\n. isPrimitive: " + hj.isPrimitive() + "\n. isAbstract: " + Modifier.isAbstract(hj.getModifiers()) + "\n. isFinal: " + Modifier.isFinal(hj.getModifiers()) + "\n. isNative: " + Modifier.isNative(hj.getModifiers()) + "\n. isPrivate: " + Modifier.isPrivate(hj.getModifiers()) + "\n. isProtected: " + Modifier.isProtected(hj.getModifiers()) + "\n. isPublic: " + Modifier.isPublic(hj.getModifiers()) + "\n. isStatic: " + Modifier.isStatic(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isTransient: " + Modifier.isTransient(hj.getModifiers()) + "\n. isVolatile: " + Modifier.isVolatile(hj.getModifiers()) ); try { Object oj = hj.newInstance(); trace("obj: "+ oj); trace("Instantiated: " + hj); } catch (InstantiationException e) { throw new Exception( "Cant instantiate a session object: " + e); } catch (IllegalAccessException e) { throw new Exception( "Cant instantiate a session object" + e); } } catch (Exception ex) { throw new Exception( "Failed to instantiate className: " + className + "\n" + ex.toString() ); } } private void trace(String s) { System.out.println(s); } [snip to save bandwidth] -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208