留言板

using mvn build-service

Jamie Grant,修改在11 年前。

using mvn build-service

New Member 帖子: 7 加入日期: 12-10-25 最近的帖子
Hello,

I'm using the mvn build-service archetype to create a separate service-builder module which can be shared across all portlets.

All's working fine, and the process has created 2 sub-modules, a service-builder war and a service-builder.jar file.

I want to be able to use the services in other portlets, so I copied the service-builder.jar to the tomcat/lib/ext directory and everything works, but it's a bit of a pain stopping and starting the server everytime there's a change.

I tried copying the service-builder.jar to the liferay webapp/ROOT/WEB-INF/lib, and then setting the portal-dependency-jars property in the liferay-plugin-package.properties file to move the service-builder jar to each portlet, but when I do this I get classcastexceptions from my sevices which use custom queries. I'm following the same pattern as the other service model classes with the interface in the services-portlet-services.jar and the model impl class in the service-portlet.war.

I'm guessing this a classloader issue since the classes are of the same type. But looking into this in a bit more detail, seems my DTO's which hold the data from the custom query output don't do any of the magic that ClpSerialiser is doing to the other service-builder objects.

Just wondering if there is a formula for making this work? Or do I need to implement my own version of ClpSerialiser to handle the DTOs from my custom queries?

Liferay 6.1 CE + mvn2.2 + tomcat7

thanks!

-Jamie