Re: Confused about Inventory Items

2007-12-14 Thread Jacques Le Roux
You may be interested to read the Data Model Resource Book  p.84  
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Related+Books

Without this book you may lose time...

Jacques

De : Andrew [EMAIL PROTECTED]
 I'm apparently missing something about the way inventory works, but hey I'm 
 still learning.
 
 I have set up a product (Gearbox) with a few selectable features. (Make,  
 model, quality, year)
 Or rather created some Feature Groups which are then attached to my Category 
 of used parts.
 and Gearbox is product of that category.
 
 Now if I go my facility and receive inventory of 1 Gearbox there is no way to 
 select what the values features are .
 eg make= honda, model=civic, quality=damaged, year=1990.
 I would have thought an inventory item (Which I now have) would have to have 
 those features set. 
 
 On I suspect a similar note I never have anything in Physical Inventory and 
 in general have no idea what that tab is for.
 
 I expect there is just some user documentation on Facilities I haven't found 
 that would explain all this.
 
 Thanks for any pointers.
 Andrew



Problem deploying test app

2007-12-14 Thread Edward Banfa
Hi all,

 

I am new to ofbiz and I am trying to deploy a test application. I am using
the hello world tutorials from www.opensourcestrategies.com
http://www.opensourcestrategies.com/  . The problem is my app

Is not being deployed (well I cant see it being loaded in the console.log
and I put the app into the hotdeploy folder). I am running opentaps-1.0 on
winXP, JRE 5.0

 

I know I am doing something wrong, I just cant seem to find out what it is.

Any contribution will be greatly appreciated thnx.

 

My app structure (emedic) is like so:

 

emedic

|   build.xml

|   ofbiz-component.xml

|

+---webapp

+---emedic

|   index.jsp

|   main.ftl

|

+---error

|   error.jsp

|

+---WEB-INF

controller.xml

web.xml

 

 

And this is a snippet of my ofbiz-component.xml

 

?xml version=1.0 encoding=UTF-8?

 

ofbiz-component name=emedic

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 

 
xsi:noNamespaceSchemaLocation=http://www.ofbiz.org/dtds/ofbiz-component.xsd


resource-loader name=main type=component/

webapp name=emedic 

title=A Hello world app 

server=default-server 

location=webapp/emedic 

mount-point=/emedic

app-bar-display=true/ 

/ofbiz-component

 

 

 

 



Understanding Product Promotions

2007-12-14 Thread Vikas Mayur
I was exploring the code flow for product promotions, being applied when a
product is added to the cart through ordermgr.
Can any one help me out where the flow goes after
  2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
ShoppingCartHelper.java:173:INFO ] parent productid null
so that I could reach to the code which is finally doing adjustments
(Promotions)
Please refer to the log below.

2007-12-14 16:31:29,021 (http-0.0.0.0-8443-Processor4) [
RequestHandler.java:243:INFO ] [Processing Request]: additem sessionId=
811E8557E6181FEC12CEDAA6EA3C6F04.jvm1
2007-12-14 16:31:29,023 (http-0.0.0.0-8443-Processor4 ) [
ShoppingCartEvents.java:166:INFO ] adding item product WG-
2007-12-14 16:31:29,023 (http-0.0.0.0-8443-Processor4) [
ShoppingCartEvents.java:167:INFO ] adding item parent product null
2007-12-14 16:31:29,028 ( http-0.0.0.0-8443-Processor4) [
ProductStoreWorker.java:484:INFO ] getSurvey for product WG-
2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
ShoppingCartHelper.java:172:INFO ] carthelper productid WG-
2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
ShoppingCartHelper.java:173:INFO ] parent productid null
2007-12-14 16:31:29,207 (http-0.0.0.0-8443-Processor4) [
GenericEntity.java:408:WARN ] In entity field [ OrderAdjustment.amount] set
the value passed in [java.math.BigDecimal] is not compatible with the Java
type of the field [Double]
2007-12-14 16:31:29,210 (http-0.0.0.0-8443-Processor4) [
GenericEntity.java:408:WARN ] In entity field [ OrderAdjustment.amount] set
the value passed in [java.math.BigDecimal] is not compatible with the Java
type of the field [Double]

Thank you,
-- 
Vikas Mayur


Re: OfBiz System Configuration Wizard

2007-12-14 Thread Adrian Crum
Again, we use the Asset Maintenance component OOTB here. Even though I'm an in-house IT guy and I 
was the one who installed OFBiz here, it didn't have to be me doing it. Our facilities manager 
(person, not program) could have downloaded a binary release, unzipped it and started using the 
Asset Maintenance component on his own. No consultant or systems guru is needed. Seriously.


Many of our users are at that skill level where they could download and install software themselves. 
The problem comes when someone like that tries to follow the Production Setup guidelines and is told 
to modify properties files and XML files. They won't know what to do at that point.


I believe this to be a very real scenario, especially once the Accounting 
component is finished.

A binary release doesn't have to come from the OFBiz site. It could come from another source, like 
Opentaps. I suppose someone providing a binary release of their own could develop their own system 
configuration screen as well.


-Adrian

Walter Vaughan wrote:

Jacques Le Roux wrote:


I'm not sure to see the frontier here...
 

Except in the edge case, I don't see how many people who are at the 
level of being able to install and operate SugarCRM could do the same 
thing with OFBiz. And moving it up a level, compare installing a demo 
version of OFBiz with downloading and installing the Microsoft Dynamics 
GP 10 demo. Or staying closer to open source, installing postBooks 
(http://www.xtuple.com/postbooks).


My point is that if it's an OOTB solution as the goal or even a forked 
goal of the community, then last March when the 4.0 release was created, 
some effort should have gone into consistent user interfaces, 
installation wizards, documentation, manuals. The communty voted with 
its keyboards to instead add hundreds of new features to the trunk 
instead. Given that the number of bug fixes that have gone into the 4.0 
release can be measured by a human hand testifies that the community is 
addicted to features. NOT THAT IT'S A BAD THING :)


Me, I've always thought it should be as easy to install OFBiz as any top 
line .php application that asks a few (or as many as is needed) 
questions, confirms and configures itself, and is ready to operate 
within minutes, and the configurator be re-entrant to allow 
configuration changes in the future and also suggest settings for 
certain conditions.


--
Walter rambling post Vaughan





Re: FastMap Vs HashMap,

2007-12-14 Thread Adrian Crum
I just spent some time running performance tests on FastMaps and HashMaps. Calling the get methods 
showed no speed difference. The Javalution classes seem to have a speed advantage in building Maps 
and Lists. They claim their FastSet.removeLast method is faster than the Java library. So, there is 
a speed advantage in certain scenarios, but not in all cases.


-Adrian

Sumit Pandit wrote:


*i have a question please make me correct if i am wrong :-*

if we compare  FastMap Vs HashMap,

*FastMap is faster than HashMap so long as the map is long lived and
relatively predictable in size. If you try to use it as a short-lived
general replacement for HashMap it may very well kill your performance.

*I found these lines some where in Google.
so does it mean that we should use HashMap for local variables ?

Also please explain me the performance issue if we use HashMap rather then
FastMap.

Thanks for suggestion.





RE: Problem deploying test app

2007-12-14 Thread Edward Banfa
Sorry but I found the solution in a README file located in the hot deploy
Folder of opentaps-1.0.

Thanks for the help. 

--FROM README FILE
-
This is a hot-deploy component directory.
All components in this tree will be loaded
after ../framework and ../applications.

*** IMPORTANT ***

To load your component you must edit the file hot-deploy/component-load.xml
and reference it there.  This is REQUIRED with opentaps.

-

-Original Message-
From: BJ Freeman [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 14, 2007 1:50 PM
To: user@ofbiz.apache.org
Subject: Re: Problem deploying test app

you need to put this in the hot deploy
if that does not work
be sure to add the controller.xml as an attachment
when you post this in the opentaps forums.
https://sourceforge.net/forum/message.php?msg_id=4675120
there is already and discussion on this topic.

Edward Banfa sent the following on 12/14/2007 3:28 AM:
 Hi all,
 
  
 
 I am new to ofbiz and I am trying to deploy a test application. I am using
 the hello world tutorials from www.opensourcestrategies.com
 http://www.opensourcestrategies.com/  . The problem is my app
 
 Is not being deployed (well I cant see it being loaded in the console.log
 and I put the app into the hotdeploy folder). I am running opentaps-1.0 on
 winXP, JRE 5.0
 
  
 
 I know I am doing something wrong, I just cant seem to find out what it
is.
 
 Any contribution will be greatly appreciated thnx.
 
  
 
 My app structure (emedic) is like so:
 
  
 
 emedic
 
 |   build.xml
 
 |   ofbiz-component.xml
 
 |
 
 +---webapp
 
 +---emedic
 
 |   index.jsp
 
 |   main.ftl
 
 |
 
 +---error
 
 |   error.jsp
 
 |
 
 +---WEB-INF
 
 controller.xml
 
 web.xml
 
  
 
  
 
 And this is a snippet of my ofbiz-component.xml
 
  
 
 ?xml version=1.0 encoding=UTF-8?
 
  
 
 ofbiz-component name=emedic
 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 
  

xsi:noNamespaceSchemaLocation=http://www.ofbiz.org/dtds/ofbiz-component.xsd
 
 
 resource-loader name=main type=component/
 
 webapp name=emedic 
 
 title=A Hello world app 
 
 server=default-server 
 
 location=webapp/emedic 
 
 mount-point=/emedic
 
 app-bar-display=true/ 
 
 /ofbiz-component
 
  
 
  
 
  
 
  
 
 








Re: Currency in store and eCommerce

2007-12-14 Thread Lindsey L.

Hello Jacques and David,

I realize that the activity on this issue is a little old, but I have a
scenario that would greatly benefit from a solution or complete
documentation around this issue.  Just to recap, the issue was about virtual
products being set in one currency and their variants set in a different
currency and how to get the currency to display for the variant.  David had
mentioned that the currency set for the store is what determines the final
currency for products.

Jacques had said:
So as I thought it's better to handle different currencies in
different stores for now. Am I missing something here ?
Is that always true ? Is it a recommended best practice to do
so (having 1 store by currency) ? Are there other scenarios, future
scenarios ?

David said:
 No. The price stuff will look for prices according to the currency set on
the ProductStore.
and
 NO! Not totally correct. In this case of the ProductStore currency was
USD then the virtual product's prices would be used. If the ProductStore
currency was EUR, then the variant product's prices would be used.

My question is about what was ultimately determined on this issue (I
apologize if I am asking for a repeat of something already stated).

My scenario is this:
Default Currency in Store is set to USD
Virtual Product ABC is set in USD
Variant Product ABC-1 is set in USD
Variant Product ABC-2 is set in GBP

When a user selects the variant product in British pounds, is there a way to
show the pricing in this currency, even if the default Currency Uom for the
store is USD??  Or is the best practice to have multiple stores, each with
their own currencies?


I would appreciate any direction you could give me.

Thanks in advance for your help,
Lindsey
-- 
View this message in context: 
http://www.nabble.com/Problem-in-Virtual-products-tp8723541p14339702.html
Sent from the OFBiz - User mailing list archive at Nabble.com.



Re: OfBiz System Configuration Wizard

2007-12-14 Thread Jacques Le Roux
Walter,

OK, thanks this is more clear :o)

De : Walter Vaughan [EMAIL PROTECTED]
 Jacques Le Roux wrote:

 I'm not sure to see the frontier here...
 
 
 Except in the edge case, I don't see how many people who are at the
 level of being able to install and operate SugarCRM could do the same
 thing with OFBiz. And moving it up a level, compare installing a demo
 version of OFBiz with downloading and installing the Microsoft Dynamics
 GP 10 demo. Or staying closer to open source, installing postBooks
 (http://www.xtuple.com/postbooks).

Sorry, I have not time to MS or even postBooks. I installed SugarCRM last year 
though (never found time to seriously use it) and I
agree that this was pretty easy. I don't remember if I had to install easyPHP 
before.
But is installing and then using OFBiz OOTB so different and difficult ? Of 
course you have to install Java 1.5+ before, but even on
a Linux system it's easy (I'm mostly a Windows User ;p)
Then you run ant-install, then startofbiz and then ... you discover that OFBiz 
is not as simple as SugarCRM :o) As Jacopo (and
others) explained the point is not installing but using it in real business 
conditions. At this point you have to have a deeper
knwoledge on business ans tech. aspects and I'm not sure the average SUgarCRM 
user (or such package) have such a knowledge. Do we
really want to support this level of knwoledge and help this kind of people 
(nothing pejorative here) grabs OFBiz and for which
goals ? This is the real question !

 My point is that if it's an OOTB solution as the goal or even a forked
 goal of the community, then last March when the 4.0 release was created,
 some effort should have gone into consistent user interfaces,
 installation wizards, documentation, manuals.

We could all benefit from such efforts. I completly agree and moreover I'm 
already working on it, day by day, hour by hour, minute
by minute, and by chance I'm not alone :o)...

 The communty voted with
 its keyboards to instead add hundreds of new features to the trunk
 instead. Given that the number of bug fixes that have gone into the 4.0
 release can be measured by a human hand testifies that the community is
 addicted to features. NOT THAT IT'S A BAD THING :)

I must admit that I even have difficulties to follow all what is happening this 
last weeks in OFBiz. But don't we need a better
accouting and project manager components ?

 Me, I've always thought it should be as easy to install OFBiz as any top
 line .php application that asks a few (or as many as is needed)
 questions, confirms and configures itself, and is ready to operate
 within minutes,

I reckon OFBIz is already able to propose that using Derby OOTB. Though you may 
prefer to install Postgres to quickerly (more
quickly?) run ant-install.

and the configurator be re-entrant to allow
 configuration changes in the future and also suggest settings for
 certain conditions.

This is the discussion Adrian launched, where a back at it, lot of words for 
nothing ;o) ? Don't get me wrong, I would love to have
a Wizard configurator, but we can't ignore the issues David pointed out 
(overidding parameters, with concurrent accesses) !

Jacques

 --
 Walter rambling post Vaughan




Re: hello world application

2007-12-14 Thread Pranay Pandey
For this you can visit this link :
http://www.opensourcestrategies.com/ofbiz/tutorials.php
This will be very helpful to you. All things are explained there.

On Dec 14, 2007 12:50 PM, Hans Bakker [EMAIL PROTECTED] wrote:

 Please read the related webpage page carefully, it is completely
 explained there.

 On Thu, 2007-12-13 at 21:37 -0800, Preetam A. B wrote:
  hello,
 
  i Have build OFBIZ on linux running properly..
 
  can any one tell me what are the proper steps for creating HELLO WORLD
  APPLICATION ON OFBIZ.
 
  PLZ IN DETAIL AS SOON AS POSSIBLE ..
 
 
 --
 http://Antwebsystems.com : OFBiz Quality support for competitive rates.






Re: FastMap Vs HashMap,

2007-12-14 Thread Jacques Le Roux
Sumit, Adrian, All,

I had a cursory look at it. In abstract, yes this seems to be right

Though those lines you took from Google are 4 years old 
http://www.javalobby.org/java/forums/t9377.html?start=15#reply20

Anyway it seems to be right, here the answer from Javolution Creator (JM 
Dautelle)
The best analogy between FastMap and HashMap would be buying versus renting. 
With FastMap you pay upfront but you are done with it.
With HashMap you pay each time you put a new entry (not only when you 
allocate but also later with the GC interests...). Obviously
if you intend to sell your house three months later it does not make sense to 
buy it.

Also interesting is JM Dautelle's this note found at 
http://javolution.org/doc/benchmark.html
Although it looks nice, I see that some of your collection classes are not 
always faster than their Java 6 counterparts.
Some classes are faster, others are slower (for example ArrayList.get(int) is 
faster with the -server option, slower without it).
Overall, there is no significative difference in average execution time. The 
main advantage of Javolution collections is that they
are time-deterministic (the maximum execution time is very close to the minimum 
execution time) and they are RTSJ-Safe.
They have some additional characteristics such as thread-safe without 
synchronization, support for custom key/value comparators,
direct record iterations (faster than iterators), recyclable, reduced impact on 
GC (fragmentation or large arrays allocations),
support for custom entry implementation (FastMap) or custom node implementation 
(FastList), etc.

See also 
http://noctarius.l2castell.org/download/benchmark_trove_javolution_java.pdf

Maybe knowning the real reason(s?) it was integrated in OFBiz would be cool, 
does not look like a big deal tough, am'I wrong ?

Jacques

De : Adrian Crum [EMAIL PROTECTED]
 I just spent some time running performance tests on FastMaps and HashMaps. 
 Calling the get methods
 showed no speed difference. The Javalution classes seem to have a speed 
 advantage in building Maps
 and Lists. They claim their FastSet.removeLast method is faster than the Java 
 library. So, there is
 a speed advantage in certain scenarios, but not in all cases.

 -Adrian

 Sumit Pandit wrote:

  *i have a question please make me correct if i am wrong :-*
 
  if we compare  FastMap Vs HashMap,
 
  *FastMap is faster than HashMap so long as the map is long lived and
  relatively predictable in size. If you try to use it as a short-lived
  general replacement for HashMap it may very well kill your performance.
 
  *I found these lines some where in Google.
  so does it mean that we should use HashMap for local variables ?
 
  Also please explain me the performance issue if we use HashMap rather then
  FastMap.
 
  Thanks for suggestion.
 




JSONObject to Map

2007-12-14 Thread Al Byers
Is there a simple way to convert a JSONObject to its HashMap repesentation?

Thanks,
-Al


Re: FastMap Vs HashMap,

2007-12-14 Thread David E Jones


It is actually a pretty big deal, and there are very good reasons it  
was integrated into OFBiz. In OFBiz we deal with LOTS of temporary  
objects, especially Maps and Lists, and when doing performance  
profiling you can see the impact of this in the results (ie lots of  
time creating objects and allocating memory, lots of work for the  
garbage collector to do when destroying objects and un-allocating  
memory). Because of this it makes a big difference to use recycled  
objects like the Javolution FastMap and FastList, ie calling  
FastMap.newInstance() to get an object out of the pool of existing  
FastMap objects rather than calling new HashMap() to create a new  
HashMap each time.


There are actually lots of performance tricks that OFBiz uses, though  
most of the work was done before most of the people now involved with  
OFBiz were around. Early on I spent a few weeks profiling and tweaking  
over the course of a few months as things were being heavily  
developed. Our classpath caching, special purpose internal methods in  
the entity engine, and the use of Javolution for the Fast* objects and  
for object recycling for often used but short-lived things like the  
GenericValue object (which is a recycled object) are all results of  
that effort.


For other things like get and put operations on a FastMap versus a  
HashMap... I wouldn't expect a whole lot of difference. It may be that  
FastMap does a better job of managing large and scattered hash arrays  
or something but there is really only so much you can do with that as  
those algorithms have been around for a LONG time and have been  
thoroughly reviewed and refined by lots of people. To really get an  
understanding of this would require a bit of research, but it's all  
very standard computer science stuff, so the material is readily  
available and very accessible if you get a decent book or whatever. It  
is nice stuff to know about because these basic data structures and  
algorithms are what everything is based on in modern software and  
understanding them makes it way easier to understand performance  
impact and interpret the results of profiling, as well as understand  
higher level algorithms and data structures like those used in  
relational databases and such.


Knowing all of that stuff is of course not a substitution for using a  
profiling tool, and in fact those who really understand the stuff know  
all the more how important it is to use profiling tools. The nature of  
the software is that it is very complex, and even if you know it all  
it's hard to remember and grok the importance of certain pieces  
sometimes. In other words it's deterministic, but complex. The most  
experienced people will know that they might be able to guess really  
well and understand really well the general things that might impact  
performance, but until you do profiling and tweaking to see a  
performance difference they are only guesses and guesses aren't  
proofs, and aren't enough if you're trying to be careful and make a  
real difference in something.


In short, doing profiling is great and extremely valuable, as is  
understanding the underlying data structures and algorithms. However,  
neither of them along is sufficient to really understand and describe  
why something is performing a certain way or make a difference in how  
it performs.


-David


On Dec 14, 2007, at 1:28 PM, Jacques Le Roux wrote:


Sumit, Adrian, All,

I had a cursory look at it. In abstract, yes this seems to be right

Though those lines you took from Google are 4 years old 
http://www.javalobby.org/java/forums/t9377.html?start=15#reply20

Anyway it seems to be right, here the answer from Javolution Creator  
(JM Dautelle)
The best analogy between FastMap and HashMap would be buying versus  
renting. With FastMap you pay upfront but you are done with it.
With HashMap you pay each time you put a new entry (not only when  
you allocate but also later with the GC interests...). Obviously
if you intend to sell your house three months later it does not make  
sense to buy it.


Also interesting is JM Dautelle's this note found at 
http://javolution.org/doc/benchmark.html
Although it looks nice, I see that some of your collection classes  
are not always faster than their Java 6 counterparts.
Some classes are faster, others are slower (for example  
ArrayList.get(int) is faster with the -server option, slower without  
it).
Overall, there is no significative difference in average execution  
time. The main advantage of Javolution collections is that they
are time-deterministic (the maximum execution time is very close to  
the minimum execution time) and they are RTSJ-Safe.
They have some additional characteristics such as thread-safe  
without synchronization, support for custom key/value comparators,
direct record iterations (faster than iterators), recyclable,  
reduced impact on GC (fragmentation or large arrays allocations),
support for custom entry 

Re: JSONObject to Map

2007-12-14 Thread Al Byers
Thanks Chris,

It looks like the answer is this:
Map bean = (Map)JSONObject.toBean(json, java.util.HashMap.class);

-Al


Re: JSONObject to Map

2007-12-14 Thread Chris Howe
An older version of json-lib is included in the project.  The javadocs are here 
http://json-lib.sourceforge.net/apidocs/jdk15/index.html

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: user@ofbiz.apache.org
Sent: Friday, December 14, 2007 4:14:37 PM
Subject: JSONObject to Map


Is there a simple way to convert a JSONObject to its HashMap
 repesentation?

Thanks,
-Al





Re: FastMap Vs HashMap,

2007-12-14 Thread Jacques Le Roux
Thanks a lot David to have taken the time to clearly explain. I'm sure this 
will be helpful for a lot of persons in some
circonstances.

BTW, would you recommend a specific profiler tool ? I did not use one since I 
use Java, I should say since I use OFBiz...

Jacques


De : David E Jones [EMAIL PROTECTED]
 It is actually a pretty big deal, and there are very good reasons it
 was integrated into OFBiz. In OFBiz we deal with LOTS of temporary
 objects, especially Maps and Lists, and when doing performance
 profiling you can see the impact of this in the results (ie lots of
 time creating objects and allocating memory, lots of work for the
 garbage collector to do when destroying objects and un-allocating
 memory). Because of this it makes a big difference to use recycled
 objects like the Javolution FastMap and FastList, ie calling
 FastMap.newInstance() to get an object out of the pool of existing
 FastMap objects rather than calling new HashMap() to create a new
 HashMap each time.

 There are actually lots of performance tricks that OFBiz uses, though
 most of the work was done before most of the people now involved with
 OFBiz were around. Early on I spent a few weeks profiling and tweaking
 over the course of a few months as things were being heavily
 developed. Our classpath caching, special purpose internal methods in
 the entity engine, and the use of Javolution for the Fast* objects and
 for object recycling for often used but short-lived things like the
 GenericValue object (which is a recycled object) are all results of
 that effort.

 For other things like get and put operations on a FastMap versus a
 HashMap... I wouldn't expect a whole lot of difference. It may be that
 FastMap does a better job of managing large and scattered hash arrays
 or something but there is really only so much you can do with that as
 those algorithms have been around for a LONG time and have been
 thoroughly reviewed and refined by lots of people. To really get an
 understanding of this would require a bit of research, but it's all
 very standard computer science stuff, so the material is readily
 available and very accessible if you get a decent book or whatever. It
 is nice stuff to know about because these basic data structures and
 algorithms are what everything is based on in modern software and
 understanding them makes it way easier to understand performance
 impact and interpret the results of profiling, as well as understand
 higher level algorithms and data structures like those used in
 relational databases and such.

 Knowing all of that stuff is of course not a substitution for using a
 profiling tool, and in fact those who really understand the stuff know
 all the more how important it is to use profiling tools. The nature of
 the software is that it is very complex, and even if you know it all
 it's hard to remember and grok the importance of certain pieces
 sometimes. In other words it's deterministic, but complex. The most
 experienced people will know that they might be able to guess really
 well and understand really well the general things that might impact
 performance, but until you do profiling and tweaking to see a
 performance difference they are only guesses and guesses aren't
 proofs, and aren't enough if you're trying to be careful and make a
 real difference in something.

 In short, doing profiling is great and extremely valuable, as is
 understanding the underlying data structures and algorithms. However,
 neither of them along is sufficient to really understand and describe
 why something is performing a certain way or make a difference in how
 it performs.

 -David


 On Dec 14, 2007, at 1:28 PM, Jacques Le Roux wrote:

  Sumit, Adrian, All,
 
  I had a cursory look at it. In abstract, yes this seems to be right
 
  Though those lines you took from Google are 4 years old 
  http://www.javalobby.org/java/forums/t9377.html?start=15#reply20
 
  Anyway it seems to be right, here the answer from Javolution Creator
  (JM Dautelle)
  The best analogy between FastMap and HashMap would be buying versus
  renting. With FastMap you pay upfront but you are done with it.
  With HashMap you pay each time you put a new entry (not only when
  you allocate but also later with the GC interests...). Obviously
  if you intend to sell your house three months later it does not make
  sense to buy it.
 
  Also interesting is JM Dautelle's this note found at 
  http://javolution.org/doc/benchmark.html
  Although it looks nice, I see that some of your collection classes
  are not always faster than their Java 6 counterparts.
  Some classes are faster, others are slower (for example
  ArrayList.get(int) is faster with the -server option, slower without
  it).
  Overall, there is no significative difference in average execution
  time. The main advantage of Javolution collections is that they
  are time-deterministic (the maximum execution time is very close to
  the minimum execution time) and they are 

Re: Understanding Product Promotions

2007-12-14 Thread Scott Gray
Hi Vikas

Most of the action takes place here:
applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java

I think from memory that runProductPromos is the entry point you're looking
for.  If you add a breakpoint to that you should be able to see what called
it.

Regards
Scott

On 15/12/2007, Vikas Mayur [EMAIL PROTECTED] wrote:

 I was exploring the code flow for product promotions, being applied when a
 product is added to the cart through ordermgr.
 Can any one help me out where the flow goes after
   2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
 ShoppingCartHelper.java:173:INFO ] parent productid null
 so that I could reach to the code which is finally doing adjustments
 (Promotions)
 Please refer to the log below.

 2007-12-14 16:31:29,021 (http-0.0.0.0-8443-Processor4) [
 RequestHandler.java:243:INFO ] [Processing Request]: additem sessionId=
 811E8557E6181FEC12CEDAA6EA3C6F04.jvm1
 2007-12-14 16:31:29,023 (http-0.0.0.0-8443-Processor4 ) [
 ShoppingCartEvents.java:166:INFO ] adding item product WG-
 2007-12-14 16:31:29,023 (http-0.0.0.0-8443-Processor4) [
 ShoppingCartEvents.java:167:INFO ] adding item parent product null
 2007-12-14 16:31:29,028 ( http-0.0.0.0-8443-Processor4) [
 ProductStoreWorker.java:484:INFO ] getSurvey for product WG-
 2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
 ShoppingCartHelper.java:172:INFO ] carthelper productid WG-
 2007-12-14 16:31:29,033 (http-0.0.0.0-8443-Processor4) [
 ShoppingCartHelper.java:173:INFO ] parent productid null
 2007-12-14 16:31:29,207 (http-0.0.0.0-8443-Processor4) [
 GenericEntity.java:408:WARN ] In entity field [ OrderAdjustment.amount]
 set
 the value passed in [java.math.BigDecimal] is not compatible with the Java
 type of the field [Double]
 2007-12-14 16:31:29,210 (http-0.0.0.0-8443-Processor4) [
 GenericEntity.java:408:WARN ] In entity field [ OrderAdjustment.amount]
 set
 the value passed in [java.math.BigDecimal] is not compatible with the Java
 type of the field [Double]

 Thank you,
 --
 Vikas Mayur



Re: FastMap Vs HashMap,

2007-12-14 Thread Sumit Pandit
Thanks Adrian, Jacques and David for your valuable thoughts.
David I admire your explanation power. Great Clarification.
Also as Jacques says please recommend a specific profiler tool if possible.

thanks again.

Sumit Pandit

On Dec 15, 2007 6:55 AM, Jacques Le Roux [EMAIL PROTECTED]
wrote:

 Thanks a lot David to have taken the time to clearly explain. I'm sure
 this will be helpful for a lot of persons in some
 circonstances.

 BTW, would you recommend a specific profiler tool ? I did not use one
 since I use Java, I should say since I use OFBiz...

 Jacques


 De : David E Jones [EMAIL PROTECTED]
  It is actually a pretty big deal, and there are very good reasons it
  was integrated into OFBiz. In OFBiz we deal with LOTS of temporary
  objects, especially Maps and Lists, and when doing performance
  profiling you can see the impact of this in the results (ie lots of
  time creating objects and allocating memory, lots of work for the
  garbage collector to do when destroying objects and un-allocating
  memory). Because of this it makes a big difference to use recycled
  objects like the Javolution FastMap and FastList, ie calling
  FastMap.newInstance() to get an object out of the pool of existing
  FastMap objects rather than calling new HashMap() to create a new
  HashMap each time.
 
  There are actually lots of performance tricks that OFBiz uses, though
  most of the work was done before most of the people now involved with
  OFBiz were around. Early on I spent a few weeks profiling and tweaking
  over the course of a few months as things were being heavily
  developed. Our classpath caching, special purpose internal methods in
  the entity engine, and the use of Javolution for the Fast* objects and
  for object recycling for often used but short-lived things like the
  GenericValue object (which is a recycled object) are all results of
  that effort.
 
  For other things like get and put operations on a FastMap versus a
  HashMap... I wouldn't expect a whole lot of difference. It may be that
  FastMap does a better job of managing large and scattered hash arrays
  or something but there is really only so much you can do with that as
  those algorithms have been around for a LONG time and have been
  thoroughly reviewed and refined by lots of people. To really get an
  understanding of this would require a bit of research, but it's all
  very standard computer science stuff, so the material is readily
  available and very accessible if you get a decent book or whatever. It
  is nice stuff to know about because these basic data structures and
  algorithms are what everything is based on in modern software and
  understanding them makes it way easier to understand performance
  impact and interpret the results of profiling, as well as understand
  higher level algorithms and data structures like those used in
  relational databases and such.
 
  Knowing all of that stuff is of course not a substitution for using a
  profiling tool, and in fact those who really understand the stuff know
  all the more how important it is to use profiling tools. The nature of
  the software is that it is very complex, and even if you know it all
  it's hard to remember and grok the importance of certain pieces
  sometimes. In other words it's deterministic, but complex. The most
  experienced people will know that they might be able to guess really
  well and understand really well the general things that might impact
  performance, but until you do profiling and tweaking to see a
  performance difference they are only guesses and guesses aren't
  proofs, and aren't enough if you're trying to be careful and make a
  real difference in something.
 
  In short, doing profiling is great and extremely valuable, as is
  understanding the underlying data structures and algorithms. However,
  neither of them along is sufficient to really understand and describe
  why something is performing a certain way or make a difference in how
  it performs.
 
  -David
 
 
  On Dec 14, 2007, at 1:28 PM, Jacques Le Roux wrote:
 
   Sumit, Adrian, All,
  
   I had a cursory look at it. In abstract, yes this seems to be right
  
   Though those lines you took from Google are 4 years old
 http://www.javalobby.org/java/forums/t9377.html?start=15#reply20
  
   Anyway it seems to be right, here the answer from Javolution Creator
   (JM Dautelle)
   The best analogy between FastMap and HashMap would be buying versus
   renting. With FastMap you pay upfront but you are done with it.
   With HashMap you pay each time you put a new entry (not only when
   you allocate but also later with the GC interests...). Obviously
   if you intend to sell your house three months later it does not make
   sense to buy it.
  
   Also interesting is JM Dautelle's this note found at
 http://javolution.org/doc/benchmark.html
   Although it looks nice, I see that some of your collection classes
   are not always faster than their Java 6 counterparts.
   Some classes 

Re: Confused about Inventory Items

2007-12-14 Thread Mridul Pathak
Hi Andrew,
Have you created a single product for the Gearbox, i.e. only one entry
in the Product entity for the product Gearbox, and trying to apply all the
selectable features to this particular product?  If yes, than your data is
still not complete. :)
Here is something that I know about creating a Product with more than
one selectable features.
1) The first thing to note down is, a product with selectable features means
a product with variations, that means this product can have different
variations depending upon its selectable features.  Each set of selectable
features defines one variation of that product.  So we can say, suppose for
buying purpose, that a customer won't buy the product itself, but its
varients.
2) Above explaination leads to the point that for a product with selectable
features, you need to create:
a) A Virtual Parent Product (for which no physical inventory exists and
hence can't be purchased)
b) One Varient Product for each set of selectable features, so this
gives a whole bunch of products to you. (Physical Inventory will exist and
will be the actual purchasable products).
3) Create ProductAssoc(s) for Virtual Parent Product and its Varient
Products.
4) You need to define a ProductFeatureCategory for your Product.
5) Prepare seed data for ProductFeatureType for make, model, quality etc. if
not present in OFBiz seed data.
6) Create ProductFeature records for the selectable features of each type.
7) Associate ProductFeature(s) to the Virtual Parent Product as
SELECTABLE_FEATURES in ProductFeatureAppl.
8) Associate each Varient Product to the set of ProductFeature it
corresponds to as STANDARD_FEATURES in ProductFeatureAppl.

I think that is all we need to do to create a product with selectable
features.
For an example of creating such products in OFBiz, you can refer to
ofbiz-trunkapplicationsecommercedataDemoProduct.xml.
And finally I think this should answer your question about inventory.
The Inventory you receive will be for the varient products, which are the
actual physical products, each varient reqresenting a set of selectable
features and not for the Virtual Parent Product.
Actually you are not supposed to select features while receiving
Inventory, instead you will receive the required varient for the set of
required selectable features.

On Dec 14, 2007 10:22 AM, Andrew [EMAIL PROTECTED] wrote:

 I'm apparently missing something about the way inventory works, but hey
 I'm still learning.

 I have set up a product (Gearbox) with a few selectable features. (Make,
  model, quality, year)
 Or rather created some Feature Groups which are then attached to my
 Category of used parts.
 and Gearbox is product of that category.

 Now if I go my facility and receive inventory of 1 Gearbox there is no way
 to select what the values features are .
 eg make= honda, model=civic, quality=damaged, year=1990.
 I would have thought an inventory item (Which I now have) would have to
 have those features set.

 On I suspect a similar note I never have anything in Physical Inventory
 and in general have no idea what that tab is for.

 I expect there is just some user documentation on Facilities I haven't
 found that would explain all this.

 Thanks for any pointers.
 Andrew





  
 
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




-- 
Thanks  Regards
Mridul Pathak
Hotwax Media
http://www.hotwaxmedia.com
[EMAIL PROTECTED]
__
Office  :   509.855.4113
Mobile : +919425926892


Re: Party Information

2007-12-14 Thread Mridul Pathak
 Hi Brendan,
We can create Party for any person or group.  A person is for a single
person and a Group is for any organization or a departments in an
organization.  We can assign roles (more than one) to each person according
to the roles they play in a organization (like employee, customer, vendor
etc.).  We can also create PartyRelationships to represent the relation
between different persons, groups and person to group.  We can also upload
Contents for a Party(person).  We can create UserLogin for each person and
associate it to a SecurityGroup to give him required access permissions to
the System.
There are many more functions available for a Party that can be used
according to individual's purpose.

On Dec 9, 2007 7:12 PM, Brendan Vogt [EMAIL PROTECTED] wrote:

 Hi there,



 Is there any document-specific information about the party section?  What
 I
 mean is I need to know what type of party is used for what?  And maybe an
 explanation for all the input fields.  I don't know when I party is a
 person
 or an employee?  Every one that works for me is going to use the system,
 so
 is he/she a person or an employee.



 If there is anything like this please let me know.  I am trying to learn
 as
 much as possible about the OFBiz system but by bit.



 Thanks

 Brendan




-- 
Thanks  Regards
Mridul Pathak
Hotwax Media
http://www.hotwaxmedia.com
[EMAIL PROTECTED]
__
Office  :   509.855.4113
Mobile : +919425926892