Hi, Sir,
Thanks for providing this useful information. I have the multiple jar files
that are categorized by the business modules. Each jar file contains a
persistence.xml, the Entity beans, and the DAO classes. We have a logic
domain DAO that needs to use DAOs defined in different jar files to retrieve
the data from the same database.
Here is my pseudo code of the classes that are included in one of the jar
files,
// JPA Entity that is created from a DB Customer table
@Entity
Public class Customer
{
}
// DAO that provides the method to access db table via Customer entity
Public class CustomerDao
{
EntityManager entityManager;
….
}
// service initializer
public class CustomerDaoInitializer {
@Inject
CustomerDaoInitializer(PersistService service)
{
service.start();
}
}
I am trying to follow the steps you have given to create the persist module
as shown below, but I don’t know how to define the annotation class for my
persistence unit.
public class CustomerDaoModule extends PrivateModule
{
@Override
protected void configure()
{
install(new JpaPersistModule("rvng-customer"));
bind(CustomerDao.class).annotatedWith(??
.class).to(CustomerDao.class);
expose(CustomerDao.class).annotatedWith(??.class);
bind(CustomerDaoInitialize.class).annotatedWith(??
.class).to(CustomerDaoInitialize.class);
expose(CustomerDaoInitialize.class).annotatedWith(??
.class);
}
}
Could you please tell me how do you define your DbOnePU.java? Any
information is really appreciated.
Thanks for the help,
Alice
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/UmZwSmltYU8zT29K.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.