Circular dependencies in IDempiere

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a)red1.org with your username in the subject title to get me to activate you.

Circular dependencies in IDempiere

Postby chen_xueqian » Wed May 16, 2012 11:13 am

Hi,
I want to put user defined models (such as I_Xx, X_Xx, MXx) into a new user bundle, such as “org.compiere.model.user”, separated from the original “org.adempiere.base" bundle and "org.compiere.model”. The result is, “org.adempiere.base” and “org.compiere.model.user” should dependent each other. So it caused circular dependencies, Eclipse cannot build. What would you suggest to handle this situation in IDempiere environment.

Thanks
chen_xueqian
 
Posts: 9
Joined: Fri Mar 18, 2011 11:02 am

Re: Circular dependencies in IDempiere

Postby kenlongnan » Wed May 16, 2012 3:56 pm

Hello Xueqian,

Try to use 'Fragment-Host' to inject your class into base bundle. It is not good idea I think, but it should be working.

The proper way as I know is to use Extension-Point.
http://kenai.com/projects/hengsin/pages ... tReference

You need to implement your own ModelFactory for your model bundle.

I am not 100% sure for this. Waiting for a real working example.

Just my 0.02$,

BR,

Ken
kenlongnan
 
Posts: 13
Joined: Fri Jun 10, 2011 9:24 pm

Re: Circular dependencies in IDempiere

Postby chen_xueqian » Fri May 18, 2012 12:45 pm

1. Open Eclipse
2.Create a new osgi framework bundle something like ‘org.adempiere.model.user’,then creat a package named ‘org.compiere.model’,the package name must be the same as the Original model package.
3.Add dependency 'org.adempiere.base' in your bundle.
4.Put your user defined models(I_Xxxx,X_Xxxx,MXxxx) into package ‘org.compiere.model’ of your bundle,like ‘org.adempiere.model.user’ .
5.Navigate to Run > Run Configurations > Eclipse Application >Plug-ins,tick your bundle,and click run.

It's OK now.
chen_xueqian
 
Posts: 9
Joined: Fri Mar 18, 2011 11:02 am


Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 2 guests

cron