You can find using an MBean, here is the sample code..
MBeanFactory mf = AdminServiceFactory.getMBeanFactory();
MBeanServer server = mf.getMBeanServer();
ObjectName obj = new ObjectName("WebSphere:type=StatelessSessionBean,*");
Set mbeans = server.queryMBeans(obj, null);
if(mbeans!=null ) {
Iterator itr = mbeans.iterator();
while(itr.hasNext()) {
ObjectInstance objInstance = (ObjectInstance) itr.next();
if(objInstance!=null && objInstance.getObjectName()!=null) {
String beanName = objInstance.getObjectName().getKeyProperty("name");
System.out.println(beanName);
}
}
}