[JBoss-user] [EJB/JBoss] - JNDI problems with EJB
Hello all, We have deploy our application on JBoss 4.0.3SP1. It seems that all works properly but when the application call the first EJB there is a JNDI error. The EJB is not loaded. It seems that the JNDI doesn't have it. Looking on the log we have seen that there is the error below on the EJB deploy phase caused by that the EJB hasn't local and local home interfaces : 2006-04-18 11:19:01,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Starting jboss.j2ee:jndiName=ChiselGateway,service=EJB 2006-04-18 11:19:01,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Begin java:comp/env for EJB: ChiselGateway 2006-04-18 11:19:01,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] TCL: [EMAIL PROTECTED] 2006-04-18 11:19:01,421 DEBUG [org.jboss.ejb.StatelessSessionContainer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered. 2006-04-18 11:19:01,437 DEBUG [org.jboss.ejb.StatelessSessionContainer] End java:comp/env for EJB: ChiselGateway 2006-04-18 11:19:01,437 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] ChiselGateway cannot be Bound, doesn't have local and local home interfaces 2006-04-18 11:19:01,437 DEBUG [org.jboss.ejb.StatelessSessionContainer] Starting failed jboss.j2ee:jndiName=ChiselGateway,service=EJB java.lang.RuntimeException: invoker is null: jboss:service=invoker,type=jrmp at org.jboss.proxy.ejb.ProxyFactory.setupInvokers(ProxyFactory.java:244) at org.jboss.proxy.ejb.ProxyFactory.start(ProxyFactory.java:228) at org.jboss.ejb.SessionContainer.startInvokers(SessionContainer.java:421) at org.jboss.ejb.SessionContainer.startService(SessionContainer.java:383) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) This is a piece of the web.xml and the jboss.xml: web.xml ... ejb-nameChiselGateway/ejb-name com.whitestone.chisel.framework.ejb.chiselgateway.ChiselGatewayHome com.whitestone.chisel.framework.ejb.chiselgateway.ChiselGateway ejb-classcom.whitestone.chisel.framework.ejb.chiselgateway.ChiselGatewayEJB/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type ... jboss.xml ... ejb-nameChiselGateway/ejb-name jndi-nameChiselGateway/jndi-name ... Do anyone knows what could be happening? Any help will be apreciated. Thank you very much. Aear77 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3939438#3939438 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3939438 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI lookup for EJB3.0 and JBOSS 4.0.3SP1
Hi All, I'm new to EJB3.0 and JBoss4.0.3 SP1, so kind of struggling with all the initial startup problems. I have a session bean, which I'm testing but I'm not able to get the remote reference through JNDI lookup. Heres's my components @Remote public interface UserService extends Serializable { public User findUser(String userName); public boolean addUser(String userName, String firstName, String lastName); } -- Session Bean @Stateless @Remote(UserService.class) public class UserServiceImpl implements UserService { . ... } -- This is the class which gets called from the JSP(using JSF...) and is the client in this case. Both EJB and web are running in the same instance of of JBoss public class AuthenticationDelegate { public static AuthenticationDelegate authenticationDelegate = null; private static @EJB UserService userSvc; . .. Context context = new InitialContext(); String cName=context.lookup(UserServiceImpl/remote).getClass).getName(); userSvc = (UserService)context.lookup(UserServiceImpl/remote)//default jndi naming (bean-name/remote ) System.out.println(-- lookup object successfully); . . } -- Im getting this exception when im doing the lookup. java.lang.ClassCastException: $Proxy81 at com.demo.delegate.AuthenticationDelegate.(AuthenticationDelegate.java:55) at com.demo.delegate.AuthenticationDelegate.getAuthenticationDelegate(AuthenticationDelegate.java:86) at com.demo.UserBean.executeCommand(UserBean.java:47) 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 com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72) at javax.faces.component.UICommand.broadcast(UICommand.java:312) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) . -- I don't have any jboss.xml or any other configuration xml files as I suppose we don't need those with EJB3.0. Any help would be greatly appreciated Thanks Ved View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3939719#3939719 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3939719
[JBoss-user] [EJB/JBoss] - JNDI
Hi, I have two entity beans with the same jndi name. Is there a prefix to jndi so that the beans can be seen diferently? I do not want to assign different names to the beans. Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3935835#3935835 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3935835 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI ENC lookup returning Remote interface instead of Local?
Anyone have any idea what is happening here?? I have some entity beans that have local and remote interfaces, they are referenced by a session bean and I have placed the local refs in the deployment desciptor like so; ejb-local-ref ejb-ref-nameejb/FacultyLocalEJB/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type local-homecom.uni.faculty.FacultyHomeLocal/local-home com.uni.faculty.FacultyLocal ejb-linkFacultyEJB/ejb-link /ejb-local-ref ejb-local-ref ejb-ref-nameejb/StudentLocalEJB/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type local-homecom.uni.student.StudentHomeLocal/local-home com.uni.student.StudentLocal ejb-linkStudentEJB/ejb-link /ejb-local-ref ejb-local-ref ejb-ref-nameejb/SchoolLocalEJB/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type local-homecom.uni.school.SchoolHomeLocal/local-home com.uni.school.SchoolLocal ejb-linkSchoolEJB/ejb-link /ejb-local-ref ejb-local-ref ejb-ref-nameejb/AddressLocalEJB/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type local-homecom.uni.address.AddressHomeLocal/local-home com.uni.address.AddressLocal ejb-linkAddressEJB/ejb-link /ejb-local-ref But when I try to use them like; InitialContext jndiContext = new InitialContext(); Object obj = jndiContext.lookup(java:comp/env/ejb/FacultyLocalEJB); FacultyHomeLocal facultyHome = (FacultyHomeLocal)obj; obj = jndiContext.lookup(java:comp/env/ejb/StudentLocalEJB); StudentHomeLocal studentHome = (StudentHomeLocal)obj; obj = jndiContext.lookup(java:comp/env/ejb/SchoolLocalEJB); SchoolHomeLocal schoolHome = (SchoolHomeLocal)obj; obj = jndiContext.lookup(java:comp/env/ejb/AddressLocalEJB); AddressHomeLocal addressHome = (AddressHomeLocal)obj; I recieve the following exception; java.lang.ClassCastException: $Proxy364 at com.uni.dataFiller.DataFillerBean.initialize(DataFillerBean.java:36) This is because remote interfaces are being returned when Local one should be instead. To make things more irritating I only get the exception with some of the beans that have remote and Local interfaces and not with others and all works fine if I remove the remote interfaces to my entity beans. Cheers in advance View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3882494#3882494 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3882494 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI question: NameNotFoundException
Hi, there, I have a simple test application, with one stateless session bean. But every time I'm trying to look it up, I got NameNotFoundException. The session bean JNDI is also not showing up in the Global JNDI namespace. I have another application almost exactly same as this one, only names and packages are different, but it works. Here is more detailed info on the non-working application: The session beans: ChangeProgramNameBean.java The XDoclet generated remote interfaces: ChangeProgramName.java ChangeProgramNameHome.java In ejb-jar.xml: ![CDATA[ChangeProgramNameSession returns bean]] display-nameChangeProgramName EJB/display-name ejb-nameChangeProgramName/ejb-name [home]com.xxx..ejb.interfaces.ChangeProgramNameHome[/home] [remote]com.xxx..ejb.interfaces.ChangeProgramName[/remote] ejb-classcom.xxx..ejb.sessions.ChangeProgramNameBean/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type In jboss.xml: ejb-nameChangeProgramName/ejb-name jndi-namecom/xxx//ejb/sessions/ChangeProgramName/jndi-name In jboss-web.xml: ejb-ref ejb-ref-nameejb/ChangeProgramName/ejb-ref-name jndi-namecom/xxx//ejb/sessions/ChangeProgramName/jndi-name /ejb-ref In web.xml: ejb-ref ![CDATA[Reference to the Change Program Name Session EJB]] ejb-ref-nameejb/ChangeProgramName/ejb-ref-name ejb-ref-typeSession/ejb-ref-type [home]com.xxx..ejb.interfaces.ChangeProgramNameHome[/home] [remote]com.xxx..ejb.interfaces.ChangeProgramName[/remote] /ejb-ref (Note: the squar brackets is in replace of and , since they cannot be displayed right here.) And in my code on the web site, I lookup the session bean: Context context = new InitialContext(); Object ref = context.lookup(java:/comp/env/ejb/ChangeProgramName); home = (ChangeProgramNameHome) PortableRemoteObject.narrow(ref, ChangeProgramNameHome.class); But the Name not found exception was thrown at context.lookup line. Any ideas? Thanks a lot in advance. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3871524#3871524 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3871524 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI available outside tje server?
Hello all, I'm trying to call a stateless session bean's business method from outside the server it is running on. Therfore I must access the JNDI of the jboss server. I created a jndi.properties file with the folowing entries: anonymous wrote : java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces | # Do NOT uncomment this line as it causes in VM calls to go over | # RMI! | java.naming.provider.url=jnp://server-dns-shortname:1099 | # The jnp protocol socket factory class | jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory | # The TimedSocketFactory connection timeout in milliseconds(0 == blocking) | jnp.timeout=1000 | # The TimedSocketFactory read timeout in milliseconds(0 == blocking) | jnp.sotimeout=250 | however the connection gets timed out. After a while I got the idea to portscan (TCP) the server and to my surpise port 1099 isn't open. What do I have to do to make the JNDI available to remote clients? Can I then, somehow, restrict access to only certain clients? Regards, Hugo P.s. my naming config from jboss-service.xml is: anonymous wrote : !-- -- |!-- JNDI -- |!-- -- | |mbean code=org.jboss.naming.NamingService | name=jboss:service=Naming | xmbean-dd=resource:xmdesc/NamingService-xmbean.xml | !-- The call by value mode. true if all lookups are unmarshalled using | the caller's TCL, false if in VM lookups return the value by reference. | -- | false | !-- The listening port for the bootstrap JNP service. Set this to -1 | to run the NamingService without the JNP invoker listening port. | -- | 1099 | !-- The bootstrap JNP server bind address. This also sets the default | RMI service bind address. Empty == all addresses |-- | ${jboss.bind.address} | !-- The port of the RMI naming service, 0 == anonymous -- | 1098 | !-- The RMI service bind address. Empty == all addresses |-- | ${jboss.bind.address} | !-- The thread pool service used to control the bootstrap lookups -- | depends optional-attribute-name=LookupPool | proxy-type=attributejboss.system:service=ThreadPool | | |mbean code=org.jboss.naming.JNDIView | name=jboss:service=JNDIView | xmbean-dd=resource:xmdesc/JNDIView-xmbean.xml | View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3869093#3869093 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3869093 --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI and DataSources
I have successfully bound a DataSource to the naming service: [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=MySqlDS,service=DataSourceBinding to JNDI name 'java:MySqlDS' Objects from applications deployed within the Application Server are able to look this up properly using: | private String initialContextFactory = org.jnp.interfaces.NamingContextFactory; | | private String url = localhost:1099; | | private String namingFactoryURLPackages = org.jboss.naming:org.jnp.interfaces; | | private String principal = ; | | private String credentials = ; | | public AbstractJndiLocator() throws ServiceLocatorException { | env = new Properties(); | env.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory); | env.setProperty(Context.PROVIDER_URL, url); | env.setProperty(Context.URL_PKG_PREFIXES, namingFactoryURLPackages); | // env.put(Context.SECURITY_PRINCIPAL, principal); | // env.put(Context.SECURITY_CREDENTIALS, credentials); | try { | ctx = new InitialContext(env); | // ctx = new InitialContext(); | } catch (NamingException e) { | throw new ServiceLocatorException(Unable to create AbstractJndiLocator; + e.getMessage(), e); | } | } | | /** | * If this returns null, caller should deal with it | */ | public Object lookup(String name) throws NamingException { | System.out.println(NAME + + ctx.getNameInNamespace()); | | | | to java:MySqlDS. My understanding is that any application should now be able to look this DataSource up given the correct InitialContext. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3860813#3860813 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3860813 --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI and DataSources
I have successfully bound a DataSource to the naming service: [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:name=MySqlDS,service=DataSourceBinding to JNDI name 'java:MySqlDS' Objects deployed in the Application Server are able to look this up using: | private String initialContextFactory = org.jnp.interfaces.NamingContextFactory; | private String url = localhost:1099; | private String namingFactoryURLPackages = org.jboss.naming:org.jnp.interfaces; | | env = new Properties(); | env.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory); | env.setProperty(Context.PROVIDER_URL, url); | env.setProperty(Context.URL_PKG_PREFIXES, namingFactoryURLPackages); | try { | ctx = new InitialContext(env); | Object o = ctx.lookup(java:MySqlDS); | } catch (NamingException e) { |// | } | } | I am now writing JUnit test cases; these objects are not deployed into the Application Server. When I use the same code to lookup java:MySqlDS I receive a NamingException. When I list all bindings, none are found. It seems I'm missing something conceptually... based on what I know there should be no difference between objects deployed / outside the Application Server and how they interact with the naming service. Thanks in advance. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3860815#3860815 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3860815 --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI Problem on Applet-SFSB
Hi everyone... Im quite desperate trying to enable a JNDI lookup for several days now. I have a signed applet contacting a stateful session bean. Since Applets are only allowed to load code from the machine they came from the specific code is like: | Properties props = System.getProperties(); | props.setProperty(java.naming.factory.initial,org.jnp.interfaces.NamingContextFactory ); | props.setProperty(java.naming.provider.url, this.getCodeBase().getHost()); | GTCSessionHome home = | (GTCSessionHome) PortableRemoteObject.narrow(new InitialContext(props).lookup(GTCSession),GTCSessionHome.class); | The code works fine as long as i have it in a LAN environment, but as soon as i set it up on a remote server the lookup fails. I opened the standard TCP Ports for JNDI, Tomcat and RMI (1098,1099,,8080). I heard there are some problems with the NAT Translation, but i dont know how to bypass them, since i have to get the URL with a this.getCodeBase().getHost() due to security limitations. Looking up a stateful session bean on the internet should be working somehow... any hints would be appreciated. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3854256#3854256 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3854256 --- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi name for EJBLocalHome
Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, In JBoss 4.0 (such as in jboss.xml) how do I specify the JNDI name of an EJBLocalHome or EJBLocalObject (as opposed to the JNDI names of objects that implement remote interfaces)? Thanks, bwp View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3853173#3853173 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3853173 --- This Newsletter Sponsored by: Macrovision For reliable Linux application installations, use the industry's leading setup authoring tool, InstallShield X. Learn more and evaluate today. http://clk.atdmt.com/MSI/go/ins003001msi/direct/01/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI issues - POJO cannot locate EJBs correctly
Hi, i'm facing a very very weird problem. Basically, i got POJOs that can locate EJBs and POJOs that cannot locate EJBs. This seems to be a random behaviour. Here is. I use POJO business objects in a layer between my session faades and my cmps. I already have on use case working like this: the faade doesn't make references to other ejbs (neither in ejb-jar.xml nor jboss.xml), as it delegates the work to a business POJO. This is business POJO looks for a local interface in the following way. | partyHouseLocalHome = (PartyHouseLocalHome)ejbHomeFactory.lookupByLocalEJBReference(PartyHouseLocal); | The above code is inside the POJO's constructor. Everything works perfectly fine. I afirm: The faade which delegates to this POJO, which is the PartyIssuesBean, does not have any reference in ejb-jar.xml and jboss.xml to the bean PartyHouseBean, the one i'm looking for in the above code. So, today i was creating a new use case and build a very similar archicture - a session faade that delegates to a POJO. I build a brand new session faade that does not reference any other bean in ejb-jar.xml and jboss.xml. This faade delegates to a POJO that, inside it's constructor, look for the following ejbs. | partyHouseLocalHome = (PartyHouseLocalHome)ejbHomeFactory.lookupByLocalEJBReference(PartyHouseLocal); | partyNegotiationLocalHome = (PartyNegotiationLocalHome)ejbHomeFactory.lookupByLocalEJBReference(PartyNegotiationLocal); | Here's the weird thing, on the second lookup i get a javax.ejb.NameNotFoundException The lookup for the PartyHouseBean works, but the lookup for the PartyNegotiationBean does not work!!! Then, i decided to add a reference (in ejb-jar.xml and jboss.xml) to the PartyNegotiationBean for the Session faade the delegates to this POJO. With that, i lookup works fine In other words: - When i lookup from this POJO for the PartyHouseBean (as in the code above) i do not need a reference to PartyHouseBean in ejb-jar.xml or jboss.xml for the faade that uses this POJO. - When i lookup from this POJO for the PartyNegotiationBean, it only works if a set a reference to PartyNegotiationBean in ejb-jar.xml and jboss.xml for the faade that uses this POJO. How weird is that I couldn't see any thing diferent between the code of PartyHouseBean and PartyNegotiationBean..., is there some kind of externalize ejb-jar.xml session | description[CDATA[]]/description | | ejb-nameEventPromotion/ejb-name | | homeltcmelo.homeinterface.EventPromotionHome/home | remoteltcmelo.remoteinterface.EventPromotion/remote | local-homeltcmelo.localhomeinterface.EventPromotionLocalHome/local-home | localltcmelo.localinterface.EventPromotionLocal/local | ejb-classltcmelo.session.EventPromotionSession/ejb-class | session-typeStateless/session-type | transaction-typeContainer/transaction-type | | !-- THIS IS THE FACADE THAT DELEGATES TO THE POJO. IN THE POJO I C | PERFECTLY LOCATE THE PartyHouseBean WITHOUD SETTING A LOCAL REF, | BUT I CAN ONLY LOCATE THE PartyBean IF I INSERT THIS REFERENCE -- | | ejb-local-ref | ejb-ref-nameejb/PartyLocal/ejb-ref-name | ejb-ref-typeEntity/ejb-ref-type | local-homeltcmelo.localhomeinterface.PartyLocalHome/local-home | localltcmelo.localinterface.PartyLocal/local | ejb-linkParty/ejb-link | /ejb-local-ref | | /session | jboss.xml | session | ejb-nameEventPromotion/ejb-name | jndi-nameEventPromotionBean/jndi-name | local-jndi-nameEventPromotionLocal/local-jndi-name | | !-- I NEED TO ADD THIS REFERENCE SO MY POJO CAN WORK WITH THE | PartyBean!!! | NOTE THAT THE POJO LOCATES THE PartyHouseBean AND I DON'T HAVE | A REF. TO PartyHouseBean HERE. | -- | | ejb-local-ref | ejb-ref-nameejb/PartyLocal/ejb-ref-name | jndi-namePartyLocal/jndi-name | /ejb-local-ref | | method-attributes | /method-attributes | /session | Thanks for any help. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3847668#3847668 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3847668 --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi lookups fail (under load)
Problem: many clients to try lookup a session bean concurrently. If the client count reaches a certain number, the lookup fails with: [java] javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [java] at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1119) [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1196) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509) [java] at javax.naming.InitialContext.lookup(InitialContext.java:347) Setting the backlog param of the naming service to a higher value does not have any effect. Is there any workaround to avoid this? Otherwise it is not possible to access EJBs from many clients. Thanks, marek View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3843064#3843064 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3843064 --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi look up problem
hi friends Please help me I could not show my ejb in jmx-console i have deplyed it under the following naming context my jboss.xml is as follows my os is Windows XP enterprise-beans ejb-nameTestEjb/ejb-name jndi-namejava:comp/env/ejb/HelloHomeBean/jndi-name /enterprise-beans it is a session bean- if i dont give java:comp and deploy the bean with the simple name client says Bean not found.While in the server log file it is showing that bean has bean deployed.So please help me any body.Becuase if i deploy the bean with the above name the exception in running the client is comp not found.Then what should i do my ejb-jar.xml file is as follows- ejb-jar enterprise-beans ejb-nameTestEjb/ejb-name hello.Test.HelloHomeBean hello.Test.HelloBean ejb-classhello.Test.HelloEjb/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /enterprise-beans assembly-descriptor ejb-nameTestEjb/ejb-name method-name*/method-name container-transaction trans-attributeRequired/trans-attribute /container-transaction /assembly-descriptor /ejb-jar If my jboss.xml is as follows enterprise-beans ejb-nameTestEjb/ejb-name jndi-nameHelloHomeBean/jndi-name /enterprise-beans then it also show while running client that HelloHomeBean not found. How to lookup in jmx-console about this bean and under which namespace should i see it.jmx-console shows nothing about the bean. [/url] View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3841450#3841450 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3841450 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi llok up problem
please help me, i have deployed a stateless session bean with the jndi name HelloHome in the jboss3.2.2 .server is showing that bean has been deployed but when we run the client followinf error occurs--- D:\SKTEJBjava -classpath c:\jboss\client;d:\sktejb;d:\sktejb;c:\jboss\client\jb oss-common-client.jar;c:\jboss\client\jnp-client.jar;c:\jboss\client\log4j.jar h ello.HelloClient javax.naming.NameNotFoundException: HelloHome not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) at org.jnp.server.NamingServer.getObject(NamingServer.java:509) at org.jnp.server.NamingServer.lookup(NamingServer.java:282) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 60) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:701) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream RemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java: 223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507) at javax.naming.InitialContext.lookup(InitialContext.java:347) at hello.HelloClient.main(HelloCl please help me any boody View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3841032#3841032 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3841032 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi look up problem
hi my operating system is windows XP please help me when i run the client the following errors comes-- D:\SKTEJBjava -classpath c:\jboss\client;d:\sktejb;c:\jboss\server\default\lib; d:\sktejb;c:\jboss\client\jboss-common-client.jar;c:\jboss\client\jnp-client.jar ;c:\jboss\client\log4j.jar hello.HelloClient javax.naming.NameNotFoundException: HelloHome not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) at org.jnp.server.NamingServer.getObject(NamingServer.java:509) at org.jnp.server.NamingServer.lookup(NamingServer.java:282) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 60) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:701) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream RemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java: 223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507) at javax.naming.InitialContext.lookup(InitialContext.java:347) at hello.HelloClient.main(HelloClient.java:21) my ejb-jar.xml file is as follows-- ?xml version=1.0? !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN http://java.sun.com/dtd/ejb-jar_2_0.dtd; ejb-jar enterprise-beans ejb-nameTestEjb/ejb-name hello.HelloHome hello.HelloBean ejb-classhello.HelloEjb/ejb-class session-typeStateless/session-type transaction-typeContainer/transaction-type /enterprise-beans /ejb-jar my jboss.xml is as ?xml version='1.0' ? enterprise-beans ejb-nameTestEjb/ejb-name jndi-nameHelloHome/jndi-name /enterprise-beans View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3841048#3841048 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3841048 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi name
I want to use java:comp/env/ejb/MyEJBJNDI to look up a remote home object. My jboss.xml is as ?xml version='1.0' ? enterprise-beans ejb-nameMyEJB/ejb-name jndi-namejava:comp/env/ejb/MyEJBJNDI/jndi-name /enterprise-beans After I start up JBoss and look at JNDI tree view, I find MyEJB bean is bound to java%3acomp/env/ejb/MyEJBJNDI in JBoss 3.0.4. Please advise me how to use java:comp/env/ejb as a prefix. Jim View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3841073#3841073 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3841073 --- This SF.Net email sponsored by Black Hat Briefings Training. Attend Black Hat Briefings Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - jndi lookup/referencing question
Hello, I have a Servlet/Applet, which, changes very seldom that I worked on about a year ago and maintain. Usually when I develop the beans that I reference do not change, but in this case my servlet receives data from another bean which is frequently updated by another developer in our organization. A problem that we've been running into, is that every time he updates his bean, my Servlet breaks. All I have to do to fix it is to re-deploy it, so I'm fairly certain that there must be a subtle problem with either the way I'm looking this bean up or with our jboss configuration. I can't find anything written on this, so I'm sure it must be a quirk with our stuff. Does anyone have any ideas about this? Here's how I'm doing the lookup in the servlet: public void init() throws ServletException { try { jndiContext = new InitialContext(); System.out.println(jndiContext=+jndiContext); Object ref = jndiContext.lookup(java:comp/env/ejb/Jdbcnan); jdbcboardhome = (JdbcboardHome) PortableRemoteObject.narrow(ref, JdbcboardHome.class); jdbcboard = jdbcboardhome.create(); } catch(Exception e) { e.printStackTrace(); } } Here's my web.xml web-app !-- ### Servlets -- servlet-nameVplAppServlet/servlet-name servlet-classcae.VPL.VplAppServlet/servlet-class servlet-mapping servlet-nameVplAppServlet/servlet-name url-pattern/VplAppServlet/url-pattern /servlet-mapping welcome-file-list welcome-filehome.jsp/welcome-file /welcome-file-list ejb-ref ejb-ref-nameejb/Jdbcnan/ejb-ref-name ejb-ref-typeSession/ejb-ref-type cae.jdbcboard.JdbcboardHome cae.jdbcboard.Jdbcboard /ejb-ref /web-app And here is my jboss-web.xml: jboss-web ejb-ref ejb-ref-nameejb/Jdbcnan/ejb-ref-name jndi-nameJdbcboard/jndi-name /ejb-ref /jboss-web Thank You, ~Nano View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3838356#3838356 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838356 --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI: how to register objects running on different machines
Hi all, Whenever I deploy a particular bean, it gets registered in the JNDI running in that application server only. But what I need is I am deploying 3 different objects in three app servers(all jboss 3.2.3) running on three different machines but all these objects should be registered or binded in only one JNDI running on machine 4 so that client just communicates with only one JNDI for all the objects. I think this is possible.(Because this is the concept of distributed objects) but how is it possible that I don't know. Whether we should make configuration changes in JNDI running on machine 4 or I should make changes in the deployemnt descriptor of the beans. If any one of you know which XML files need to be changed and how then please let me know. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835090#3835090 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835090 --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - JNDI
Can anyone provide me a complete example of the Client code, esp. the setting the JNDI properties and the urls, etc. a href=http://www.jboss.org/index.html?module=bbop=viewtopicp=3825622#3825622;View the original post/a a href=http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3825622Reply to the post/a --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user