Re: [JBoss-user] JNDI Name
No, you have to expose some interface yourself to access it remotely. alex Rod Macpherson wrote: Ah, light comes on. In any event, I specified FoobarDS and since JBoss plunked it down in java:/FoobarDS am I correct in assuming that direct access to datasources is not supported? Normally we use session beans and delegate database access through the session beans. In this case I wanted to cobble together a quick 'n dirty test app that used the datasource on a running instance of JBoss. Should I use the session façade in this case also or is there a way to get the datasource remotely? -Original Message- From: Alexey Loubyansky [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 4:37 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI Name Everything under 'java:/' is not remotely accessible. alex Rod Macpherson wrote: JBoss is binding my datasource just fine and my webapp works but trying to connect from a stand-alone client outside of the server fails: 14:25:52,704 INFO [FoobarDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=FoobarDS to JNDI name 'java:/FoobarDS' The datasource is FoobarDS and we lookup the string java:/FoobarDS and that works fine within our J2EE application. Only fails from a remote client (fabled option D did not work either:) TIA, Rod --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JNDI Name
Okie dokie. Thanks, Rod -Original Message- From: Alexey Loubyansky [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 2:56 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI Name No, you have to expose some interface yourself to access it remotely. alex Rod Macpherson wrote: Ah, light comes on. In any event, I specified FoobarDS and since JBoss plunked it down in java:/FoobarDS am I correct in assuming that direct access to datasources is not supported? Normally we use session beans and delegate database access through the session beans. In this case I wanted to cobble together a quick 'n dirty test app that used the datasource on a running instance of JBoss. Should I use the session façade in this case also or is there a way to get the datasource remotely? -Original Message- From: Alexey Loubyansky [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 4:37 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI Name Everything under 'java:/' is not remotely accessible. alex Rod Macpherson wrote: JBoss is binding my datasource just fine and my webapp works but trying to connect from a stand-alone client outside of the server fails: 14:25:52,704 INFO [FoobarDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=FoobarDS to JNDI name 'java:/FoobarDS' The datasource is FoobarDS and we lookup the string java:/FoobarDS and that works fine within our J2EE application. Only fails from a remote client (fabled option D did not work either:) TIA, Rod --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JNDI Name
Title: Message The java:/ context is only available within the same VM as the server. -- Danny Yates -Original Message-From: Rod Macpherson [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 00:12To: [EMAIL PROTECTED]Subject: [JBoss-user] JNDI Name JBoss is binding my datasource just fine and my webapp works but trying to connect from a stand-alone client outside of the server fails: 14:25:52,704 INFO [FoobarDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=FoobarDS to JNDI name 'java:/FoobarDS' The datasource is FoobarDS and we lookup the string java:/FoobarDS and that works fine within our J2EE application. Only fails from a remote client (fabled option D did not work either:) TIA, Rod _ Notice to recipient: The information in this internet e-mail and any attachments is confidential and may be privileged. It is intended solely for the addressee. If you are not the intended addressee please notify the sender immediately by telephone. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to external clients any opinions or advice contained in this internet e-mail are subject to the terms and conditions expressed in any applicable governing terms of business or client engagement letter issued by the pertinent Bank of America group entity. If this email originates from the U.K. please note that Bank of America, N.A., London Branch, Banc of America Securities Limited and Banc of America Futures Incorporated are regulated by the Financial Services Authority. _
Re: [JBoss-user] JNDI Name
Everything under 'java:/' is not remotely accessible. alex Rod Macpherson wrote: JBoss is binding my datasource just fine and my webapp works but trying to connect from a stand-alone client outside of the server fails: 14:25:52,704 INFO [FoobarDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=FoobarDS to JNDI name 'java:/FoobarDS' The datasource is FoobarDS and we lookup the string java:/FoobarDS and that works fine within our J2EE application. Only fails from a remote client (fabled option D did not work either:) TIA, Rod --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JNDI Name
Ah, light comes on. In any event, I specified FoobarDS and since JBoss plunked it down in java:/FoobarDS am I correct in assuming that direct access to datasources is not supported? Normally we use session beans and delegate database access through the session beans. In this case I wanted to cobble together a quick 'n dirty test app that used the datasource on a running instance of JBoss. Should I use the session façade in this case also or is there a way to get the datasource remotely? -Original Message- From: Alexey Loubyansky [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 4:37 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI Name Everything under 'java:/' is not remotely accessible. alex Rod Macpherson wrote: JBoss is binding my datasource just fine and my webapp works but trying to connect from a stand-alone client outside of the server fails: 14:25:52,704 INFO [FoobarDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=FoobarDS to JNDI name 'java:/FoobarDS' The datasource is FoobarDS and we lookup the string java:/FoobarDS and that works fine within our J2EE application. Only fails from a remote client (fabled option D did not work either:) TIA, Rod --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for datasource in JBoss2.4.4_Tomcat4.0.1 + MySQL
Thanks a lot. Danch. Now, I am using: ctx.lookup(java:/Customer) and change java:/DefaultDS to java:/Customer, my lookup code works fine. So I assumed if i change java:/Customer back to java:/DefaultDS, I also can lookup for java:/DefaultDS. I will try to use java:comp/env/jdbc/Custmoer and the old setting later. danch wrote: You're close! See comments inline below. -danch Christine wrote: Sorry for miscopy in my previous email! The code in my function is : javax.naming.Context ctx = new InitialContext(); DataSource dbs = (DataSource) ctx.lookup(jdbc/Customer); the name should be java:comp/env/jdbc/Customer. The 'java:comp/env' is the Environment Naming Context that the J2EE spec specifies that the container provide for all components. The res-ref-name of anything you list in an ejb-ref or a resource-ref gets put within that. Connection aConnection = dbs.getConnection(); Statement QStatment = aConnection.createStatement(); ResultSet Result = QStatment.executeQuery(select max(ID) from customer); And I specified the resource reference in both web.xml and jboss-web.xml as following: 1. web.xml resource-ref description The default DS /description res-ref-namejava:/DefaultDS/res-ref-name This is where you say 'jdbc/Customer' res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 2. jboss-web.xml jboss-web resource-ref res-ref-namejava:/DefaultDS/res-ref-name 'jdbc/Customer' again. res-typejavax.sql.DataSource/res-type jndi-namejdbc/Customer/jndi-name And that's where 'java:/DefaultDS' goes. /resource-ref /jboss-web 3. the JDBC part in jboss.jcml file is: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MySQLDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=URLjdbc:mysql://localhost/Customer/attribute attribute name=JDBCUserroot/attribute 4. the jaws.xml file is : jaws datasourcejava:/DefaultDS/datasource type-mappingmySQL/type-mapping Now, I am getting error: jdbc not bound. Would anyone tell me what mistakes I made? Any suggestion will be appreciated! Regards, -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for datasource in JBoss2.4.4_Tomcat4.0.1 + MySQL
You're close! See comments inline below. -danch Christine wrote: Sorry for miscopy in my previous email! The code in my function is : javax.naming.Context ctx = new InitialContext(); DataSource dbs = (DataSource) ctx.lookup(jdbc/Customer); the name should be java:comp/env/jdbc/Customer. The 'java:comp/env' is the Environment Naming Context that the J2EE spec specifies that the container provide for all components. The res-ref-name of anything you list in an ejb-ref or a resource-ref gets put within that. Connection aConnection = dbs.getConnection(); Statement QStatment = aConnection.createStatement(); ResultSet Result = QStatment.executeQuery(select max(ID) from customer); And I specified the resource reference in both web.xml and jboss-web.xml as following: 1. web.xml resource-ref description The default DS /description res-ref-namejava:/DefaultDS/res-ref-name This is where you say 'jdbc/Customer' res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 2. jboss-web.xml jboss-web resource-ref res-ref-namejava:/DefaultDS/res-ref-name 'jdbc/Customer' again. res-typejavax.sql.DataSource/res-type jndi-namejdbc/Customer/jndi-name And that's where 'java:/DefaultDS' goes. /resource-ref /jboss-web 3. the JDBC part in jboss.jcml file is: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MySQLDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=URLjdbc:mysql://localhost/Customer/attribute attribute name=JDBCUserroot/attribute 4. the jaws.xml file is : jaws datasourcejava:/DefaultDS/datasource type-mappingmySQL/type-mapping Now, I am getting error: jdbc not bound. Would anyone tell me what mistakes I made? Any suggestion will be appreciated! Regards, -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for datasource in JBoss2.4.4_Tomcat4.0.1 + MySQL
Why should jdbc/Customer be bound? if your code is in an ejb, you wouldn' link from web.xml or jboss-web.xml but the ejb counterparts. If its in a servlet, looks like you want to look up jdbc/MilosDataSource david jencks On 2002.03.01 18:44:41 -0500 Christine wrote: Hi, Since I didn't get any reply, I am using another approach now. I changed my Customer Entity Bean. I removed the findMaxID method and add a function which uses JDBC connect to Database directly and get the largest ID for that Customer table. But now, I am getting error to find connect to the database. The code in my function is : javax.naming.Context ctx = new InitialContext(); DataSource dbs = (DataSource) ctx.lookup(jdbc/Customer); Connection aConnection = dbs.getConnection(); Statement QStatment = aConnection.createStatement(); ResultSet Result = QStatment.executeQuery(select max(ID) from customer); And I specified the resource reference in both web.xml and jboss-web.xml as following: 1. web.xml resource-ref description The default DS /description res-ref-namejava:/DefaultDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 2. jboss-web.xml jboss-web resource-ref res-ref-namejava:/DefaultDS/res-ref-name res-typejavax.sql.DataSource/res-type jndi-namejdbc/MilosDataSource/jndi-name /resource-ref /jboss-web 3. the JDBC part in jboss.jcml file is: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MySQLDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=URLjdbc:mysql://localhost/Milos/attribute attribute name=JDBCUserroot/attribute 4. the jaws.xml file is : jaws datasourcejava:/DefaultDS/datasource type-mappingmySQL/type-mapping Now, I am getting error: jdbc not bound. Would anyone tell me what mistakes I made? Any suggestion will be appreciated! Regards, Hi, I have a finder method which use sub-select as following: findMaxIDWhereClause : ID IN (SELECT MAX(ID) FROM Customer) it works fine when I used IBM WebSphere and DB2. Now I am switching to JBoss + Tomcat + MySQL. Cause MySQL doesn't support sub-select. Does anyone know whether there is some other way to get my findMaxIDWhereClause work without have to change code? Thanks in advance! regards, -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for datasource in JBoss2.4.4_Tomcat4.0.1 + MySQL
I am sorry to confuse you by my mistake. I have a database in MySQL called Customer, which is specified in jboss.jcml. mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MySQLDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=URLjdbc:mysql://localhost/Customer/attribute Now, I wanted to use bind my database Customer to JNDI server with name jdbc/customer and then I can use JDBC connect to my database from my EJB code. So my question is how I should specify deploy descriptors to bind database Customer to JNDI server? David Jencks wrote: Why should jdbc/Customer be bound? if your code is in an ejb, you wouldn' link from web.xml or jboss-web.xml but the ejb counterparts. If its in a servlet, looks like you want to look up jdbc/MilosDataSource david jencks On 2002.03.01 18:44:41 -0500 Christine wrote: Hi, Since I didn't get any reply, I am using another approach now. I changed my Customer Entity Bean. I removed the findMaxID method and add a function which uses JDBC connect to Database directly and get the largest ID for that Customer table. But now, I am getting error to find connect to the database. The code in my function is : javax.naming.Context ctx = new InitialContext(); DataSource dbs = (DataSource) ctx.lookup(jdbc/Customer); Connection aConnection = dbs.getConnection(); Statement QStatment = aConnection.createStatement(); ResultSet Result = QStatment.executeQuery(select max(ID) from customer); And I specified the resource reference in both web.xml and jboss-web.xml as following: 1. web.xml resource-ref description The default DS /description res-ref-namejava:/DefaultDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 2. jboss-web.xml jboss-web resource-ref res-ref-namejava:/DefaultDS/res-ref-name res-typejavax.sql.DataSource/res-type jndi-namejdbc/MilosDataSource/jndi-name /resource-ref /jboss-web 3. the JDBC part in jboss.jcml file is: mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=MySQLDS attribute name=PoolNameDefaultDS/attribute attribute name=DataSourceClassorg.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl/attribute attribute name=URLjdbc:mysql://localhost/Milos/attribute attribute name=JDBCUserroot/attribute 4. the jaws.xml file is : jaws datasourcejava:/DefaultDS/datasource type-mappingmySQL/type-mapping Now, I am getting error: jdbc not bound. Would anyone tell me what mistakes I made? Any suggestion will be appreciated! Regards, Hi, I have a finder method which use sub-select as following: findMaxIDWhereClause : ID IN (SELECT MAX(ID) FROM Customer) it works fine when I used IBM WebSphere and DB2. Now I am switching to JBoss + Tomcat + MySQL. Cause MySQL doesn't support sub-select. Does anyone know whether there is some other way to get my findMaxIDWhereClause work without have to change code? Thanks in advance! regards, -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Jia (Christine) Li 524N ICT Building Department of Computer Science University of Calgary ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for J2eeDeployer?
Find it as an mbean, I don't think it is or should be in jndi. You can see how to do this from a client (from a server is almost the same, but simpler) in the (rabbithole) testsuite//test/JBossTestServices.java file. If you are doing this from a client, the Connector class may be in a different package in pre-rh jboss, but it does about the same stuff. david jencks On 2001.09.17 12:21:16 -0400 Frederick N. Brier wrote: What is the JNDI name for the J2eeDeployer? I want to do: String deployerName = ??? J2eeDeployer deployer = (J2eeDeployer)new InitialContext().lookup( deployerName ); What is deployerName supposed to be? In the JMX HTTP interface it is listed under the J2EE heading with a hyper link of service=J2eeDeployer. I haven't figured out the correlation between the web interface and the actual JNDI lookup names. What is the correlation? Thank you. Frederick N. Brier Sr. Software Engineer Multideck Corporation ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for J2eeDeployer?
So what you guys are saying is I should do this: MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).iterator().next(); J2eeDeployer deployer = (J2eeDeployer)server.getObjectInstance( service=J2eeDeployer ); Sorry about my misconception. I had based my understanding of JMX from looking at the Castor MBean CastorJDOImpl.java which on line 95 says: bind(new InitialContext(), java:/ + _jndiName, this); So, I didn't even look for an alternate directory mechanism as I thought JBoss was built on JMX which was built on JNDI which I thought JBoss used exclusively. I hadn't bothered to read the JMX specification and only skimmed the tutorials. Now I have done some additional research and have discovered the factory and server classes sigh. Why does the Castor MBean use JNDI. Do servlets not have access to the MBeanServerFactory static methods due to some class loader design decision? Thank you. Fred. At 01:58 PM 9/17/2001, you wrote: Find it as an mbean, I don't think it is or should be in jndi. You can see how to do this from a client (from a server is almost the same, but simpler) in the (rabbithole) testsuite//test/JBossTestServices.java file. If you are doing this from a client, the Connector class may be in a different package in pre-rh jboss, but it does about the same stuff. david jencks On 2001.09.17 12:21:16 -0400 Frederick N. Brier wrote: What is the JNDI name for the J2eeDeployer? I want to do: String deployerName = ??? J2eeDeployer deployer = (J2eeDeployer)new InitialContext().lookup( deployerName ); What is deployerName supposed to be? In the JMX HTTP interface it is listed under the J2EE heading with a hyper link of service=J2eeDeployer. I haven't figured out the correlation between the web interface and the actual JNDI lookup names. What is the correlation? Thank you. Frederick N. Brier Sr. Software Engineer Multideck Corporation ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for J2eeDeployer?
We'll, as Juha pointed out, there is nothing in the JMX spec either way regarding JNDI. The only reference to JNDI is in chapter 1 of the spec: Benefits of the JMX Architecture ... * Leverages existing standard Java technologies Whenever needed, the JMX specification will reference existing Java specifications such as Java Naming and Directory InterfaceT (JNDI), Java Database Connectivity API (JDBCT), Java Transaction Services (JTS), or others. However, how JMX leverages JNDI is never specified. There is nothing wrong with Castor exposing its MBean via JNDI, and although JBoss does make extensive use of JNDI, we do not expose our standard MBean interfaces via JNDI. So, yes, access the MBeanServer as you indicate if your in the VM, or using a remote connector if your outside of the VM. - Original Message - From: Frederick N. Brier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 5:10 PM Subject: Re: [JBoss-user] JNDI name for J2eeDeployer? So what you guys are saying is I should do this: MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).iterator().next(); J2eeDeployer deployer = (J2eeDeployer)server.getObjectInstance( service=J2eeDeployer ); Sorry about my misconception. I had based my understanding of JMX from looking at the Castor MBean CastorJDOImpl.java which on line 95 says: bind(new InitialContext(), java:/ + _jndiName, this); So, I didn't even look for an alternate directory mechanism as I thought JBoss was built on JMX which was built on JNDI which I thought JBoss used exclusively. I hadn't bothered to read the JMX specification and only skimmed the tutorials. Now I have done some additional research and have discovered the factory and server classes sigh. Why does the Castor MBean use JNDI. Do servlets not have access to the MBeanServerFactory static methods due to some class loader design decision? Thank you. Fred. At 01:58 PM 9/17/2001, you wrote: Find it as an mbean, I don't think it is or should be in jndi. You can see how to do this from a client (from a server is almost the same, but simpler) in the (rabbithole) testsuite//test/JBossTestServices.java file. If you are doing this from a client, the Connector class may be in a different package in pre-rh jboss, but it does about the same stuff. david jencks On 2001.09.17 12:21:16 -0400 Frederick N. Brier wrote: What is the JNDI name for the J2eeDeployer? I want to do: String deployerName = ??? J2eeDeployer deployer = (J2eeDeployer)new InitialContext().lookup( deployerName ); What is deployerName supposed to be? In the JMX HTTP interface it is listed under the J2EE heading with a hyper link of service=J2eeDeployer. I haven't figured out the correlation between the web interface and the actual JNDI lookup names. What is the correlation? Thank you. Frederick N. Brier Sr. Software Engineer Multideck Corporation ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for J2eeDeployer?
I haven't looked at the Castor stuff at all ever, but I suspect it uses jndi binding because jndi is a required part of an app server whereas jmx is not. This makes something using Castor not so jboss-specific. However... I think the hot deploy is pretty jboss specific. david jencks On 2001.09.17 20:10:47 -0400 Frederick N. Brier wrote: So what you guys are saying is I should do this: MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).iterator().next(); J2eeDeployer deployer = (J2eeDeployer)server.getObjectInstance( service=J2eeDeployer ); Sorry about my misconception. I had based my understanding of JMX from looking at the Castor MBean CastorJDOImpl.java which on line 95 says: bind(new InitialContext(), java:/ + _jndiName, this); So, I didn't even look for an alternate directory mechanism as I thought JBoss was built on JMX which was built on JNDI which I thought JBoss used exclusively. I hadn't bothered to read the JMX specification and only skimmed the tutorials. Now I have done some additional research and have discovered the factory and server classes sigh. Why does the Castor MBean use JNDI. Do servlets not have access to the MBeanServerFactory static methods due to some class loader design decision? Thank you. Fred. At 01:58 PM 9/17/2001, you wrote: Find it as an mbean, I don't think it is or should be in jndi. You can see how to do this from a client (from a server is almost the same, but simpler) in the (rabbithole) testsuite//test/JBossTestServices.java file. If you are doing this from a client, the Connector class may be in a different package in pre-rh jboss, but it does about the same stuff. david jencks On 2001.09.17 12:21:16 -0400 Frederick N. Brier wrote: What is the JNDI name for the J2eeDeployer? I want to do: String deployerName = ??? J2eeDeployer deployer = (J2eeDeployer)new InitialContext().lookup( deployerName ); What is deployerName supposed to be? In the JMX HTTP interface it is listed under the J2EE heading with a hyper link of service=J2eeDeployer. I haven't figured out the correlation between the web interface and the actual JNDI lookup names. What is the correlation? Thank you. Frederick N. Brier Sr. Software Engineer Multideck Corporation ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JNDI name bindings are not working properly on deployment
Exactly the same problem. do you get some news !! all my ejb are deployed with an old JNDI name, if I specified in jboss.xml a JNDI name, they are not deployed! Please help Gianni -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Selvarajah Vahees Sent: jeudi, 31. mai 2001 10:27 To: [EMAIL PROTECTED] Subject: [JBoss-user] JNDI name bindings are not working properly on deployment Hello folks, I have a few EJBs and I am trying to deploy it on a JBoss2.2 with embedded tomcat3.2.1. My deployment goes fine. But my JNDI name bindings are not getting place. It always puts one of my OLD bean JNDI on the Namespace. And also all my beans are getting that beans Namespace,which I feel that each individual beans should get their own. As a result only that OLD JNDI name under the +--invokers list. Basically JNDI name bindings are not working properly on deployment. So I am getting a NameNotfound Exception ---MyEJB(Not Bound) I tried the following 1..removing tmp/deploy dir itself 2.restarting the Mbean service for JNDI 3.restarting and deployments serveral time of the Server and last restarting the machine even. :-) Any idea what is really wrong? Thanks in advance R Vahees ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name bindings are not working properly on deployment
Show your ejb-jar.xml and jboss.xml deployment descriptors. - Original Message - From: Selvarajah Vahees [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 1:27 AM Subject: [JBoss-user] JNDI name bindings are not working properly on deployment Hello folks, I have a few EJBs and I am trying to deploy it on a JBoss2.2 with embedded tomcat3.2.1. My deployment goes fine. But my JNDI name bindings are not getting place. It always puts one of my OLD bean JNDI on the Namespace. And also all my beans are getting that beans Namespace,which I feel that each individual beans should get their own. As a result only that OLD JNDI name under the +--invokers list. Basically JNDI name bindings are not working properly on deployment. So I am getting a NameNotfound Exception ---MyEJB(Not Bound) I tried the following 1..removing tmp/deploy dir itself 2.restarting the Mbean service for JNDI 3.restarting and deployments serveral time of the Server and last restarting the machine even. :-) Any idea what is really wrong? Thanks in advance R Vahees ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JNDI name bindings are not working properly on deployment
Title: RE: [JBoss-user] JNDI name bindings are not working properly on deployment You are talking about the OLD bean jndi. If you mean you've deployed a jar and all the jndi bindings were correct, then you changed something and restarted, but the changes don't seem to have effect... Take a look in lib/ext - if you put the same jar there (for your mbean maybe because it needs client interfaces) - make sure that jar only has interfaces - no deployment descriptor and no bean implementation classes. Actually you should check your whole classpath for that and not only lib\ext. -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 1:41 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI name bindings are not working properly on deployment Show your ejb-jar.xml and jboss.xml deployment descriptors. - Original Message - From: Selvarajah Vahees [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 1:27 AM Subject: [JBoss-user] JNDI name bindings are not working properly on deployment Hello folks, I have a few EJBs and I am trying to deploy it on a JBoss2.2 with embedded tomcat3.2.1. My deployment goes fine. But my JNDI name bindings are not getting place. It always puts one of my OLD bean JNDI on the Namespace. And also all my beans are getting that beans Namespace,which I feel that each individual beans should get their own. As a result only that OLD JNDI name under the +--invokers list. Basically JNDI name bindings are not working properly on deployment. So I am getting a NameNotfound Exception ---MyEJB (Not Bound) I tried the following 1..removing tmp/deploy dir itself 2.restarting the Mbean service for JNDI 3.restarting and deployments serveral time of the Server and last restarting the machine even. :-) Any idea what is really wrong? Thanks in advance R Vahees ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name bindings are not working properly on deployment
Title: RE: [JBoss-user] JNDI name bindings are not working properly on deployment OK.fine that means if I am to make available my bean classes to my JSPs in embedded Tomcat, I have to make another jar file without DDs and put then in the classpath..right? ok..lemme try that vahees -Original Message-From: Marko Strukelj [EMAIL PROTECTED]To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]Date: Thursday, May 31, 2001 6:21 PMSubject: RE: [JBoss-user] JNDI name bindings are not working properly on deployment You are talking about the OLD bean jndi. If you mean you've deployed a jar and all the jndi bindings were correct, then you changed something and restarted, but the changes don't seem to have effect... Take a look in lib/ext - if you put the same jar there (for your mbean maybe because it needs client interfaces) - make sure that jar only has interfaces - no deployment descriptor and no bean implementation classes. Actually you should check your whole classpath for that and not only lib\ext. -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 1:41 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JNDI name bindings are not working properly on deploymentShow your ejb-jar.xml and jboss.xml deployment descriptors. - Original Message - From: Selvarajah Vahees [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 1:27 AM Subject: [JBoss-user] JNDI name bindings are not working properly on deployment Hello folks, I have a few EJBs and I am trying to deploy it on a JBoss2.2 with embedded tomcat3.2.1. My deployment goes fine. But my JNDI name bindings are not getting place. It always puts one of my OLD bean JNDI on the Namespace. And also all my beans are getting that beans Namespace,which I feel that each individual beans should get their own. As a result only that OLD JNDI name under the +--invokers list. Basically JNDI name bindings are not working properly on deployment. So I am getting a NameNotfound Exception ---MyEJB (Not Bound) I tried the following 1..removing tmp/deploy dir itself 2.restarting the Mbean service for JNDI 3.restarting and deployments serveral time of the Server and last restarting the machine even. :-) Any idea what is really wrong? Thanks in advance R Vahees ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI name for EJB from another EJB
Your not declaring an ejb-ref in your ejb-jar.xml descriptor as required: !-- EJB References (java:comp/env/ejb) -- ejb-ref ejb-ref-nameejb/Actors/ejb-ref-name ejb-ref-typeSession/ejb-ref-type ejb-linkActors/ejb-link homeActorsHome/home remoteActors/remote /ejb-ref - Original Message - From: "Fredrik lund" [EMAIL PROTECTED] To: "Jboss-User" [EMAIL PROTECTED] Sent: Monday, April 09, 2001 2:31 AM Subject: [JBoss-user] JNDI name for EJB from another EJB Hi, As I understand it, when calling an EJB from another EJB you should use java:comp/env/ejb/EJBNAME, but this doesn't work for me. I have one EnityBean called Actor and a SessionBean called ActorSB. From within the ActorSB I want to invoke Actor. When I use the non commented pease of code below, it works fine, but with the commented, and correct code, it doesn't work. //Object ref = jndiContext.lookup("java:comp/env/ejb/Actors"); Object ref = jndiContext.lookup("Actors"); ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user