cancel
Showing results for 
Search instead for 
Did you mean: 

how to develop your own lib

junwu
Active Contributor
0 Kudos

Hi Gurus,

I want to put some commonly used function into a lib which can be shared cross different project.

for example some utility class for jdbc operation.

what project should I create?

i tried to create a java project and then wrap it in a j2ee enterprise application.

when I test it, i got some class loader issue.

Best regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

p330068
Active Contributor
0 Kudos

Hi John,

Please have a look at below documents for creating external library DC project which you can use in different project.

[A bit of (impractical) scripting for Web Dynpro - Libraries & External|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2361] [original link is broken] [original link is broken] [original link is broken];

[Libraries & External Library DC|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4512] [original link is broken] [original link is broken] [original link is broken];

Hope it will helps you,

Regards

Arun

junwu
Active Contributor
0 Kudos

Hi Arun,

thanks for the reply, but it is not what I mean.

I know how to use external lib.

now what I am talking is how to develop a lib.

Best regards,

John

p330068
Active Contributor
0 Kudos

Hi John,

Please have a look at this thread :

Hope it helps

Regards

Arun

junwu
Active Contributor
0 Kudos

hi Arun,

it looks like I have to develop my lib first and export it as jar, then wrap it in a external dc project, finally put it in j2ee enterprise application DC for deployment,

I am using CE7.11.

thanks for the information.

Best regards,

John

p330068
Active Contributor
0 Kudos

Hi John,

Yes, exactly..

Cheers

Arun

former_member190457
Contributor
0 Kudos

Hi John,

to develop your own library you should do as follows:

create a java plain dc and add you dependencies to it, then develop your classes etc.

Define an assembly public part and add all you packages and classes to it, plus any resource you want exported.

Define a compilation public part in the same way, you will use it to compile your dependent DCs.

Create an ear DC which depends upon the assembly public part, and define this dependency as "bundled_lib" in the .dcdef editor. Build and deploy the ear.

Every DC which depends upon the lib must have a runtime dependency on the ear plus a build time dependency on the plain java dc.

This procedure is simpler because the lib is automatically packed in the ear and you can use NWDI as well.

Regards, Vincenzo

Answers (0)