>I would strongly recommend attempting to solve your performance and
>availability problems with JPA before moving to another storage
yes I remember it. I do as your recommend,but it is not HA.
I use Oracle DATABASE.
I create a independent tablespace, it only include JPA table and index.
CREATE TABLE LOCKS (
APPLICATION_ID VARCHAR(50) NOT NULL,
UNIQUE_ID VARCHAR(50) NULL,
EXPIRATION_DATE TIMESTAMP NULL
);
ALTER TABLE LOCKS ADD CONSTRAINT LOCKS_PK
PRIMARY KEY (APPLICATION_ID);
建索引
CREATE INDEX "ST_TGT_FK_I"
ON SERVICETICKET ("TICKETGRANTINGTICKET_ID")
COMPUTE STATISTICS;
/** Create index on TGT self-referential foreign-key constraint */
CREATE INDEX "TGT_TGT_FK_I"
ON TICKETGRANTINGTICKET ("TICKETGRANTINGTICKET_ID")
COMPUTE STATISTICS;
In a word,I do as "https://wiki.jasig.org/display/CASUM/JpaTicketRegistry".
My sence:
two tomcat to deploy cas_server
one oracle to share ticket
cas_client: liferay, it integrate 10 application.in other word,a user login
cas,it create 10 ST at the same time.
when cas server down,i query the database, i find it have a lot of ST.
select count(*) as count_locks from locks;
>
> select count(*) as count_REGISTEREDSERVICEIMPL from REGISTEREDSERVICEIMPL;
>
> select count(*) as count_RS_AITRIBUTES from rs_attributes;
>
> SELECT COUNT(*) as count_SERVICETICKET FROM SERVICETICKET;
>
> select count(id) as count_ticketgrantingticket from ticketgrantingticket;
>
>
>
> COUNT_LOCKS
>
> ----------------------
>
> 1
>
> 1 rows selected
>
> COUNT_REGISTEREDSERVICEIMPL
>
> ---------------------------
>
> 0
>
> 1 rows selected
>
> COUNT_RS_AITRIBUTES
>
> ----------------------
>
> 0
>
> 1 rows selected
>
> COUNT_SERVICETICKET
>
> ----------------------
>
> 2696459
>
> 1 rows selected
>
> COUNT_TICKETGRANTINGTICKET
>
> --------------------------
>
> 422531
>
> 1 rows selected
>
So I think the JPA way is not HA.
As i know,NOSQL is good way to slove the HA problem,and I want to try it.
**
2011/3/10 Marvin Addison <[email protected]>
> > I have use the JPA(oracle) way to share ticket,but it ofen down by the
> > deadlock!
>
> I would strongly recommend attempting to solve your performance and
> availability problems with JPA before moving to another storage
> mechanism. What database platform are you using? Have you created
> the indices as described in the red box at the top of
> https://wiki.jasig.org/display/CASUM/JpaTicketRegistry? These
> dramatically reduce probability of deadlocks on some platforms. There
> are strategies on other platforms besides, but I'll need to know your
> platform to help further.
>
> M
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user