Commit 6f84deda authored by santiagoperaza93's avatar santiagoperaza93

prueba mongo

parent 5caf6928
......@@ -7,9 +7,9 @@ import static com.mongodb.client.model.Updates.set;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.bson.Document;
import org.bson.conversions.Bson;
......@@ -35,7 +35,7 @@ import logica.MongoClientProvider;
@LocalBean
public class CategoriaEJB implements CategoriaEJBLocal {
@EJB
@Inject
MongoClientProvider mongoClientProvider;
MongoClient mongoClientNube = mongoClientProvider.getMongoClient();
......
......@@ -3,9 +3,9 @@ package beans;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.bson.Document;
......@@ -30,9 +30,9 @@ import logica.MongoClientProvider;
@LocalBean
public class NotificacionEJB implements NotificacionEJBLocal {
@EJB
@Inject
MongoClientProvider mongoClientProvider;
MongoClient mongoClientNube = mongoClientProvider.getMongoClient();
//MongoClient mongoClientNube = new MongoClient(new MongoClientURI("mongodb://proyecto:proyecto.20@mongodb/proyectoBDMongo"));
......
......@@ -12,6 +12,7 @@ import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.bson.Document;
import org.bson.conversions.Bson;
......@@ -48,7 +49,7 @@ public class PartidaEJB implements PartidaEJBLocal {
@EJB
PreguntasEJB preguntas;
@EJB
@Inject
MongoClientProvider mongoClientProvider;
MongoClient mongoClientNube = mongoClientProvider.getMongoClient();
......
......@@ -11,6 +11,7 @@ import java.util.Random;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.inject.Inject;
import org.bson.Document;
import org.bson.conversions.Bson;
......@@ -37,7 +38,7 @@ public class PreguntasEJB implements PreguntasEJBLocal{
@EJB
private CategoriaEJB categorias;
@EJB
@Inject
MongoClientProvider mongoClientProvider;
MongoClient mongoClientNube = mongoClientProvider.getMongoClient();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment