Re: Writing custom Resource Manager
I am also interested whether this can also be performed. Evan Vaala Vidur Dhanda wrote: Hello, Is it possible to write a custom resource manager in EJB1.1 and Orion? Much like EJBs can use a DataSource, I would like to write an application specific resource manager. How can I do that? Thanks, Vidur PS. If possible, please cc me the replies.
Security Exception
Orion/1.0rc2 - orion.jar filesize 1,541,119 bytes The following is thrown: java.lang.SecurityException at com.evermind.server.http.HttpApplication.qz(JAX) at com.evermind.server.http.HttpApplication.ry(JAX) at com.evermind.server.http.dn.qz(JAX) at com.evermind.server.http.HttpApplication.getRequestDispatcher(JAX) at com.evermind.server.http.EvermindPageContext.include(JAX) at /motionbook/motionbook.jsp._jspService(/motionbook/motionbook.jsp.java:60) (JSP page line 44) at com.evermind.server.http.EvermindHttpJspPage.service(JAX) at com.evermind.server.http.dd.o2(JAX) at com.evermind.server.http.dd.forward(JAX) at com.evermind.server.http.dk.o7(JAX) at com.evermind.util.e.run(JAX) I have configured to use servlet mapping to a .jsp file. There is a security contstraint for all *.jsp files in the directory of the mapped .jsp file. servlet descriptionno description/description display-namecentralJsp/display-name servlet-namewebTierEntryPoint/servlet-name jsp-file/motionbook/motionbook.jsp/jsp-file !--load-on-startup-1/load-on-startup-- load-on-startup1000/load-on-startup /servlet servlet-mapping servlet-namewebTierEntryPoint/servlet-name url-pattern/motion/*/url-pattern /servlet-mapping The url that I type is http://localhost/motion/ - then the exception is thrown It does work if I first go http://localhost/motionbook/motionbook.jsp - The login screens are displayed accordingly and I am allowed access. I then can go back to http://localhost/motion/ and everything works fine. This worked in Orion/rc2 build 9 and the first Orion/rc2 file size 1,536,851 I am on WinNT 4.0, Sun jdk1.2.2 If I am doing something incorrect, please advise - Thanks! Evan Vaala Here are my config files: orion/apps/ra-app/ra-web/Web-inf/web.xml ?xml version="1.0"? !DOCTYPE web-application SYSTEM "web-application.dtd" web-app display-nameRockwell Automation/display-name description A small demo web-app demonstrating interaction between JSP and EJB. /description !--developmenttrue/development-- session-config session-timeout120/session-timeout /session-config taglib taglib-uriejbtags/taglib-uri taglib-location/WEB-INF/lib/ejbtags.jar/taglib-location /taglib taglib taglib-uriutiltags/taglib-uri taglib-location/WEB-INF/lib/utiltags.jar/taglib-location /taglib taglib taglib-uriratags/taglib-uri taglib-location/WEB-INF/lib/ratags.jar/taglib-location /taglib servlet descriptionno description/description display-namecentralJsp/display-name servlet-namewebTierEntryPoint/servlet-name jsp-file/motionbook/motionbook.jsp/jsp-file !--load-on-startup-1/load-on-startup-- load-on-startup1000/load-on-startup /servlet servlet-mapping servlet-namewebTierEntryPoint/servlet-name url-pattern/motion/*/url-pattern /servlet-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list security-constraint web-resource-collection url-pattern/labels/labelit.jsp/url-pattern url-pattern/mfg/bom.jsp/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-namelabelusers/role-name role-nameadministrators/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/ledger/*.jsp/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-nameaccounting/role-name role-nameadministrators/role-name /auth-constraint /security-constraint security-constraint web-resource-collection url-pattern/motionbook/*.jsp/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-namemotionbook/role-name role-nameadministrators/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method
Retrieving EJB's across platforms
I am having a problem calling EJB's across platforms. I created a routine in jsp(temporarily) from the coded supplied to this group by Jens Stutte(Thank you!) in a previous posting. I have EJB's called "inventory" on two different boxes. My main Orion server is running on local host. This Test.jsp on retrieves the context from server xyz.xyz.xyz.xyz. However when I retrieve the "home" inventory be it keeps pulling in the "home" inventory bean from local host. However, on xyz.xyz.xyz.xyz as a test I bound in foo=bar( ctx.bind("foo","bar") ) and I am able to(from localhost) retrieve that value from the xyz.xyz.xyz.xyz server. See code below. Am I doing something wrong? Or might this be a bug. Both xyz.xyz.xyz.xyz have the inventory ejb loaded. They do use the same interfaces, but the InventoryEJB classes are coded differently. Any help would be appreciated! Thanks! Evan Vaala Test.jsp: -- String ejbUrl = "ormi://xyz.xyz.xyz.xyz/inventory"; String m_Factory = "com.evermind.server.rmi.RMIInitialContextFactory"; String m_User = "admin"; String m_Password = "123"; try { Hashtable h = new Hashtable(); h.put(Context.INITIAL_CONTEXT_FACTORY,m_Factory); h.put(Context.PROVIDER_URL, ejbUrl); if (m_User != null) { h.put(Context.SECURITY_PRINCIPAL, m_User); if (m_Password == null) m_Password = ""; h.put(Context.SECURITY_CREDENTIALS, m_Password); } Context plantctx = new InitialContext(h); Object homeObject = plantctx.lookup("inventory"); home = (InventoryHome)PortableRemoteObject.narrow(homeObject, InventoryHome.class); System.out.println( plantctx.lookup("foo") ); } catch (NamingException ex) {ex.printStackTrace();} Inventory inv = home.findByPrimaryKey("0008-6807"); Collection items = inv.getItems(); --- ejb-jar.xml: --- ?xml version="1.0"? !DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd" ejb-jar description/description enterprise-beans entity description/description display-nameinventory.ejb.Inventory/display-name ejb-nameinventory/ejb-name homeinventory.ejb.InventoryHome/home remoteinventory.ejb.Inventory/remote ejb-classinventory.ejb.InventoryEJB/ejb-class persistence-typeBean/persistence-type prim-key-classjava.lang.String/prim-key-class reentrantFalse/reentrant /entity /enterprise-beans assembly-descriptor /assembly-descriptor /ejb-jar -
Server.xml classpath problem - 0.9.1c
I posted this earlier in the week. It still doesn't seem to work in 0.9.1c. "Bail . Jeff" wrote: I just upgraded to 0.9.1 and I'm having problems with my library path entry in server.xml. I noticed that the format of this tag has changed slightly, so I simply copied my list of jars (delimited by ;'s) from my 0.8.2 server.xml to the 0.9.1 server.xml, but it is unable to find a class that 0.8.2 had no problem finding. RH Linux 6.1, Sun JDK 1.2.2 RC2. I am having the same problem. In my case I have narrowed it down to be only classes that are defined in a VariableInfo object when subclassing a TagExtraInfo class. The only work around that I have found at this point is to jar the needed classes into orion.jar. As Jeff mentioned, the library path did work ok in 0.8.2, but not in 0.8.3 and above. Here is a snip of my code and the error message: public class PageIdTagExtraInfo extends TagExtraInfo { public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), "ra.web.PageId", true, VariableInfo.AT_END), Error returned from Browser: 500 Internal Server Error Error parsing JSP page /labelit.jsp line 15 Bean type 'ra.web.PageId' not found
Re: jre/lib/ext
"Kucera, Rich" wrote: Is there yet an acceptable alternative to copying every jar file you use to jre/lib/ext if you want to use java 1.3 beta? tia I have had luck with editing the library-path tag in /orion/config/server.xml. I have only tried this with jsp, and have not yet tried it with ejb. Example: library-path../lib;d:\\jwork\\lib;../classes111.zip/library-path Evan Vaala