How can I access remote EJB in Jboss AS 7? When I deploy application on Jboss AS 7 , I can see portable jndi names but unable to access using same name.
Will be implemented in JBoss AS 7.1: https://issues.jboss.org/browse/AS7-1338
Make sure your ejb module has the same class loader with the module which needs the access of EJB.
and then, use these code
InitialContext ic = new InitialContext();
ic.lookup(*the jndi name you see*);
Doesn't this work if you start as -server-config standalone-preview.xml ?
Since this turns on the rest of the JavaEE6 (not certified though). I'm talking about the Jboss 7.0.2 (Everything).
Good luck!
I solved with latest release of JBoss 7.1
Related
In one of our java code we are performing a look up in WebLogic 12.2.1.3 version.
ctx.lookup("weblogic.management.server");
Apparently we received an exception NamingNotFoundException due to the JNDI name is not available in WebLogic 12.2.1.3 version , where as it is available in 12.1.3.
We also tried using foreign JNDI name feature but it doesn't resolve the problem.
Could you please provide us any suggestions or alternatives on this?
The MBean interface has been removed on WebLogic 12.2.1, then, this jndi context is no longer available. You should review your code and use another way to get your connection to the jmx server.
How can i configure mongodb via jndi in JBOSS versions 4/5/6??
for example we can configure JNDI related propeties in Context.xml of tomcat i would like to know where can it be done in JBOSS. I am new to JBoss.
Sorry for the bad english.
Thanks in advance
I'm trying to connect the JPA (EclipsLink implementation) used on my application to JBoss DS, but don't know how to do it.
The application that I'm working is a OSGi Based application runing on a Equinox container that runs as a servlet on a JBoss WAR file.
How can I configure my application so that it connects the JBoss DS?
Sounds pretty complicated. What have you tried, and what error are you getting?
Normally you just set the datasource in the JPA persistence.xml, does that work?
I'm working with JBossAS7.
My application has some OSGI modules and big non-OSGI part.
I tried lookup osgi services in non-osgi subsystem through JNDI but they are not present in JNDI context.
I found similar problem at JBOSS 7 - Osgi Bundles not present in JNDI TREE but I dont found any solution there. If JBoss team didn't implement this functionality yet, how can I resolve this problem now?
I tried adding my service to JNDI context manually but got an exception because JNDI context is read only(according to https://issues.jboss.org/browse/AS7-421)
It's not fully integrated yet (monitor JBOSGI-81 to check the status), however I think you can make this work by taking the Apache Aries JNDI OSGi bundles and deploying them in JBoss AS7.
To do this, deploy and start
The Aries JNDI bundle
The Aries Proxy bundle
The Aries Util bundle
The JNDI bundle will complain that it can't set some statics with the NamingManager, but you can ignore that as AS7 JNDI takes care of that.
With the bundles above installed you should be able to do
osgi:service/org.foo.SomeInterface
and
osgi:servicelist
type lookups... E.g. you could try the following to look up the Start Level Service which is registered by the framework:
osgi:service/org.osgi.service.startlevel.StartLevel
I just tried it with AS7 7.1.2 and it works for me...
One thing to note, if the entity you're looking up implements an interface defined in another AS7/MSC module or OSGi bundle, you need to ensure that the consumer has visibility to it if you want to be able to cast to this interface. In the OSGi world you can just import the package, but in an AS7 module (e.g. a war file) you can achieve this by adding a Dependencies manifest header.
Seam 2.1 and JBoss 4.2.2
I have set up the first App to have the EJB in the EAR with a local interface.
the 2nd app can look up JDNI name "ear-name/ejbname/local" but fails with "NoClassDefFound".
Does the EJB .jar need to be outside of the EAR?
Is this a classloader visibility issue or Is this a JBoss version issue? or something else?
Thank you for your thoughts..
I cannot answer if it will work or not. However, I can tell you how we do this.
We have created a #Webservice component that uses this EJB. And then we connect to the Webservice from our other application.
I blogged about this a while back. You can have a read if you are interested.