I don't get it exactly.
Do you mean use a local Map or a distributed one?
If you need a distributed - clustered - cache you need to have JDG if you use EAP6.
There are different modes to do so
1) use embedded or library mode,
your application need to add a dependency to JDG modules (which need to be downloaded from the customer portal)
You have access to the cache which will be installed in the same JVM as your application and the EAP6 server
2) Client server mode
You install a different JDG server and configure the cache here
your application need to add a dependency to JDG HotRod modules
The cache is in a different (remote) JVM, this wil decouple the cache data and your application
Note, in both cases you need to buy a JDG subscription additional to your EAP subscription!