Skip to main content

cmp vs self-managed persistence (?)

1 reply [Last post]
jjfraney
Offline
Joined: 2005-08-24
Points: 0

Here are some questions about how I can design an SBB with respect to state persistence.

First, can my SBB interact with the JDBC API? I think so, but would like to know of real experience that someone did it. The Persistence RA implementation implies: yes.

Second: In my use cases, I can imagine the memory use of one of my SBBs to be some 10's of megabytes. Would mobicents/jboss(TreeCache) CMP manage this effectively? For example, I want to write an SBB that would send an annoucement to thousands of phone numbers which could easily take 10M-20MB of memory. Would I be pushing the limits of CMP if I put those in a List CMPField? I think the answer is YES, but would like to know what you think.

Third: What are advantages/disadvantages to using the Persistence RA vs obtaining an EntityManager directly in my SBB?

Thanks,
John

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10
Points: 0

> Here are some questions about how I can design an SBB
> with respect to state persistence.
>
> First, can my SBB interact with the JDBC API? I
> think so, but would like to know of real experience
> that someone did it.

Depends on the vendor, Mobicents allows anything J2EE exposed by the underlying JBoss AS, so in our case ... yes you can.

> The Persistence RA
> implementation implies: yes.

This RA has been deprecated and it is only in the repository, it doesn't get in binary releases. Next generation of the server will not include it.

> Second: In my use cases, I can imagine the memory
> use of one of my SBBs to be some 10's of megabytes.
> Would mobicents/jboss(TreeCache) CMP manage this
> effectively? For example, I want to write an SBB
> that would send an annoucement to thousands of phone
> numbers which could easily take 10M-20MB of memory.
> Would I be pushing the limits of CMP if I put those
> in a List CMPField? I think the answer is YES, but
> would like to know what you think.

Bingo!

> Third: What are advantages/disadvantages to using the
> Persistence RA vs obtaining an EntityManager directly
> in my SBB?

Directly, either make the entity manager factory static or design your own RA to expose it. EntityManager is cheap to build, the factory is not.

> Thanks,
> John

You are welcome!

-- Eduardo