Reputation: 315
i'm working on a project, where i have to decide to use EJB, Webservices or EJB with @WebService
in a combined way. I'm new to Java EE and i like the concept of EJBs, but i want also provide a way for non-java-systems to use this service. Here are the facts about the major components:
The plan was to implement all these components in EJBs, but the point with the native library is confusing me. So my question is now:
Another option would be to put everything in one single WebService. But i would not like this approach, because of the transactional an pooling advantages in EJB and the restricted expandability. So i would be greatful, if you can give me your opinion, how you would implement this project.
Upvotes: 1
Views: 158
Reputation: 1273
This is my suggestion but I'm also beginner for JavaEE so there might be another way to do.
You need to first established
Parent POM by using Maven inside Parent POM project, put all your dependency then create a modules like
parent-project[pom]:
project-name-data.jar
project-name-services.jar
project-name-webservice.war
project-name-ui.war
by this way, You can use all your shared library on your application.
How should i implement the components with all the database stuff? (I would use EJB, because of the Pooling and the transaction stuff)
It will be done in project-name-data.jar and implement on project-name-services.jar
How should i implement the component(s), which are using the native library through JNI, but also have to interact with the database? (Jax-WS WebService, EJB declared as JAX-WS service?
It will be implement in project-name-webservice.war by adding JAX-WS service, project-name-services.jar dependency.
In Your project-name-ui.war add dependency of project-name-webservice.war to run your application fine.
If you not clear about this, then click here. it's my personal tryout which use EJB, Jax-RS and other libraries. Hope it will help you.
Upvotes: 1