[EJB/JBoss] - Re: Fail to lookup entity bean inside a stateless session be
by calsonli
Thanks a lot for your reply, Waynebaylor.
My lookup code is as follows, which is generated from XDoclet.
| /**
| * Utility class for Staff.
| * @xdoclet-generated at ${TODAY}
| * @copyright The XDoclet Team
| * @author XDoclet
| * @version ${version}
| */
| public class StaffUtil
| {
| /** Cached local home (EJBLocalHome). Uses lazy loading to obtain its value (loaded by getLocalHome() methods). */
| private static ts.interfaces.StaffLocalHome cachedLocalHome = null;
|
| private static Object lookupHome(java.util.Hashtable environment, String jndiName, Class narrowTo) throws javax.naming.NamingException {
| // Obtain initial context
| javax.naming.InitialContext initialContext = new javax.naming.InitialContext(environment);
| try {
| Object objRef = initialContext.lookup(jndiName);
| // only narrow if necessary
| if (java.rmi.Remote.class.isAssignableFrom(narrowTo))
| return javax.rmi.PortableRemoteObject.narrow(objRef, narrowTo);
| else
| return objRef;
| } finally {
| initialContext.close();
| }
| }
|
| // Home interface lookup methods
|
| /**
| * Obtain local home interface from default initial context
| * @return Local home interface for Staff. Lookup using COMP_NAME
| */
| public static ts.interfaces.StaffLocalHome getLocalHome() throws javax.naming.NamingException
| {
| if (cachedLocalHome == null) {
| cachedLocalHome = (ts.interfaces.StaffLocalHome) lookupHome(null, ts.interfaces.StaffLocalHome.COMP_NAME, ts.interfaces.StaffLocalHome.class);
| }
| return cachedLocalHome;
| }
| }
|
Thank you,
Calson
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067675#4067675
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067675
18Â years, 9Â months
[JBoss Portal] - PortletBridge woes
by cdelashmutt
Is anyone out there successfully using PortletBridge (www.portletbridge.org) with JBoss Portal?
I know this is the JBoss Portal forum, but I wanted to see if anyone has had any luck with it. I've spent the better part of today trying to use it, and although XSLT seems to be the right way to go to transform a page into portlet friendly content, it is a pain to get working properly.
For instance, it seems like the default XSL that the PortletBridge uses is mostly ignoring it's templates because of the "Identity" template at the bottom of the file:
| <xsl:template match="@*|*">
| <xsl:copy>
| <xsl:apply-templates select="@*|node()"/>
| </xsl:copy>
| </xsl:template>
I didn't want to copy the _entire_ xsl here, but you can view it at http://portletbridge.cvs.sourceforge.net/portletbridge/portletbridge-port...
If I test out the default stylesheet conversion in oXygen with a page I'm trying to transform, that stylesheet seems to do nothing more that copy everything from the source document with no modification. It's not re-writing URLs, or doing anything. Is the default stylesheet broken that anyone is aware of? Anyone on the team ever tried using PortletBridge?[/url]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067669#4067669
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067669
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Re: ClassCastException while while class transfering from ea
by zebathon
I guess i should also add the exception heh
anonymous wrote : 2007-07-25 19:26:35,390 ERROR [org.codehaus.xfire.handler.DefaultFaultHandler] Fault occurred!
| java.lang.ClassCastException: $Proxy94
| at com.ifyouwannabecool.impl.ApiClientWSImpl.addApiClient(ApiClientWSImpl.java:61)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
| at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
| at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
| at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
| at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
| at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
| at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
| at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
| at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:278)
| at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
| at org.codehaus.xfire.spring.remoting.XFireServletControllerAdapter.handleRequest(XFireServletControllerAdapter.java:67)
| at org.codehaus.enunciate.modules.xfire.EnunciatedXFireExporter.handleRequest(EnunciatedXFireExporter.java:121)
| at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
| at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
| at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
| at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
| at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067666#4067666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067666
18Â years, 9Â months