it seems jboss AS 7.1 supports ejb 2.1.Our ejb 2.1 based application is deployed on jboss 5 AS. We are migrating it to jboss7.1. but i want to know what are the additional configurations required to run ejb 2.1 without any errors?
EJB2 is still supported in AS7.x, the issue might be that AS7 is a new implementation and some of the tuning options and configuations are not available for AS7 - especially the EntityBean CMP.
There are some added for EAP6 (based on AS7) you might download the unsupported version.
Wildfly (the successor of JBossAS) will not continue to support EJB2 EntityBeans because EJB3.2 declare it as optional.
Note EJB2 session beans are still supported but I recommend to upgrade it to EJB3 this should faily simple.
You might keep the EJB2 interfaces to provide an interface for EJB2 clients, but I expect effort for the client as well as the lookup Strings changed.
If the appliation should be kept for the future I would recommend to migrate to EJB3
Related
I'm using WebSphere 9.0.5.3 and after migrating CXF-core lib from 3.1.x to 3.2.x I'm facing this problem :
AbstractJAXRS E No resource classes found
with CXF 3.1.x everything works fine my server is working and my rest services are working as well.
ps1: I have already disabled JAXRSEngine of WebSphere and working with my own libraries ( in the shared isolated package ) and as I said it was working fine with the previous version
ps2: I have already modified the class loader policy ( Multiple -
single )
with some debugging, I figured out that WebSphere is not even loading my classes ( annotated with #path)
ps3: have already upgraded jaxrs-ws-rs to 2.1.1 because CXF 3.2.x
supports JAX-RS latest 2.1 spec even though this spec is backward
compatible with jaxrs 2.0
and i have already upgraded also all the CXF JAXRS related jars and still have
the same problem
PS4: my application is working fine with tomcat 8 and Wildfly/JBoss so
i don't think i have a problem with my resources classes
PS5: in the same jar, the other classes are loaded so WebSphere is filtering the resources classes and not loading them
the main problem here is why websphere is not loading my resouruce classes i have just upgraded the jar and I kept the old configurations ?
The IBM WebSphere Application Server does not provide direct support for JAXRS 2.1. However, what you are attempting may still be possible. Beyond setting the "com.ibm.websphere.jaxrs.server.DisableIBMJAXRS20Engine" property to "true" you should also set the JAXRS provider to "2.0 spec" via the command prompt or administrative console, see the following for details: https://www.ibm.com/support/knowledgecenter/SSEQTP_9.0.5/com.ibm.websphere.base.doc/ae/rwbs_jaxrs_coexist.html
Beyond this, if you need the JAX-RS 2.1 APIs, then you will need to package the APIs with your application. You might also need to use parent-last classloading or package them in an isolated shared library associated with your application. Either approach poses some classloading risk.
I’m working on a migration project that woul change WebLogic application server soon to be off support to Wildfly 10.0.0.Final, the problem I’m facing is that the project was built with ejb 2.1 and I don’t know wether Wildfly 10.0.0 would be compatible or not ?
Thanks in advance
Your migration will be relatively easy unless your application makes use of CMP entity beans.
If you have more than around 3 or 4 of these then migration will get tricky as you would need to migrate the CMP beans to JPA.
Otherwise, most changes will revolve around moving to Java EE standard JNDI names
I know its a very high level question, but it will be very much help full if somebody can help me to kick start the migration.
So please provide some links or use full hints to start with it.
Also if somebody knows about delta changes between JBOSS AS 6 to Wild fly.
Major change which i know that our application uses-
JBOSS AOP
JBOSS Interceptors
and binds it in jboss-aop.xml
like below
<bind pointcut="execution(public * *.DBDAO >updateBO(com.test.model.TestClass, com.test.model.TestClass2))">
<interceptor-ref name="TestInterceptor"/>
</bind>
which is not supported by wild fly now.
And so there must be other thing s which might not be supported by wild fly.
Thanks.
According documentation:
Replace JBoss AOP Interceptors
JBoss AOP (Aspect Oriented Programming) is no longer included in JBoss AS 7. In previous releases, JBoss AOP was used by the EJB container. However, in AS 7, the EJB container uses a new mechanism. If your application uses JBoss AOP, you need modify your application code as follows.
Standard EJB3 configurations that were made in the ejb3-interceptors-aop.xml file are now done in the server configuration file. For a standalone server, this is the standalone/configuration/standalone.xml file. If you are running your server in a managed domain, this is the domain/configuration/domain.xml file.
Applications that integrate AOP interceptors into the EJB layer must be redesigned to use EJB3 interceptors and CDI. Server side interceptors can be changed to EJB3 interceptors, but there is no client side interceptor in AS 7.
Like AOP exist other changes you can see in: How do I migrate my application from AS5 or AS6 to WildFly and Experiences with migrating from JBoss AS 7 to WildFly 8.1
The last link refers to some changes that are not in the official documentation.
Here is whole migration guide from Red Hat. JBoss EAP 6.2 has similar architecture to WildFly so you can use it:
https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.2/html-single/Migration_Guide/index.html
Had anybody attempted to use MyBatis as their persistence library for a JBoss 7.1 /Java EE6 application?
I'm wondering what are the best approaches to handling connections, transations, rollbacks etc?
How about CDI support? Looking around online it seems at this time MyBatis only supports two Dependency Injection (JSR-330) frameworks, Google Guice and Spring. I did run into CDI Extensions which may be something look into.
My idea would be to have the container handle all of the above however it may be difficult getting to that point.
Any tips, hints, experiences?
There is a new mybatis-cdi module. It is not released yet, but you can try the snapshot, it is at github: https://github.com/mybatis/cdi
There is no CDI support at all but as you said, if you want DI go Spring or Guice.
With JBoss you have mainly two chances:
- EJB 3
- Spring
If using EJB 3 transactions are handled automatically by them. MyBatis just ignores transactions and lets the container commit/rollback.
When using Spring, MyBatis ties to Spring transactions using the integration module MyBatis-Spring.
I would create my own CDI bean - use #Produces for a factory, and #Inject to get the session.
Here is old iBatis Spring factory, that might be the producer, after some changes:
SqlMapClientFactoryBean
At http://www.java2s.com/Code/Java/EJB3/EJBtutorialfromJBossAsynchronouscall.htm
i've found an example showing how to call ejb methods in asynchronous fashion. Do you use asynchronous proxy in EJB 3.0 on Jboss AS and does it work as it should?
It depends on the version. The latest version of the jboss ejb jars do NOT work per the linked example.
See: http://www.mastertheboss.com/en/jboss-server/219-ejb-31-tutorial.html
http://javahowto.blogspot.com/2010/03/simple-asynchronous-methods-in-ejb-31.html