Re: [Carbon-dev] Including a third part library

2012-02-15 Thread Sameera Jayasoma
On Wed, Feb 15, 2012 at 12:48 PM, Maninda Edirisooriya mani...@wso2.comwrote:

 Actually there are several Java files require for the library.
 com.maxmind.geoip is used as the package name. Is it ok to change it as
 org.wso2.carbon.utils.geoip ? (Library is LGPL)

 Another problem I have is that the library needs the path of the database
 file as a path from the root. But with our OSGI bundles we found that the
 file can only be referred as an InputStream using getResourceAsStream
 function but not as a path from the root. In this case also we have to edit
 the library file to provide the file as an InputStream. Is it ok? or is
 there any workaround?


Does this file is inside the OSGi bundle?

Thanks,
Sameera.


 On Wed, Feb 8, 2012 at 2:15 PM, Afkham Azeez az...@wso2.com wrote:

 How about adding that file to org.wso2.carbon.util jar with the proper
 attributions?

 On Wed, Feb 8, 2012 at 2:06 PM, Maninda Edirisooriya mani...@wso2.comwrote:

 I have to include a third party Java library with LGPL licences to
 convert IP addresses to geographical locations in the BAM2. It is only
 source a code file. (.java file) I have no idea where to add it.

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev



 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




-- 
Sameera Jayasoma
Technical Lead and Product Manager, WSO2 Carbon

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://tech.jayasoma.org

Lean . Enterprise . Middleware
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Including a third part library

2012-02-15 Thread Maninda Edirisooriya
Yes. It is included as a resource to utils. i.e.
core/org.wso2.carbon.utils/3.2.4/src/main/resources/GeoIP.dat

On Wed, Feb 15, 2012 at 10:52 PM, Sameera Jayasoma same...@wso2.com wrote:



 On Wed, Feb 15, 2012 at 12:48 PM, Maninda Edirisooriya 
 mani...@wso2.comwrote:

 Actually there are several Java files require for the library.
 com.maxmind.geoip is used as the package name. Is it ok to change it as
 org.wso2.carbon.utils.geoip ? (Library is LGPL)

 Another problem I have is that the library needs the path of the database
 file as a path from the root. But with our OSGI bundles we found that the
 file can only be referred as an InputStream using getResourceAsStream
 function but not as a path from the root. In this case also we have to edit
 the library file to provide the file as an InputStream. Is it ok? or is
 there any workaround?


 Does this file is inside the OSGi bundle?

 Thanks,
 Sameera.


 On Wed, Feb 8, 2012 at 2:15 PM, Afkham Azeez az...@wso2.com wrote:

 How about adding that file to org.wso2.carbon.util jar with the proper
 attributions?

 On Wed, Feb 8, 2012 at 2:06 PM, Maninda Edirisooriya 
 mani...@wso2.comwrote:

 I have to include a third party Java library with LGPL licences to
 convert IP addresses to geographical locations in the BAM2. It is only
 source a code file. (.java file) I have no idea where to add it.

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev



 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 Sameera Jayasoma
 Technical Lead and Product Manager, WSO2 Carbon

 WSO2, Inc. (http://wso2.com)
 email: same...@wso2.com
 blog: http://tech.jayasoma.org


 Lean . Enterprise . Middleware

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Including a third part library

2012-02-15 Thread Sameera Jayasoma
Hi Maninda,

I had a  look at this geoip jar[1] . Its a very small jar with few java
classes. Can't we simply create an orbit bundle out of this jar and use it?

On Thu, Feb 16, 2012 at 10:43 AM, Maninda Edirisooriya mani...@wso2.comwrote:

 Yes. It is included as a resource to utils. i.e.
 core/org.wso2.carbon.utils/3.2.4/src/main/resources/GeoIP.dat


And also, we can put this database file in the repository/database
directory without embedding it inside the bundle. What is the rationale
behind embedding this inside the bundle anyway.

Thanks,
Sameera.

[1] http://repo.opengeo.org/com/maxmind/geoip/1.2.3/



 On Wed, Feb 15, 2012 at 10:52 PM, Sameera Jayasoma same...@wso2.comwrote:



 On Wed, Feb 15, 2012 at 12:48 PM, Maninda Edirisooriya 
 mani...@wso2.comwrote:

 Actually there are several Java files require for the library.
 com.maxmind.geoip is used as the package name. Is it ok to change it as
 org.wso2.carbon.utils.geoip ? (Library is LGPL)

 Another problem I have is that the library needs the path of the
 database file as a path from the root. But with our OSGI bundles we found
 that the file can only be referred as an InputStream using
 getResourceAsStream function but not as a path from the root. In this case
 also we have to edit the library file to provide the file as an
 InputStream. Is it ok? or is there any workaround?


 Does this file is inside the OSGi bundle?

 Thanks,
 Sameera.


 On Wed, Feb 8, 2012 at 2:15 PM, Afkham Azeez az...@wso2.com wrote:

 How about adding that file to org.wso2.carbon.util jar with the proper
 attributions?

 On Wed, Feb 8, 2012 at 2:06 PM, Maninda Edirisooriya 
 mani...@wso2.comwrote:

 I have to include a third party Java library with LGPL licences to
 convert IP addresses to geographical locations in the BAM2. It is only
 source a code file. (.java file) I have no idea where to add it.

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev



 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 Sameera Jayasoma
 Technical Lead and Product Manager, WSO2 Carbon

 WSO2, Inc. (http://wso2.com)
 email: same...@wso2.com
 blog: http://tech.jayasoma.org


 Lean . Enterprise . Middleware

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev



 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




-- 
Sameera Jayasoma
Technical Lead and Product Manager, WSO2 Carbon

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://tech.jayasoma.org

Lean . Enterprise . Middleware
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Including a third part library

2012-02-14 Thread Maninda Edirisooriya
Actually there are several Java files require for the library.
com.maxmind.geoip is used as the package name. Is it ok to change it as
org.wso2.carbon.utils.geoip ? (Library is LGPL)

Another problem I have is that the library needs the path of the database
file as a path from the root. But with our OSGI bundles we found that the
file can only be referred as an InputStream using getResourceAsStream
function but not as a path from the root. In this case also we have to edit
the library file to provide the file as an InputStream. Is it ok? or is
there any workaround?

On Wed, Feb 8, 2012 at 2:15 PM, Afkham Azeez az...@wso2.com wrote:

 How about adding that file to org.wso2.carbon.util jar with the proper
 attributions?

 On Wed, Feb 8, 2012 at 2:06 PM, Maninda Edirisooriya mani...@wso2.comwrote:

 I have to include a third party Java library with LGPL licences to
 convert IP addresses to geographical locations in the BAM2. It is only
 source a code file. (.java file) I have no idea where to add it.

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] Including a third part library

2012-02-08 Thread Afkham Azeez
How about adding that file to org.wso2.carbon.util jar with the proper
attributions?

On Wed, Feb 8, 2012 at 2:06 PM, Maninda Edirisooriya mani...@wso2.comwrote:

 I have to include a third party Java library with LGPL licences to convert
 IP addresses to geographical locations in the BAM2. It is only source a
 code file. (.java file) I have no idea where to add it.

 ___
 Carbon-dev mailing list
 Carbon-dev@wso2.org
 http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev




-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/**
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev