• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 1.1 Migration from WebLogic 5 to WebLogic 10

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we have some Stateless EJBs ( EJB 1.1) deployed on WebLogic 5.1.
Now we want to migrate to WebLogic 10.
WebLogic 10 supports EJB 3.0 specification.
So I was expecting few changes while deploying these EJB's on WL 10.
But to my surprise these EJB's developed with EJB 1.1 specification got deployed on WL 10 without any problem.

So does that mean WL 10 supports EJB 1.1 without any alterations.
Any special care that I should take?
 
Jamir Shaikh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The porting of EJB from Weblogic 5 to weblogic 10 is still in progress.
Following are the points I observed till now:
1. In WebLogic 5 there used to be a file called as weblogic.properties.
This file contained the various attributes specific to weblogic.
Now it has been replaced by config.xml.
So in order to port your application one should port weblogic.properties to config.xml
(Note that config.xml should not be modified manually use the weblogic console as far as possible)
2. EJB 1.1 is supported by Weblogic 10, so need dont worry about changing the code.
Note: I am not sure about EJB 1.2.
3. Looks like prior to Weblogic 6 there was no concept of domains, which is present in all the later versions.
4. In WebLogic 5 one can have a documentRoot (in weblogic.properties ) which acts as the Root application.
To port this you must have a web.xml file in your web application and to make it the default application
specify "context-root" as "/" ( present in application.xml)
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB1.1 migrate to weblogic 10 from 8
lease help me out here..
Failed to parse descriptor at 'META-INF/weblogic-ejb-jar.xml' for module 'PAMaintenanceBean.jar': javax.xml.stream.XMLStreamException: weblogic.xml.process.SAXValidationException: Could not locate bean with ejb-name "PAMaintenance" in ejb-jar.xml

ejb-jar.xml
==========

<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>PAMaintenance</ejb-name>
<home>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceHome</home>
<remote>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</remote>
<ejb-class>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>PAMaintenance</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>



<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>PAFeatures</ejb-name>
<home>com.bear.coreapps.pa.ejb.features.PAFeaturesHome</home>
<remote>com.bear.coreapps.pa.ejb.features.PAFeatures</remote>
<ejb-class>com.bear.coreapps.pa.ejb.features.PAFeaturesBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>myString</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>anything at all</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>PAFeatures</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>




weblogic-ejb-jar.xml
===============

<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>PAMaintenance</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</caching-descriptor>
<enable-call-by-reference>false</enable-call-by-reference>
<jndi-name>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>



<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>PAFeatures</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</caching-descriptor>
<jndi-name>statelessSession.PAFeaturesHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>



my web.xml
========


<ejb-ref>
<ejb-ref-name>PAFeatures</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.bear.coreapps.pa.ejb.features.PAFeaturesHome</home>
<remote>com.bear.coreapps.pa.ejb.features.PAFeatures</remote>
<ejb-link>../PAFeaturesBean.jar#PAFeatures</ejb-link>
</ejb-ref>


<ejb-ref>
<ejb-ref-name>PAMaintenance</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.bear.coreapps.pa.ejb.maintenance.PAMaintenanceHome</home>
<remote>com.bear.coreapps.pa.ejb.maintenance.PAMaintenance</remote>
<ejb-link>../PAMaintenanceBean.jar#PAMaintenance</ejb-link>
</ejb-ref>

Application.xml
===========
<module>
<ejb>PAFeaturesBean.jar</ejb>
</module>
<module>
<ejb>PAMaintenanceBean.jar</ejb>
</module>


config.xml
===========
<app-deployment>
<name>emsApp</name>
<target>mngCTK_dbctkapp01</target>
<module-type>ear</module-type>
<source-path>applications/emsApp</source-path>
<sub-deployment>
<name>/</name>
<target>mngCTK_dbctkapp01</target>
</sub-deployment>
<sub-deployment>
<name>PAMaintenanceBean.jar</name>
<target>mngCTK_dbctkapp01</target>
</sub-deployment>
<sub-deployment>
<name>PAFeaturesBean.jar</name>
<target>mngCTK_dbctkapp01</target>
</sub-deployment>
<security-dd-model>DDOnly</security-dd-model>
<staging-mode>nostage</staging-mode>
</app-deployment>
 
Jamir Shaikh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jimmy,

I am also facing the same issue.
Its a bit strange issue.
I need not explain the problem again.

Following are two solutions:
1. Do not create an EAR. Creating an ear gives problem.
Deploy these two EJB's as independent EJB's ,
Those would be successfully deployed.

2. Create only one EJB module.
And in that module in ejb-jar.xml and in weblogic-ejb-jar.xml
mention the entries for both the EJB's.
So the result would be you will have only one ejb module defined
<ejb>BOTH_THE_EJBS</ejb>

And the entries would be mentioned in the ejb-jar.xml and in weblogic-ejb-jar.xml.

This should solve your problem.

The problem is some how weblogic is not able to deploy more than one EJB's from an EAR.
If you deploy only one EJB it works fine.
But when you deploy the second one it tries to search for the entries in the ejb-jar.xml and in weblogic-ejb-jar.xml
of the first EJB.

Hope this helps.

Do reply if you find a a better solution.




reply
    Bookmark Topic Watch Topic
  • New Topic