Orion Client jar files for remote application client
Hi all, Unlike many other application servers like jboss, Orion does not officially provide a list of jar files required to run remote Java Application clients. This enforces developers to include a lot of files found in the Orion root directory. Are there any plans to provide a minimum set of jar files required for remote applicacion clients ? orion-client.jar, orion-jndi.jar ... Thank you in advance Pedro
RE: Orion Client jar files for remote application client
Pedro, This is the minimum list: orion.jar activation.jar jndi.jar ejb.jar Its also a good idea to include a jar with the home and remote interfaces of the ejb's you will be using. With kind regards, the elephantwalker www.elephantwalker.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Pedro Garcia Lopez Sent: Tuesday, May 14, 2002 1:13 PM To: Orion-Interest Subject: Orion Client jar files for remote application client Hi all, Unlike many other application servers like jboss, Orion does not officially provide a list of jar files required to run remote Java Application clients. This enforces developers to include a lot of files found in the Orion root directory. Are there any plans to provide a minimum set of jar files required for remote applicacion clients ? orion-client.jar, orion-jndi.jar ... Thank you in advance Pedro
RE: URGENT: Big issues with CMP 2.x and application-client !!!!
I believe it only does this on fields named password as this can be a reserved word in some DBs, it will do this if its autogenerating the tables for you. You can always edit the orion-ejb-jar.xml file and change the mapping to what suits you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Vincent Faidherbe Sent: 30 April 2002 15:12 To: Orion-Interest Subject: URGENT: Big issues with CMP 2.x and application-client Hello, I'm running Orion on a SuSe Linux 7.0 with a Sun JDK 1.3.1_03. I've encountered two problems : 1. When using CMP 2.x entity bean, Orion adds an underscore to the name of some fields for the persitence-name and consequently, the generated SQL doesn't work ... Example : cmp-field-mapping name=password persistence-name=password_ / 2. I've written n command-line client to different EJBs. If the application-client.xml bound with the client refers to an unknown remote interface, the JVM of orion crashes with a stack overflow error. Any idea ? -- Vincent Faidherbe icogs Do you think C++ is lovable? Unless you're into SM (Software Masochism), probably not. (JLG)
RE: URGENT: Big issues with CMP 2.x and application-client !!!!
Hi For #1 below - adding the '_' for persistence names is likely due to the database schema definition in your config/database-schemas directory for your particular data source. It probably has 'password' as a disallowed field and hence will add the '_' to the field name - if you have an existing table which does in fact have the field 'password', then remove this from your disallowed field list, make the change in orion-ejb-jar.xml and restart Orion and that should take of it. For#2 - haven't seen that one before. Cheers Ray Gavin Spurling [EMAIL PROTECTED] wrote: I believe it only does this on fields named "password" as this can be areserved word in some DBs, it will do this if its autogenerating thetables for you. You can always edit the orion-ejb-jar.xml file andchange the mapping to what suits you.-Original Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] On Behalf Of VincentFaidherbeSent: 30 April 2002 15:12To: Orion-InterestSubject: URGENT: Big issues with CMP 2.x and application-client Hello,I'm running Orion on a SuSe Linux 7.0 with a Sun JDK 1.3.1_03. I've encountered two problems :1. When using CMP 2.x entity bean, Orion adds an underscore to the nameof some fields for the persitence-name and consequently, the generated SQL doesn't work ... Example : persistence! -name="password_" /2. I've written n command-line client to different EJBs. If the application-client.xml bound with the client refers to an unknown remoteinterface, the JVM of orion crashes with a stack overflow error.Any idea ?-- Vincent Faidherbeicogs"Do you think C++ is lovable? Unless you're into SM (SoftwareMasochism), probably not." (JLG)Do You Yahoo!? Yahoo! Health - your guide to health and wellness
URGENT: Big issues with CMP 2.x and application-client !!!!
Hello, I'm running Orion on a SuSe Linux 7.0 with a Sun JDK 1.3.1_03. I've encountered two problems : 1. When using CMP 2.x entity bean, Orion adds an underscore to the name of some fields for the persitence-name and consequently, the generated SQL doesn't work ... Example : cmp-field-mapping name=password persistence-name=password_ / 2. I've written n command-line client to different EJBs. If the application-client.xml bound with the client refers to an unknown remote interface, the JVM of orion crashes with a stack overflow error. Any idea ? -- Vincent Faidherbe icogs Do you think C++ is lovable? Unless you're into SM (Software Masochism), probably not. (JLG)
Auto-reply: URGENT: Big issues with CMP 2.x and application-client !!!!
Hi I'll be out of office and unable to read e-mail till 6 of May, because I'm on vacation ---BeginMessage--- Hello, I'm running Orion on a SuSe Linux 7.0 with a Sun JDK 1.3.1_03. I've encountered two problems : 1. When using CMP 2.x entity bean, Orion adds an underscore to the name of some fields for the persitence-name and consequently, the generated SQL doesn't work ... Example : cmp-field-mapping name=password persistence-name=password_ / 2. I've written n command-line client to different EJBs. If the application-client.xml bound with the client refers to an unknown remote interface, the JVM of orion crashes with a stack overflow error. Any idea ? -- Vincent Faidherbe icogs Do you think C++ is lovable? Unless you're into SM (Software Masochism), probably not. (JLG) ---End Message---
How can I reload (stop/start) an application-client with startup=true property set?
I have an application client which starts up when server is started. This client is a timer which causes certain session to execute every 30 seconds or so. The problem occurs when I redeploy my application by dropping a new .EAR file. While the application is re-deployed, the old client continues to run along with the instance of the new client. How can I terminate the old client when the server re-deployes the application? I have been thinking about a couple ways, but have not tried any of these yet: 1. Perhaps the client's main thread will get an InterruptedException when the server re-deploys. I can use this to terminate the old client. This is just a guess. I am not sure if this indeed happends. 2. I could setup a socket listener in the client to listen on a particular port for a quit command. The new instance would first post a quit command on that port, and then proceed to take over and listen. This way, each new instance will signal to the old one to stop before starting. Are there better ways to stop an old client? Hopefully, they will also be portable. Thanks. - -AP_ See my profile at http://www.myprofiles.com/member/view.do?profileId=128
Re: How can I reload (stop/start) an application-client withstartup=true property set? (New E-mail Address)
Please be informed that I no long reside in South Africa, but in Canada. Please forwad all future e-mail to me at [EMAIL PROTECTED] Sorry for the inconvenience. Have a Great Day
Re: How can I reload (stop/start) an application-client with startup=true property set? (New E-mail Address)
Ganasen went to the website a few hours ago to unsubscribe himself. So why the listserv is still trying to send him messages is not a good thing. -Steve Ganasen Gounden wrote: Please be informed that I no long reside in South Africa, but in Canada. Please forwad all future e-mail to me at [EMAIL PROTECTED] Sorry for the inconvenience. Have a Great Day -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
Orion doesn't pass stack traces from server to application client?
Hi there, I just noticed that the application client that I wrote for Orion is printing stack traces like so: javaxejbDuplicateKeyException: Entity already exists at comevermind_dnEXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(:1446) at comevermind_dninvokeMethod(:1369) at comevermind_ydinvoke(:53) at __Proxy2my method(Unknown Source) Which presumably means it is not passing the stack trace information across from the server to the client This means I can't see the part of the stack trace on the server, which is really annoying Is there a way around this? I'm sure lots of people would have this problem, so I'm probably just missing something obvious Cheers Geoff
Re(2): Application client log in
Hi, Thanks for this interesting code, but when i try it , i can't make a lookup on the RoleManager : javax.naming.NameNotFoundException: java:comp/RoleManager not found Is there something special to parameter in the app server ? Thanks for your anwser. You use the rolemanager to do the login ... SECURITY_PRINCIPAL and credentials can be the orion admin account. Hashtable env = new Hashtable(); env.put(dedicated.connection,true); env.put(java.naming.factory.initial,com.evermind.server.ApplicationClien tInitialContextFactory); env.put(java.naming.provider.url,ormi://myhost/myapp); env.put(javax.naming.Context.SECURITY_PRINCIPAL, someuserwithrmiprivilages);// NOT the user you want to log in env.put(javax.naming.Context.SECURITY_CREDENTIALS,somepassword); InitialContext initialcontext = new InitialContext(env); RoleManager rolemanager = (RoleManager)initialcontext.lookup(java:comp/RoleManager); try { roleManager.login(username, password); } catch(Exception exception) { throw new SecurityException(exception.getMessage()); } There is a lot of discussion about this in the archives and e.g. on the Elephantwalkers site, as well as orionsupport and I think Atlassian. -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:22 AM To: Orion-Interest Subject: Application client log in We are currently implementing a Java Swing client, and I am wondering how to write the log in system. When not using http or form based log in (HTML) and when you wish to let the client log in from a GUI interface (Swing), which part of Orion is then used to hand over the username and password for authorization? Randahl
RE: Re(2): Application client log in
You are probably missing application-client.xml, and orion-application-client.xml; they have to be in a META-INF directory relative to the source root of your client. You should be able to find the apropriate tags in the orion docs and on the sites referenced before. In my own situation, I call RoleManager from an ejb which acts as a facade for my own security interface to make it independent from the underlying appserver (I like using Orion, but many potential clients require that it runs on the appserver of their choice ...) - so my xml files reference my Bean and not the RoleManager, which is called by my Orion-specific bean-Implementation. --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 7:17 AM To: Orion-Interest Subject: Re(2): Application client log in Hi, Thanks for this interesting code, but when i try it , i can't make a lookup on the RoleManager : javax.naming.NameNotFoundException: java:comp/RoleManager not found Is there something special to parameter in the app server ? Thanks for your anwser. You use the rolemanager to do the login ... SECURITY_PRINCIPAL and credentials can be the orion admin account. Hashtable env = new Hashtable(); env.put(dedicated.connection,true); env.put(java.naming.factory.initial,com.evermind.server.ApplicationClien tInitialContextFactory); env.put(java.naming.provider.url,ormi://myhost/myapp); env.put(javax.naming.Context.SECURITY_PRINCIPAL, someuserwithrmiprivilages);// NOT the user you want to log in env.put(javax.naming.Context.SECURITY_CREDENTIALS,somepassword); InitialContext initialcontext = new InitialContext(env); RoleManager rolemanager = (RoleManager)initialcontext.lookup(java:comp/RoleManager); try { roleManager.login(username, password); } catch(Exception exception) { throw new SecurityException(exception.getMessage()); } There is a lot of discussion about this in the archives and e.g. on the Elephantwalkers site, as well as orionsupport and I think Atlassian. -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:22 AM To: Orion-Interest Subject: Application client log in We are currently implementing a Java Swing client, and I am wondering how to write the log in system. When not using http or form based log in (HTML) and when you wish to let the client log in from a GUI interface (Swing), which part of Orion is then used to hand over the username and password for authorization? Randahl
Application client log in
We are currently implementing a Java Swing client, and I am wondering how to write the log in system. When not using http or form based log in (HTML) and when you wish to let the client log in from a GUI interface (Swing), which part of Orion is then used to hand over the username and password for authorization? Randahl
RE: Application client log in
You use the rolemanager to do the login ... SECURITY_PRINCIPAL and credentials can be the orion admin account. Hashtable env = new Hashtable();env.put("dedicated.connection","true");env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory"); env.put("java.naming.provider.url","ormi://myhost/myapp"); env.put(javax.naming.Context.SECURITY_PRINCIPAL, "someuserwithrmiprivilages"); // NOT the user you want to log inenv.put(javax.naming.Context.SECURITY_CREDENTIALS,"somepassword"); InitialContext initialcontext = new InitialContext(env); RoleManager rolemanager = (RoleManager)initialcontext.lookup("java:comp/RoleManager"); try { roleManager.login(username, password); } catch(Exception exception) { throw new SecurityException(exception.getMessage()); } There is a lot of discussion about this in the archives and e.g. on the Elephantwalkers site, as well as orionsupport and I think Atlassian. -Original Message-From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]]Sent: Thursday, February 07, 2002 8:22 AMTo: Orion-InterestSubject: Application client log in We are currently implementing a Java Swing client, and I am wondering how to write the log in system. When not using http or form based log in (HTML) and when you wish to let the client log in from a GUI interface (Swing), which part of Orion is then used to hand over the username and password for authorization? Randahl
Re: Application Client JMS
Hi, no, it is an application client, i.e. a normal Java - Applikation. I´d like to write a small Swing - app which monitors the messaging. I´m using Orion´s JMS. I want the application to look up an existing Topic on the server via JNDI and post / receive messages to / from this Topic. thanks, Jochen Manoj Sadangi schrieb: Hi Jochen , The MessageMonitor class you have written , is it a servlet? r u using Orion's JMS? thanks, manoj. Jochen Kressin wrote: Hi, i have some problems writing an application client that uses JMS. I have created a SessionBean which publishes messages and a MDB which receives the messages. This works fine. I now want to write a client application that can participate in messaging. The client connects to the server without problems, but messages published by the client seem to go nowhere. The MDB does not receive anything. Also, the client does not receive any messages sent by the SessionBean. The directory structure of the client app is: client +--- MessageMonitor.class +--- META-INF +---application-client.xml +---orion-application-client.xml The application-client.xml: ... resource-ref res-ref-namejms/TopicConnectionFactory/res-ref-name res-typejavax.jms.TopicConnectionFactory/res-type res-authContainer/res-auth /resource-ref resource-ref res-ref-namejms/BenelogNewOrder/res-ref-name res-typejavax.jms.Topic/res-type res-authContainer/res-auth /resource-ref where BenelogNewOrder is the name of the Topic I would like to subscribe to. The client looks up the Topic using something like: lookup(java:comp/env/jms/BenelogNewOrder); Please give me some hint what i am doing wrong. Also, any informations where to find more about app-clients Orion is appreciated. Neither orion nor atlassian seem to have tutorials on this topic. Thanks in advance! Jochen -- - Jochen Kressin [EMAIL PROTECTED] Interested in distributed computing? http://www.jeremi.org
Application Client JMS
Hi, i have some problems writing an application client that uses JMS. I have created a SessionBean which publishes messages and a MDB which receives the messages. This works fine. I now want to write a client application that can participate in messaging. The client connects to the server without problems, but messages published by the client seem to go nowhere. The MDB does not receive anything. Also, the client does not receive any messages sent by the SessionBean. The directory structure of the client app is: client +--- MessageMonitor.class +--- META-INF +---application-client.xml +---orion-application-client.xml The application-client.xml: ... resource-ref res-ref-namejms/TopicConnectionFactory/res-ref-name res-typejavax.jms.TopicConnectionFactory/res-type res-authContainer/res-auth /resource-ref resource-ref res-ref-namejms/BenelogNewOrder/res-ref-name res-typejavax.jms.Topic/res-type res-authContainer/res-auth /resource-ref where BenelogNewOrder is the name of the Topic I would like to subscribe to. The client looks up the Topic using something like: lookup(java:comp/env/jms/BenelogNewOrder); Please give me some hint what i am doing wrong. Also, any informations where to find more about app-clients Orion is appreciated. Neither orion nor atlassian seem to have tutorials on this topic. Thanks in advance! Jochen -- - Jochen Kressin [EMAIL PROTECTED] Interested in distributed computing? http://www.jeremi.org
Re: Application Client JMS
Hi Jochen , The MessageMonitor class you have written , is it a servlet? r u using Orion's JMS? thanks, manoj. Jochen Kressin wrote: Hi, i have some problems writing an application client that uses JMS. I have created a SessionBean which publishes messages and a MDB which receives the messages. This works fine. I now want to write a client application that can participate in messaging. The client connects to the server without problems, but messages published by the client seem to go nowhere. The MDB does not receive anything. Also, the client does not receive any messages sent by the SessionBean. The directory structure of the client app is: client +--- MessageMonitor.class +--- META-INF +---application-client.xml +---orion-application-client.xml The application-client.xml: ... resource-ref res-ref-namejms/TopicConnectionFactory/res-ref-name res-typejavax.jms.TopicConnectionFactory/res-type res-authContainer/res-auth /resource-ref resource-ref res-ref-namejms/BenelogNewOrder/res-ref-name res-typejavax.jms.Topic/res-type res-authContainer/res-auth /resource-ref where BenelogNewOrder is the name of the Topic I would like to subscribe to. The client looks up the Topic using something like: lookup(java:comp/env/jms/BenelogNewOrder); Please give me some hint what i am doing wrong. Also, any informations where to find more about app-clients Orion is appreciated. Neither orion nor atlassian seem to have tutorials on this topic. Thanks in advance! Jochen
RE: Anyone got old orionsupport sample application client / scheduler?
Use the UK mirror: http://uk.orionsupport.com/articles/appclient.html -Original Message- From: Geoff Soutter [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 9:34 PM To: Orion-Interest Subject: Anyone got old orionsupport sample application client / scheduler? You can see it described in googles cache http://www.google.com/search?q=cache:4nkQslt9AjsC:www.orionsupport.com/a rticles/appclient.html+orion+application+clienthl=en If anyone has the source jar file, I'd really appreciate a copy! Cheers Geoff
Anyone got old orionsupport sample application client / scheduler?
You can see it described in googles cache http://www.google.com/search?q=cache:4nkQslt9AjsC:www.orionsupport.com/a rticles/appclient.html+orion+application+clienthl=en If anyone has the source jar file, I'd really appreciate a copy! Cheers Geoff
Re[2]: Using JDBC resource from application client
I have same problem on Orion 1.5.2 location=jdbc/TestDS pooled-location=jdbc/pooled/TestPooledDS xa-location=jdbc/xa/TestXADS ejb-location=jdbc/TestEJBDS location works ok, but pooled-location, xa-location, ejb-location don't work. So i think it's not the problem of our client programm or config file, may be it's a bug of Orion. any one can help? Thanks to Ravi Reddy, I found the answer. The trick is not to make the data source pooled in the data-sources.xml file (i.e., leave out the xa-location, ejb-location and pooled-location fields). But what is the rationale for this? cheers romen - Original Message: - ello, I have seen the same question asked a few times in the mail archive, but no answers. Now I am faced with the same question. Am I supposed to access my datasource from an application client in J2EE/Orion? I have the following files setup with the correct values (I believe): * $orion/config/data-sources.xml (using class=com.evermind.sql.ConnectionDataSource and Sybase driver com.sybase.jdbc2.jdbc.SybDriver) * application-client.xml of the client app * jndi.properties file of the client app * manifest.mf of the client app When I do the following in my client app, a NullPointerException will be thrown when I try to prepare a statement or do anything useful with the connection: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(jdbc/MyDS); Connection con = ds.getConnection(OpenBill,OpenBill); // up to this point, nether ds or con are null, which is fine. con.prepareStatement(SELECT * FROM MyTable); // NullPointerException happens here. The same code works fine in a servlet (my web.xml also setup correctly). cheers romen -- Peng Yong Email: [EMAIL PROTECTED] Bentium Ltd. URL: http://www.cn99.com
Application Client JNDI
I'm trying to reach my EJB's through an application client (for JUnit testing). I can't seem to find a combination of userid and password that will gain me access to them. When the ORMI login dialog box appears, everything I enter fails as an 'invalid userid/password'. Where exactly is Orion looking??? For this particular application, I've implemented my own UserManager class, but not RoleManager or EJBUserManager.As a web application, everything runs fine. Must I implement these others as well for an Application client to work? Thanks, Gordon Reynolds
Re: Application Client JNDI
Grodon, I hope this is what u are looking for. In the principals.xml file in orion\config you have to set the flag to false in the following line "user username="admin" password="123" deactivated="true" " ...Shyam - Original Message - From: Gordon Reynolds To: Orion-Interest Sent: Friday, December 07, 2001 5:18 AM Subject: Application Client JNDI I'm trying to reach my EJB's through an application client (for JUnit testing). I can't seem to find a combination of userid and password that will gain me access to them. When the ORMI login dialog box appears, everything I enter fails as an 'invalid userid/password'. Where exactly is Orion looking??? For this particular application, I've implemented my own UserManager class, but not RoleManager or EJBUserManager.As a web application, everything runs fine. Must I implement these others as well for an Application client to work? Thanks, Gordon Reynolds
Can't get Orion Application Client demo to work
I'm having problems with Application clients and JNDI. First of all, I can't run the news-app demo provided with orion. I can install it no problem and the web app appears to be fine. When I try the application client I get: C:\Java\orion\demo\news-appjava -Djava.naming.factory.initial=com.evermind. serv er.ApplicationClientInitialContextFactory -jar news-client.jar Communication error: Error reading application-client descriptor: No location sp ecified and no suitable instance of the type 'com.evermind.ejb.NewsSession' foun d for the ejb-ref ejb/NewsSession Now something even more curious. Take the Product demo (mprod-ejb.jar is a copy of the provided orion-product.jar) C:\Java\orion\my projects\product2java -jar mprod-ejb.jar Enter the id (integer) of the product you want to add: 345343432 Enter the name for item 345343432: wew Enter the cost for wew: 23 creating prod with id 345343432 adding name wew Product added which is fine. However, if I change the package of the source files to com (rather the the default empty package), recompile, and simply change the location of home/remote/ejb in the xml descriptor files and rejar, I get: C:\Java\orion\my projects\product2java -jar mprod-ejb.jar Communication error: Error reading application-client descriptor: No location sp ecified and no suitable instance of the type 'com.Product' found for the ejb-ref com.MyProd If I add an orion-application-client.xml (and an orion-ejb-jar.xml) then I get: C:\Java\orion\my projects\product2java -jar mprod-ejb.jar Communication error: Error reading application-client descriptor: No EJBHome fou nd at com.Product as specified by ejb-ref com.MyProd So, anyone know how to get the demos to work? I'd really appreciate it as I'm now really confused. Many thanks Alistair xml files for mprod after package renaming: ?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 ejb-ref ejb-ref-namecom.MyProd/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.ProductHome/home remotecom.Product/remote /ejb-ref /application-client ?xml version=1.0? !DOCTYPE orion-application-client PUBLIC -//Evermind//DTD J2EE Application-client runtime 1.2//EN http://www.orionserver.com/dtds/orion-application-client.dtd; orion-application-client ejb-ref-mapping name=com.MyProd location=com.Product/ /orion-application-client ?xml version=1.0? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.2//EN http://java.sun.com/j2ee/dtds/ejb-jar_1_2.dtd; ejb-jar description/ enterprise-beans entity description/ ejb-namecom.MyProd/ejb-name homecom.ProductHome/home remotecom.Product/remote ejb-classcom.ProductEJB/ejb-class primkey-classjava.lang.Integer/primkey-class reentrantTrue/reentrant persistence-typeContainer/persistence-type cmp-field field-nameid/field-name /cmp-field cmp-field field-namename/field-name /cmp-field cmp-field field-namedescription/field-name /cmp-field cmp-field field-nameprice/field-name /cmp-field primkey-fieldid/primkey-field /entity /enterprise-beans assembly-descriptor container-transaction method ejb-namecom.MyProd/ejb-name method-name*/method-name /method trans-attributeNotSupported/trans-attribute /container-transaction /assembly-descriptor /ejb-jar ?xml version=1.0? !DOCTYPE orion-ejb-jar PUBLIC -//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN http://www.orionserver.com/dtds/orion-ejb-jar.dtd; orion-ejb-jar deployment-version=1.5.2 deployment-time=ea77b9f65e enterprise-beans entity-deployment name=com.MyProd location=com.Product wrapper=ProductHome_EntityHomeWrapper2 max-tx-retries=3 table=com_MyProd data-source=jdbc/SQLServerDS primkey-mapping cmp-field-mapping name=id persistence-name=id/ /primkey-mapping cmp-field-mapping name=name persistence-name=name/ cmp-field-mapping name=description persistence-name=description/ cmp
RE: Using JDBC resource from application client
ello, Thanks to Ravi Reddy, I found the answer. The trick is not to make the data source pooled in the data-sources.xml file (i.e., leave out the xa-location, ejb-location and pooled-location fields). But what is the rationale for this? cheers romen - Original Message: - ello, I have seen the same question asked a few times in the mail archive, but no answers. Now I am faced with the same question. Am I supposed to access my datasource from an application client in J2EE/Orion? I have the following files setup with the correct values (I believe): * $orion/config/data-sources.xml (using class=com.evermind.sql.ConnectionDataSource and Sybase driver com.sybase.jdbc2.jdbc.SybDriver) * application-client.xml of the client app * jndi.properties file of the client app * manifest.mf of the client app When I do the following in my client app, a NullPointerException will be thrown when I try to prepare a statement or do anything useful with the connection: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(jdbc/MyDS); Connection con = ds.getConnection(OpenBill,OpenBill); // up to this point, nether ds or con are null, which is fine. con.prepareStatement(SELECT * FROM MyTable); // NullPointerException happens here. The same code works fine in a servlet (my web.xml also setup correctly). cheers romen
Using JDBC resource from application client
ello, I have seen the same question asked a few times in the mail archive, but no answers. Now I am faced with the same question. Am I supposed to access my datasource from an application client in J2EE/Orion? I have the following files setup with the correct values (I believe): * $orion/config/data-sources.xml (using class=com.evermind.sql.ConnectionDataSource and Sybase driver com.sybase.jdbc2.jdbc.SybDriver) * application-client.xml of the client app * jndi.properties file of the client app * manifest.mf of the client app When I do the following in my client app, a NullPointerException will be thrown when I try to prepare a statement or do anything useful with the connection: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(jdbc/MyDS); Connection con = ds.getConnection(OpenBill,OpenBill); // up to this point, nether ds or con are null, which is fine. con.prepareStatement(SELECT * FROM MyTable); // NullPointerException happens here. The same code works fine in a servlet (my web.xml also setup correctly). cheers romen
FW: Using JDBC resource from application client
didn't take the first time...resend -Original Message- From: The elephantwalker [mailto:[EMAIL PROTECTED]] Sent: Monday, November 26, 2001 3:57 PM To: Orion-Interest Subject: RE: Using JDBC resource from application client Romen, In you application-client.xml file, you will need to put in the jdbc resource after any ejb resources...like this: resource-ref descriptiondescription/description res-ref-namejdbc/MyDataSource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth -- this can be container or application /resource-ref Then from your client app, you should be able to get the resource in the normal way: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(jdbc/MyDataSource); etc. regards, the elephantwalker www.elephantwalker.com Take a walk on the wild side, and join us at the elephantwalker! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Romen Law Sent: Monday, November 26, 2001 3:03 PM To: Orion-Interest Subject: Using JDBC resource from application client ello, I have seen the same question asked a few times in the mail archive, but no answers. Now I am faced with the same question. Am I supposed to access my datasource from an application client in J2EE/Orion? I have the following files setup with the correct values (I believe): * $orion/config/data-sources.xml (using class=com.evermind.sql.ConnectionDataSource and Sybase driver com.sybase.jdbc2.jdbc.SybDriver) * application-client.xml of the client app * jndi.properties file of the client app * manifest.mf of the client app When I do the following in my client app, a NullPointerException will be thrown when I try to prepare a statement or do anything useful with the connection: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(jdbc/MyDS); Connection con = ds.getConnection(OpenBill,OpenBill); // up to this point, nether ds or con are null, which is fine. con.prepareStatement(SELECT * FROM MyTable); // NullPointerException happens here. The same code works fine in a servlet (my web.xml also setup correctly). cheers romen
How to call EJB from outside application client
Hi, I am not able to call EJB from outside application client, though I am able to call EJB from same applicationSo, What I have to configure and which xml files I need to change.Is application-client.xml,How to change If you can send me sample xml (Configuration) files, that would be great help for me.Waiting for Quick Reply.
Application Client
Title: Application Client Hi could someone please point me in the right direction re installing a client. I have already deployed a session bean, which I would now like to test from my testClient. Should the client be deployed/built by ant at the same time? If you know of any tutorials please send me the relevant URL's. Tia Ed :)
javax.naming.NamingException: Error reading application-client descriptor: No EJBHome found at...
As the title,could anyone give me some advice? Thanks.
RE: Application CLient JNDI properties
what I get is: Communication error: Can't find Serial Context Provider What am I doing wrong? Have you specified orion.jar in your classpath???
RE: Application CLient JNDI properties
Yes, ejb.jar, jndi.jar and orion.jar are all added to the classpath. -Original Message- From: Scott Hamilton, (m)+61-404-280 238 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 3:57 PM To: Orion-Interest Subject: RE: Application CLient JNDI properties what I get is: Communication error: Can't find Serial Context Provider What am I doing wrong? Have you specified orion.jar in your classpath???
Problems getting an Application-Client to use a datasource in Orion
I have an orion server using a datasource. I want to connect to this datasource from outside the application but I'm having problems. I have created this program. import java.util.*; import java.sql.*; import javax.naming.*; import com.evermind.sql.*; public class TestConnect { public TestConnect() { try { System.out.println (Before IC); InitialContext ic = new InitialContext(); System.out.println (After IC); OrionPooledDataSource ds = (OrionPooledDataSource)ic.lookup(java:comp/env/external/DATASOURCE); Connection c = ds.getConnection(); System.out.println (After Connection, c is isClosed = + new Boolean (c.isClosed()).toString()); String query = SELECT COUNT(*) FROM USERS; PreparedStatement s = c.prepareStatement(query); System.out.println (After createStatement, s is null = + new Boolean (s==null).toString()); ResultSet rs = s.executeQuery (); rs.next(); System.out.println (User Count = + rs.getString (COUNT (*))); rs.close(); s.close(); c.close(); } catch (SQLException ex) { System.out.println (ex.getMessage()); ex.printStackTrace(); } catch (NamingException ex) { System.out.println (ex.getMessage()); } } public static void main (String[] args) { new TestConnect(); } } I have also set up the jndi.properties file java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.provider.url=ormi://localhost/app java.naming.security.principal=admin java.naming.security.credentials=password The program runs and i getting the following output and error. Before IC After IC Exception in thread main java.lang.NullPointerException at com.evermind.sql.OrionPooledDataSource.d7(JAX) at com.evermind.sql.OrionPooledDataSource.d8(JAX) at com.evermind.sql.OrionPooledDataSource.getConnection(JAX) at TestConnect.init(TestConnect.java:17) at TestConnect.main(TestConnect.java:45) Has anyone got any ideas why i would be getting this error. I have also tried different DataSource classes to see if you had to us a specific one for remote connections. Still not luck. Thanks Owen
Application CLient JNDI properties
Title: RE: SessionContext.getEJBObject() I am trying to start a swing client app which communicates with an ejb. Works fine if I use the console or applicationlauncher.jar Now I am trying to run the client directly from java, i.e. java my.Client -Djava.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory -Djava.naming.provider.url=ormi://hostname:23791/my-app-name -Djava.naming.security.principal=user -Djava.naming.security.credentials=password what I get is: Communication error: Can't find Serial Context Provider What am I doing wrong?
Uploading class file from application client
Hello, This is not an Orion specific question, but since I'm using Orion 1.4.7 I thought I'd try here. Is it possible to upload a class file from an application client? I want users to be able to implement a serializable interface, say X, and upload it to the server. The server will manage the interface and other users should be able to use that interface. I can model this as an Entity bean that has an attribute which is of type Class. However, the server would not have the implementation class on its classpath. How can I achieve this result? Or am I looking at the problem the wrong way? Thanks, Vidur
Re: Uploading class file from application client
I would imagine that you would need to upload the class to somewhere where the classloader can find them. I'm not sure where this is in orion. If orion can load classes dynamically, then all you would have to do is to save them into the correct directory. If you want to save them to a database, you may have to write your own version of classloader. Not sure how hard this would be. Scott PS - Read the above at your own risk - i'm purely speculating. [EMAIL PROTECTED] 03/09/01 07:48am Hello, This is not an Orion specific question, but since I'm using Orion 1.4.7 I thought I'd try here. Is it possible to upload a class file from an application client? I want users to be able to implement a serializable interface, say X, and upload it to the server. The server will manage the interface and other users should be able to use that interface. I can model this as an Entity bean that has an attribute which is of type Class. However, the server would not have the implementation class on its classpath. How can I achieve this result? Or am I looking at the problem the wrong way? Thanks, Vidur
Re: Application Client Security
Arved - or anybody - have you found a solution to this problem? Our application uses DataSourceUserManager and accessing it from servlets works reasonable well so far. However, when accessing it from an application-client any credentials not declared in the principals.xml file are rejected. Even worse, when a datasource user is defined with the same login name, even credentials that are in principals.xml get rejected. How does one use applications-clients to access applications that use DataSourceUserManager? P. Pontbriand Canlink Interactive Technologies Inc. - Original Message - From: "Arved Sandstrom" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wed, 13 Sep 2000 10:08:19 -0700 Subject: Application Client Security Hi, all I sort of asked about this before. Still haven't come up with a solution. A simple Yes or No as to feasibility would be helpful. In a nutshell, I switched over to a DataSourceUserManager plus the RoleManager. No real difficulty with EJB's, but using Orion API's for user management knocked an application-client out of the loop. No users, whether declared in the principals.xml or in the user database, are recognized anymore. I've tried all the obvious permutations, and am sort of at wits' end as to whether I can even use J2EE application clients once a user manager is in the picture. Any ideas? Arved Sandstrom
RE: Application Client Security
Hi, Peter No, I did not arrive at a solution. OTOH, we stopped using application clients in production...didn't really need them. I'm not convinced it doesn't work, it's just we didn't need to solve that problem that badly. Regards, Arved -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Pontbriand Sent: Monday, February 19, 2001 1:39 PM To: Orion-Interest Subject: Re: Application Client Security Arved - or anybody - have you found a solution to this problem? Our application uses DataSourceUserManager and accessing it from servlets works reasonable well so far. However, when accessing it from an application-client any credentials not declared in the principals.xml file are rejected. Even worse, when a datasource user is defined with the same login name, even credentials that are in principals.xml get rejected. How does one use applications-clients to access applications that use DataSourceUserManager? P. Pontbriand Canlink Interactive Technologies Inc. - Original Message - From: "Arved Sandstrom" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wed, 13 Sep 2000 10:08:19 -0700 Subject: Application Client Security Hi, all I sort of asked about this before. Still haven't come up with a solution. A simple Yes or No as to feasibility would be helpful. In a nutshell, I switched over to a DataSourceUserManager plus the RoleManager. No real difficulty with EJB's, but using Orion API's for user management knocked an application-client out of the loop. No users, whether declared in the principals.xml or in the user database, are recognized anymore. I've tried all the obvious permutations, and am sort of at wits' end as to whether I can even use J2EE application clients once a user manager is in the picture. Any ideas? Arved Sandstrom
Fwd: Error Reading application-client descriptor...
On Mike's suggestion, I modified the url to read: jdbc:postgresql:testdb since it's on localhost and the default port 5432. But I am still having the same problem. It works with hypersonic but not with postgresql. What else should I check? I'll appreciate any suggestions. Thanks --- Globetrot Communications [EMAIL PROTECTED] wrote: Date: Thu, 18 Jan 2001 15:33:57 -0800 (PST) From: Globetrot Communications [EMAIL PROTECTED] Subject: Error Reading application-client descriptor... To: [EMAIL PROTECTED] I am running Orion on Linux. The 'Product' application runs o.k when I use the hypersonic database. But I get the following error when trying to use postgreSQL: "Error reading application-client descriptor. Error looking up EJBHome. Disconnected.. Unknown command 7" The data-source.xml looks as follows: ?xml version="1.0"? !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd" data-sources !-- An example/default DataSource that uses an ordinary JDBC-driver (in this case hsql) to create the connections. This tag creates all the needed kinds of data-sources, transactional, pooled and EJB-aware sources. The source generally used in application code is the "EJB" one - it provides transactional safety and connection pooling. -- !-- data-source class="com.evermind.sql.DriverManagerDataSource" name="Hypersonic" location="jdbc/HypersonicCoreDS" xa-location="jdbc/xa/HypersonicXADS" ejb-location="jdbc/HypersonicDS" connection-driver="org.hsql.jdbcDriver" username="sa" password="" url="jdbc:HypersonicSQL:./database/defaultdb" inactivity-timeout="30" / -- data-source class="com.evermind.sql.ConnectionDataSource" name="postgresql" location="jdbc/postgreDS" xa-location="jdbc/xa/postgreXADS" ejb-location="jdbc/postgreEJBDS" connection-driver="org.postgresql.Driver" username="postgres" password="" url="jdbc:postgre:./database/postgredb" inactivity-timeout="30" schema="database-schemas/postgresql.xml" / /data-sources Also, I included "postgres" as a user in the "administrators" group in principals.xml Also, I include: default-data-source="jdbc/postgreEJBDS" in orion-application.xml under deployment-directory. Is there anything else I need to do? Do I need to do any clean-up after I run the application using hypersonic and before re-running it with postgres? Thanks for your help Satish Gupta __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ = __ 5.5 cents calls with 6-second billing no fees. Free toll-fre numbers. No other charges 4 cents Domestic calls with no fees: 5 cents per minute International calls also available http://globetrot.hypermart.net e-mail: [EMAIL PROTECTED] __ __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Error Reading application-client descriptor...
I am running Orion on Linux. The 'Product' application runs o.k when I use the hypersonic database. But I get the following error when trying to use postgreSQL: "Error reading application-client descriptor. Error looking up EJBHome. Disconnected.. Unknown command 7" The data-source.xml looks as follows: ?xml version="1.0"? !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd" data-sources !-- An example/default DataSource that uses an ordinary JDBC-driver (in this case hsql) to create the connections. This tag creates all the needed kinds of data-sources, transactional, pooled and EJB-aware sources. The source generally used in application code is the "EJB" one - it provides transactional safety and connection pooling. -- !-- data-source class="com.evermind.sql.DriverManagerDataSource" name="Hypersonic" location="jdbc/HypersonicCoreDS" xa-location="jdbc/xa/HypersonicXADS" ejb-location="jdbc/HypersonicDS" connection-driver="org.hsql.jdbcDriver" username="sa" password="" url="jdbc:HypersonicSQL:./database/defaultdb" inactivity-timeout="30" / -- data-source class="com.evermind.sql.ConnectionDataSource" name="postgresql" location="jdbc/postgreDS" xa-location="jdbc/xa/postgreXADS" ejb-location="jdbc/postgreEJBDS" connection-driver="org.postgresql.Driver" username="postgres" password="" url="jdbc:postgre:./database/postgredb" inactivity-timeout="30" schema="database-schemas/postgresql.xml" / /data-sources Also, I included "postgres" as a user in the "administrators" group in principals.xml Also, I include: default-data-source="jdbc/postgreEJBDS" in orion-application.xml under deployment-directory. Is there anything else I need to do? Do I need to do any clean-up after I run the application using hypersonic and before re-running it with postgres? Thanks for your help Satish Gupta __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: Error Reading application-client descriptor...
The user in principals.xml is a furfy. Looks like your URL is wrong: url="jdbc:postgre:./database/postgredb" should be url="jdbc:postgres:..." where ... is a combination of hostname, port and database name. See the postgres jdbc docs for more description. -mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Globetrot Communications Sent: Friday, January 19, 2001 10:34 AM To: Orion-Interest Subject: Error Reading application-client descriptor... I am running Orion on Linux. The 'Product' application runs o.k when I use the hypersonic database. But I get the following error when trying to use postgreSQL: "Error reading application-client descriptor. Error looking up EJBHome. Disconnected.. Unknown command 7" The data-source.xml looks as follows: ?xml version="1.0"? !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd" data-sources !-- An example/default DataSource that uses an ordinary JDBC-driver (in this case hsql) to create the connections. This tag creates all the needed kinds of data-sources, transactional, pooled and EJB-aware sources. The source generally used in application code is the "EJB" one - it provides transactional safety and connection pooling. -- !-- data-source class="com.evermind.sql.DriverManagerDataSource" name="Hypersonic" location="jdbc/HypersonicCoreDS" xa-location="jdbc/xa/HypersonicXADS" ejb-location="jdbc/HypersonicDS" connection-driver="org.hsql.jdbcDriver" username="sa" password="" url="jdbc:HypersonicSQL:./database/defaultdb" inactivity-timeout="30" / -- data-source class="com.evermind.sql.ConnectionDataSource" name="postgresql" location="jdbc/postgreDS" xa-location="jdbc/xa/postgreXADS" ejb-location="jdbc/postgreEJBDS" connection-driver="org.postgresql.Driver" username="postgres" password="" url="jdbc:postgre:./database/postgredb" inactivity-timeout="30" schema="database-schemas/postgresql.xml" / /data-sources Also, I included "postgres" as a user in the "administrators" group in principals.xml Also, I include: default-data-source="jdbc/postgreEJBDS" in orion-application.xml under deployment-directory. Is there anything else I need to do? Do I need to do any clean-up after I run the application using hypersonic and before re-running it with postgres? Thanks for your help Satish Gupta __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Application Client startup synchronization
After playing for a few hours, I figured out how to have an Application Client class start up with the server .. but it seems that the server fires off the client before it has finished starting itself up! Anyone deal with this yet? Is there a safe way to detect from the client when the server is done starting up? john d
SV: Application Client startup synchronization
Title: SV: Application Client startup synchronization John, is this a test app? i.e. not confidential code? If so, could you please include it for replication of error? WR -Ursprungligt meddelande- Från: John D'Ausilio [mailto:[EMAIL PROTECTED]] Skickat: den 9 januari 2001 06:18 Till: Orion-Interest Ämne: Application Client startup synchronization After playing for a few hours, I figured out how to have an Application Client class start up with the server .. but it seems that the server fires off the client before it has finished starting itself up! Anyone deal with this yet? Is there a safe way to detect from the client when the server is done starting up? john d
RE: Application Client startup synchronization
John, I had this occur with servlets that started up and tried to work with Orion EJBs immediately. Orion itself had not finished its own initialization. The calling servlet would hang, and so would orion. I put a thread delay into my startup application servlet #init method, on the advice of Magnum. This seemed to do the trick. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John D'Ausilio Sent: Tuesday, January 09, 2001 7:18 AM To: Orion-Interest Subject: Application Client startup synchronization After playing for a few hours, I figured out how to have an Application Client class start up with the server .. but it seems that the server fires off the client before it has finished starting itself up! Anyone deal with this yet? Is there a safe way to detect from the client when the server is done starting up? john d
Re: Comunicating between EJBs and Application Client
Hi! You need to specify reference to EJB, that you using from another EJB in ejb-jar.xml: Something like this: session display-nameMySession1/display-name ejb-nameMySession1/ejb-name homeMySession1Home/home remoteMySession1/remote ejb-classMySession1EJB/ejb-class ...!-- may be reference to datasource --... ejb-ref ejb-ref-nameejb/MySession2/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeMySession2Home/home remoteMySession2/remote ejb-linkMySession2/ejb-link /ejb-ref /session session display-nameMySession2/display-name ejb-nameMySession2/ejb-name homeMySession2Home/home remoteMySession2/remote ejb-classMySession2EJB/ejb-class ...!-- may be reference to datasource --... /session In code of MySession1 you can look up "java:comp/env/MySession2" and obtain remote-interface of MySession2 EJB. I hope you understand me. Daniel Degtyarev. - Original Message - From: "Christopher Bartling" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, December 21, 2000 6:11 PM Subject: Comunicating between EJBs and Application Client I've have what I hope is a really easy question to answer. I have a number of Session beans deployed to Orion (1.4.4 level), and everything works great when communicating from an application client (JSPs and servlets running Apache Tomcat) to the Orion server. Now I want to add some EJB to EJB communication, with one EJB obtaining the home and remote interfaces of another EJB and executing methods on that remote interface. When I attempt to lookup my bean using the JNDI context, I get an exception being thrown that says that it can't find the JNDI lookup name in the Application Client. I assume that Orion is not finding the application_client.xml file within its own environment. What are others doing to rectify this situation? I assume that EJB to EJB communication is **very common**, as most people are using Session bean fascades around their Entity beans. An example of this sort of functionality and the steps needed to configure it should be available through Orion or orionsupport.com, but I could not find anything. Thanks in advance.
Re: Comunicating between EJBs and Application Client
I'm sorry. I want to correct my previous message. In code of MySession1 you can look up "java:comp/env/ejb/MySession2" and obtain remote-interface of MySession2 EJB. - Original Message - From: "Daniel Degtyarev" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, December 22, 2000 11:33 AM Subject: Re: Comunicating between EJBs and Application Client Hi! You need to specify reference to EJB, that you using from another EJB in ejb-jar.xml: Something like this: session display-nameMySession1/display-name ejb-nameMySession1/ejb-name homeMySession1Home/home remoteMySession1/remote ejb-classMySession1EJB/ejb-class ...!-- may be reference to datasource --... ejb-ref ejb-ref-nameejb/MySession2/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeMySession2Home/home remoteMySession2/remote ejb-linkMySession2/ejb-link /ejb-ref /session session display-nameMySession2/display-name ejb-nameMySession2/ejb-name homeMySession2Home/home remoteMySession2/remote ejb-classMySession2EJB/ejb-class ...!-- may be reference to datasource --... /session In code of MySession1 you can look up "java:comp/env/MySession2" and obtain remote-interface of MySession2 EJB. I hope you understand me. Daniel Degtyarev.
Comunicating between EJBs and Application Client
I've have what I hope is a really easy question to answer. I have a number of Session beans deployed to Orion (1.4.4 level), and everything works great when communicating from an application client (JSPs and servlets running Apache Tomcat) to the Orion server. Now I want to add some EJB to EJB communication, with one EJB obtaining the home and remote interfaces of another EJB and executing methods on that remote interface. When I attempt to lookup my bean using the JNDI context, I get an exception being thrown that says that it can't find the JNDI lookup name in the Application Client. I assume that Orion is not finding the application_client.xml file within its own environment. What are others doing to rectify this situation? I assume that EJB to EJB communication is **very common**, as most people are using Session bean fascades around their Entity beans. An example of this sort of functionality and the steps needed to configure it should be available through Orion or orionsupport.com, but I could not find anything. Thanks in advance. -- chris bartling --
Re: application client and EJB: TX was null
Dario Dorigo wrote: Hi, I'm testing Orion 1.3.8 with another EJB based application developed with weblogic. After a bit of pain I was able to connect to the ejb and to call the ejbs. But when I try to get the data from the ejb I've found what was the problem: in the ejb-jar.xml of the ejb there were: container-transaction method ejb-nameModuleManager/ejb-name method-intfRemote/method-intf method-name*/method-name /method trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor And that seems that is not accepted from an external client. bye (the method signature is: public String [] getListOfModules(); ) I got this error: java.lang.InternalError: TX was null at com.evermind.server.ejb.EntityEJBObject.endTransaction(JAX) at com.evermind.server.ApplicationServerTransaction.aob(JAX) at com.evermind.server.ApplicationServerTransaction.commit(JAX) at com.evermind.server.ApplicationServerTransaction.end(JAX) at ModuleManager_StatefulSessionBeanWrapper4.getListOfModules(ModuleManager_StatefulSessionBeanWrapper4.java:1062) at java.lang.reflect.Method.invoke(Native Method) at com.evermind.server.rmi.bd.run(JAX) at com.evermind.server.rmi.bb.hy(JAX) at com.evermind.server.rmi.bb.run(JAX) at com.evermind.util.f.run(JAX) at connection to pii/192.168.10.55 at com.evermind.server.rmi.OrionRemoteException.h2(JAX) at com.evermind.server.rmi.bb.hw(JAX) at com.evermind.server.rmi.bb.run(JAX) at java.lang.Thread.run(Thread.java:484) On the server side the ejb is a session bean that get (succesfully) the data from another entity bean. (I printed out the array just before the return) Has anybody an idea of what is happening? Thanks a lot Dario -- Dario Dorigo Software Developer [EMAIL PROTECTED] __ Itrade AG Net Market Systems Nymphenburger Str. 86 D - 80636 Muenchen Tel: +49/(0)89/18951-0, Fax: -199 Email: [EMAIL PROTECTED] http://www.itrade.ag _ -- Dario Dorigo Software Developer [EMAIL PROTECTED] __ Itrade AG Net Market Systems Nymphenburger Str. 86 D - 80636 Muenchen Tel: +49/(0)89/18951-0, Fax: -199 Email: [EMAIL PROTECTED] http://www.itrade.ag _
application client and EJB: TX was null
Hi, I'm testing Orion 1.3.8 with another EJB based application developed with weblogic. After a bit of pain I was able to connect to the ejb and to call the ejbs. But when I try to get the data from the ejb (the method signature is: public String [] getListOfModules(); ) I got this error: java.lang.InternalError: TX was null at com.evermind.server.ejb.EntityEJBObject.endTransaction(JAX) at com.evermind.server.ApplicationServerTransaction.aob(JAX) at com.evermind.server.ApplicationServerTransaction.commit(JAX) at com.evermind.server.ApplicationServerTransaction.end(JAX) at ModuleManager_StatefulSessionBeanWrapper4.getListOfModules(ModuleManager_StatefulSessionBeanWrapper4.java:1062) at java.lang.reflect.Method.invoke(Native Method) at com.evermind.server.rmi.bd.run(JAX) at com.evermind.server.rmi.bb.hy(JAX) at com.evermind.server.rmi.bb.run(JAX) at com.evermind.util.f.run(JAX) at connection to pii/192.168.10.55 at com.evermind.server.rmi.OrionRemoteException.h2(JAX) at com.evermind.server.rmi.bb.hw(JAX) at com.evermind.server.rmi.bb.run(JAX) at java.lang.Thread.run(Thread.java:484) On the server side the ejb is a session bean that get (succesfully) the data from another entity bean. (I printed out the array just before the return) Has anybody an idea of what is happening? Thanks a lot Dario -- Dario Dorigo Software Developer [EMAIL PROTECTED] __ Itrade AG Net Market Systems Nymphenburger Str. 86 D - 80636 Muenchen Tel: +49/(0)89/18951-0, Fax: -199 Email: [EMAIL PROTECTED] http://www.itrade.ag _
Re: Application client.
Well.. just got in working myself, but I'm very new to all this so any gurus feel free to correct... In the same directory as your app drop a jndi.properties file in with the following: java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory java.naming.provider.url=ormi://localhost/appname//change this to your appname java.naming.security.principal=admin java.naming.security.credentials=123 and in your app.. import java.rmi.RemoteException; import javax.ejb.*; import javax.naming.*; import javax.rmi.PortableRemoteObject; import com.evermind.server.rmi.*; import xxx; //-import your class files for the bean here.. Context context = new InitialContext(); Object homeObject = context.lookup("beanName"); BeanHome beanHome = (BeanHome)PortableRemoteObject.narrow(homeObject, BeanHome.class); // from the home object do the create or find or whatever.. Bean bean = (Bean)PortableRemoteObject.narrow(beanHome.create(uniqueId), Bean.class); Hope that helps.. Tim [EMAIL PROTECTED] on 13/11/2000 23:49:48 Please respond to Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] cc: (bcc: Tim Clarke/Globebyte Limited UK) Subject Application client. : Hi All, I am trying to setup unit testing and I need to know how to make a client application that connects to the Orion server. Can someone explain either how to do this manually or how to use the clientassembler.jar tool? Also do I need to distribute the orion.jar file with standalone client applications? Does the clientassembler create all of the necessary class files (include stubs)? Thanks in advance, Ted Slusser
Re: Application client.
You will need sever things: 1) Create an application-clien.xml file that defines the ejb's needed for your application. For example if foo was an ejb deployed as fooejb, your application-client file should read: application-client display-nameMyApplication/display-name description/description ejb-ref ejb-ref-namefooejb/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homefooHome/home remotefoo/remote /ejb-ref /application-client 2) Create an orion-application-client.xml file that defines which ejb's your application will use. Again if foo were the only ejb used the orion-application-client.xml file would look as follows: orion-application-client ejb-ref-mapping location="fooejb" name="fooejb" / /orion-application-client 3) Package a jar that has all the necessary class files ( home, remote, client ) along with the xml files defined above. Keep in mind that the xml files must be named as mentioned in this email. Hope this helps, -Danno _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
Problem with application-client descriptor
Title: Hello,I new with EJB and I try to develop my own EJB with the help of the product demo.The problem is when I try my client application (XSLTransClient) I receive the following error : C:\orion\demo\ejb\XSLTransjava -classpath .;../../../orion.jar;../../../ejb.jar;../../jndi.jar XSLTransClientCommunication error: Error reading application-client descriptor: No EJBHome found at MyXSLTrans as specified by ejb-ref MyXSLTrans What's append ? Can any one help me ? tanks a lot Fred [EMAIL PROTECTED]
NamingException: Error-reading application-client descriptor
Hi, I am trying to deploy the following system in orion server. I have a java client which calls a session bean which in turn creates 3 Entity beans creating the objects and the relationships between them. I seem to have a problem in locating the session client Home from the java client through JNDI. I gave the following: in Orion-application-client: ejb-ref-mapping name="SessionClient" location="SessionClient" / (sessionclient is the ejb-jars ejb-name) in orion-ejb-jar: session-deployment name="SessionClient" location="SessionClient" wrapper="SessionClientHome_StatefulSessionHomeWrapper1" timeout="1800" persistence-filename="SessionClient" / looking up "java:comp/env/SessionClient" in the java client. Exception stack is given below: would appreciate any help in this regard Thanks much Krishnan class javax.naming.NamingException:Error reading application-client descriptor:No location specified and no suitable instance of the type 'SessionClient' foundfor the ejb-ref SessionClientjavax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'SessionClient' found forthe ejb-ref SessionClient at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.i! nit(InitialContext.java:182) at cmp.order.JavaClient.main(JavaClient.java:88)Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere!
Application-client xml not used for name resolution...
I created and deployed an ejb using ejb-jar.xml. I created an application-client.xml. However, no matter what name I use in ejb-ref-name tag, I am unable to bind to it. I am able to bind directly to the name given in the ejb-jar.xml. For example if ejb-jar.xml contains: ejb-namecom.citysearch.ejb.ClassType/ejb-name and application_client.xml contains: ejb-ref ... ejb-ref-nameMyValue/ejb-ref-name ejb-linkcom.citysearch.ejb.ClassType/ejb-link ... /ejb-ref Then the following code only finds the home when looking for "com.citysearch.ejb.ClassType" and NOT "MyValue": Context context = new InitialContext(); //WORKS System.out.println("Looking for: com.citysearch.ejb.ClassType"); Object h1 = context.lookup("com.citysearch.ejb.ClassType"); //DOES NOT WORK System.out.println("Looking for: MyValue"); Object h2 = context.lookup("MyValue"); I know that application-client.xml is being read, because when I put garbage in to it, I get errors during client startup. What is the need for application-client.xml if I cannot define to the client what MyValue really means. Am I missing something? Thanks. -AP_
hot to use JMS from a stand alone application client
Hi, I'm using 0rion 0.9.4l. I declared a jms topic in my jms.xml file as follows: topic name="Trade Manager Topic" location="jms/TradeManagerTopic" descriptiontrade manager topic/description /topic Now I can access a TopicConnectionFactory and the above mentionned jms topic through JNDI from within EJBs. But all my efforts to access those same things from a stand alone application client have failed. Here is the jndi.properties file used by my client: java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont extFactory #java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactor y java.naming.provider.url=ormi://localhost/idee java.naming.security.principal=admin java.naming.security.credentials=123 Because I'm using the ApplicationClientInitialContextFactory I had to create a application-client.xml file. In the client I first look up the TopicConnectionFactory with: Context ctx = new InitialContext(); TopicConnectionFactory connectionFactory = (TopicConnectionFactory)ctx.lookup("jms/TopicConnectionFactory"); but this always fails with a NamingException. So I tried declaring the connection factory as a resource in the application-client.xml file with: resource-ref res-ref-namejms/TopicConnectionFactory/res-ref-name res-typejavax.jms.TopicConnectionFactory/res-type res-authApplication/res-auth /resource-ref And now the client fails with: Exception in thread "main" javax.naming.NamingException: Error reading application-client descriptor: Error creating context: jms/TopicConnectionFactory not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.init(InitialContext.java:182) at com.decalog.servers.te.TradeManagerServer.getInitialContext(TradeManagerServ er.java:191) at com.decalog.servers.te.TradeManagerServer.main(TradeManagerServer.java:171) I must be missing something... Philippe. Philippe Renon décalog - 5, rue Bachaumont - 75002 PARIS Voice : +33 (0) 1 40 28 44 64 Fax : +33 (0) 1 40 28 24 54 E-mail : mailto:[EMAIL PROTECTED]