integration by parts transforming a vector integral to vector times divergence? In Jackson's 'classical electrodynamics' he re-expresses a volume integral of a vector in terms of a moment like divergence:
$$\int \mathbf{J} d^3 x = - \int \mathbf{x} ( \boldsymbol{\nabla} \cdot \mathbf{J} ) d^3 x$$
He calls this change "integration by parts".  If this is integration by parts, there must be some form of chain rule (where one of the terms is zero on the boundry), but I can't figure out what that chain rule would be.  I initially thought that the expansion of
$$\boldsymbol{\nabla} (\mathbf{x} \cdot \mathbf{J})$$
might have the structure I was looking for (i.e. something like $\mathbf{x} \boldsymbol{\nabla} \cdot \mathbf{J}+\mathbf{J} \boldsymbol{\nabla} \cdot \mathbf{x}$), however
$$\boldsymbol{\nabla} (\mathbf{x} \cdot \mathbf{J}) 
=
\mathbf{x} \cdot \boldsymbol{\nabla} \mathbf{J}
+\mathbf{J} \cdot \boldsymbol{\nabla} \mathbf{x}
+ 
\mathbf{x} \times ( \boldsymbol{\nabla} \times \mathbf{J} )
= \mathbf{J} + \sum_a x_a \boldsymbol{\nabla} J_a.
$$
I tried a few other gradients of various vector products (including $\boldsymbol{\nabla}  \times ( \mathbf{x}  \times \mathbf{J} )$), but wasn't able to figure out one that justifies what the author did with this integral.

I found an answer in Griffiths' Introduction to electrodynamics (problem 5.7) which poses a problem of relating the volume integral of $\mathbf{J}$ to the dipole moment, and hints that this can be done by expanding
$$\int \boldsymbol{\nabla} \cdot ( x \mathbf{J} ) d^3 x.$$
That expansion is
$$\int \boldsymbol{\nabla} \cdot ( x \mathbf{J} ) d^3 x= \int (\boldsymbol{\nabla} x \cdot \mathbf{J}) d^3 x+ \int x (\boldsymbol{\nabla} \cdot \mathbf{J}) d^3 x.$$
Doing the same for the other coordinates and summing gives
$$\sum_{i = 1}^3 \mathbf{e}_i \int \boldsymbol{\nabla} \cdot ( x_i \mathbf{J} ) d^3 x=\int \mathbf{J} d^3 x+ \int \mathbf{x} (\boldsymbol{\nabla} \cdot \mathbf{J}) d^3 x.$$
I think the boundary condition argument would be to transform the left hand side using the divergence theorem
$$\int \mathbf{J} d^3 x+ \int \mathbf{x} (\boldsymbol{\nabla} \cdot \mathbf{J}) d^3 x=\sum_{i = 1}^3 \mathbf{e}_i \int_{S} ( x_i \mathbf{J} ) \cdot \hat{\mathbf{n}} dS$$
and then argue that this is zero for localized-enough currents by taking this surface to infinity, where $\mathbf{J}$ is zero.  The end result is the relation that Jackson calls "integration by parts".
