-
1. Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
abuayyub Dec 25, 2006 10:51 AM (in response to priyavijayan1)goto the jboss admin via the web browser and check the name that the bean has bean placed under in the jndi tree. if you have deployed a jar in an ear, then the name may be preceded by the ear name in jndi. so check http://localhost:8080 and view the jmx entries for you bean.
-
2. Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
priyavijayan1 Dec 25, 2006 12:41 PM (in response to priyavijayan1)Thanks for your reply.. I have already done that, I went to the JNDI view and the bean is not there.When i checked the server log of jboss, it says ejb3 is not registered.
One more thing I noticed is that before installing EJB3, when i start the jboss it runs fine and the console doesn't show any error, but after installing jboss-EJB-3.0_RC9-FD, when i start the jboss the console shows a lot of exceptions saying mbeans are already registered.Am i doing something wrong?? I am deploying it on the default server of jboss... is it something to do with jboss installation?? Please reply. -
3. Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
abuayyub Dec 25, 2006 3:52 PM (in response to priyavijayan1)This does look like an instalation problem. did you install jboss using the installer. If not then i think you have to look at the jboss wiki on how to migrate from ejb3 RC8 to RC9. there are some differences you need to take into acount. I think ejb 3.0 RC9 is part of the 4.0.5 the latest jboss version.
http://wiki.jboss.org/wiki/Wiki.jsp?page=FromRC8RC9
http://docs.jboss.org/ejb3/
regards abuayyub -
4. Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
palam Dec 27, 2006 11:56 PM (in response to priyavijayan1)I am using 4.0.5 the latest jboss version but still facing same problem please help me out
-
5. Re: help required for JBOSS 4.0.4 GA and EJB 3.0 RC9
priyavijayan1 Dec 28, 2006 4:21 AM (in response to priyavijayan1)I got it resolved. I am pasting the code over here
package com.infosys.EJB3.application;
import com.infosys.EJB3.application.FacadeRemote;
import com.infosys.EJB3.application.FacadeBean;
import javax.naming.InitialContext;
import java.sql.Timestamp;
import java.util.Properties;
public class client
{
public static void main(String[] args)
{
try
{
Properties p = new Properties();
p.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
p.setProperty("java.naming.provider.url","localhost:1099");
InitialContext ctx = new InitialContext(p);
System.out.println("Got initial COntext "+ctx.lookup("FacadeBean/remote"));
FacadeRemote lFacadeRemote = (FacadeRemote) ctx.lookup("FacadeBean/remote");
System.out.println("Got Facade Remote Bean");
// Added
lFacadeRemote.checkUserCredential("rama", "ramaxyz");
System.out.println("user checked");
// end
//lFacadeRemote.createDepartment("Marketing");
/*lFacadeRemote.createDepartment("Administration");
lFacadeRemote.createDepartment("Sales");*/
/*lFacadeRemote.assignEmployeeToDepartment(new Long(1),"Brijesh",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(1),"xxxx",31,"M");
lFacadeRemote.assignEmployeeToDepartment(new Long(2),"yyyy",31,"M");*/
System.out.println("DONE");
}
catch(Exception ex)
{
System.out.println(ex);
ex.printStackTrace();
}
}
}
------------------------------------------------------------------
The change that I have made is adding the properties instance. I have another file in my directory called jndi.properties, but I still had to put it inside my code. I am not sure why I need to do it since I already have jndi.properties.... anyways its working fine..
Thanks for the reply..