Merge of method elements during project structure migration

During the project structure migration using the J2EE Migration Wizard, the method elements (that include security identity, container transaction, method permissions, access intent and isolation levels) of the same type for all the beans are merged to make them logically grouped.

A sample of the method elements before and after the project structure migration.

The following is a sample of the method permission in the source page of the deployment descriptor editor before project structure migration.

		<method-permission>
			<role-name>rol1</role-name>
			<role-name>rol2</role-name>
			<method>
				<ejb-name>TestBean1</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>getEJBMetaData</method-name>
				<method-params>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean1</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>getHomeHandle</method-name>
				<method-params>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Home</method-intf>
				<method-namae>remove</method-name>
				<method-params>
					<method-param>java.lang.Object</method-param>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>remove</method-name>
				<method-params>
					<method-param>javax.ejb.Handle</method-param>
				</method-params>
			</method>
		</method-permission>
		<method-permission>
			<role-name>rol1</role-name>
			<role-name>rol2</role-name>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Remote</method-intf>
				<method-name>isIdentical</method-name>
				<method-params>
					<method-param>javax.ejb.EJBObject</method-param>
				</method-params>
			</method>
		</method-permission>

The following is a sample of the method permission in the source page of the deployment descriptor editor after project structure migration.

		<method-permission>
			<role-name>rol1</role-name>
			<role-name>rol2</role-name>
			<method>
				<ejb-name>TestBean1</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>getEJBMetaData</method-name>
				<method-params>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean1</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>getHomeHandle</method-name>
				<method-params>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>remove</method-name>
				<method-params>
					<method-param>>java.lang.Object</method-param>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Home</method-intf>
				<method-name>remove</method-name>
				<method-params>
					<method-param>javax.ejb.Handle</method-param>
				</method-params>
			</method>
			<method>
				<ejb-name>TestBean2</ejb-name>
				<method-intf>Remote</method-intf>
				<method-name>isIdentical</method-name>
				<method-params>
					<method-param>javax.ejb.EJBObject</method-param>
				</method-params>
			</method>
		</method-permission>

Note: When the CMP 1.x to CMP 2.x bean migration is also selected along with the project structure migration in the J2EE Migration Wizard, the access intent and isolation levels are removed but everything else is merged during migration. The reason that access intents and isolation level are removed is that they are no longer valid due the changes in the extensions model. With the new model we have both access intents and isolation level defined in access intents and we have bean-level access intents and method-level access intents. It is always advised to use the bean-level access intents rather than the method-level access intents.

 

Related tasks

Migrating Enterprise JavaBeans projects (EJB 1.1 to EJB 2.x)

Converting projects from EJB 1.1 to EJB 2.x

Migrating code from EJB 1.1 to EJB 2.x

Migrating EJB references for EJB 1.1 relationships