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?
Related
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.
I have been able to create Restful web services with JAX-RS for Tomcat. Using the Netbeans Restful web service from patterns wizard.
But I am not able to create Restfull web servicer from database with Netbeans wizard.
It miss some libraries. I add openJPA and Java EE web api 6 (over the added by the wizard). But it continues not working.
I added javaEE-TomEE 8.0 but did not work, either!
Does anybody know what have I to add to Tomcat to get JPA-Database Restful service working?
Moving to GlassFish is not an answer valid... I want to keep on Tomcat (adding the minimal)
I have made some advances...
With EclipseLink(JPA 2.0) I was able to connect MySQL in a desktop application...
Then I switched to Apache OpenJPA and I was no able to get an EntityManagerFactory...
So it seems I choose a library incomplete...
I imagine, in Tomcat, I have to choose other library than OpenJPA.
This question already has answers here:
How to deploy EJB based application on Tomcat
(4 answers)
Closed 6 years ago.
I created a simple project JAVA EE with GlassFish to implement a simple REST API. During this project, I created a jdbc pool connection (with the glassfish interface) with postgresql and use EJB and Jersey to store my data in the database. There is no problem but now I would like to do the same with Tomcat to deploy on bluemix but I don't really understand...
I created a web project dynamic with tomcat 8.5 on Eclipse, created a simple jsp file to test and deploy it on bluemix, that works ! But now I would like to connect a database to my tomcat application like before, I googled it but I don't understand if it is possible and how to do this...
Anybody can help me please ?
Thank in advance :)
You cannot deploy EJBs in Tomcat because it only implements the servlet and JSP specifications from Java EE.
You can use TomEE which is a full EE stack based on Tomcat but includes OpenEJB, OpenJpa etc. In their site you can find how to deploy TomEE as a war in a plain Tomcat in case that you want to use your existing Tomcat installation. Check the links below
TomEE Home
TomEE deployement as war
TomEE Datasource configuration
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.
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