How to configure mongodb via jndi in Jboss 4/5/6 versions? - mongodb

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

Related

Which Application Server is used by Quarkus Internally?

Like Spring Boot uses Apache Tomcat, Undertow and Jetty and i have worked on an assignment of same. So just trying to map understanding.
What application server is used by Quarkus?
I have created an application in server and found Jboss libaries, Arjuna Libraries for transaction
which is used by Jboss servers or wildfly servers. But i am not sure whether it is based on Jboss.
Can anyone please clarify?
In short, Quarkus can be thought of as its own application server. However, it is comprised of many open source libraries that have been around for a while, such as:
RESTEasy for JAX-RS
Undertow for the Servlet/Websocket engine
Netty for the network IO layer
Hibernate for JPA
The full set of extensions can be found on the Quarkus Starter website.

JNDI name weblogic.management.server is not available in WebLogic 12.2.1.3

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.

JBoss 4.0.5 + Equinox + JPA + EclipseLink

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?

Can't lookup OSGI services through JNDI

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.

JNDI lookup JBoss Application Server 7

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