[jboss-user] [JBoss Cache: Core Edition] - I don't Think I am doing this Correct

2008-03-18 Thread MThoresen
I am playing around with JBOSS Cache and do not know if I am doing this 
correct.  When I do a FindAllI can see that the cache is populated when i 
do a printDetail in the JMXConsole.  However, when I do bench testing and keep 
calling the same method, FindAll..., I do not seen any performance increase.  
Is it still making a call to the database?  It takes the same amount of time as 
non-cached implementation.  Below is the entity i am using.  It's a view in one 
of our tables that contains abour 20,000+ rows that I would like to have cached.


Taken from Hibernate tutorial - : This call actually will fill the cache when 
it is first run.  but as I do consecutive calls to this, i do not see a 
performance increase.  They all take the same amount of time as the initial 
call.  Is this the wrong thing to do?

private EntityManager em;
@PersistenceContext
public void setEntityManager(EntityManager em) {
this.em = em;
}
.
.
.
.
   public List findAll() {
return getEntityManager().createQuery(from  + 
getEntityBeanType().getName() ).getResultList();
}


@Entity(name = VAwaitedDocs)
@Table(schema = OPS_TRACKING, name = V_AWAITED_DOCS)
@Cache(usage= CacheConcurrencyStrategy.READ_ONLY)
public class VAwaitedDocs implements Serializable, Comparable {
private String tradeInfo;
private String priceInfo;
private String trdSysCode;
private Long tradeId;
private Long tradeRqmtId;
private String sender;
private String docType;
private Timestamp rqmtEventDt;
private String cdtyCode;
private String cdtyGrpCode;
private Timestamp tradeDt;
private String cptySn;
private String brokerSn;
private String bookingCompany;
private String tradeTypeCode;
private String sttlType;
private String buySellInd;
private Long qtyTot;
private Long qty;
private String uomDurCode;
private String locationSn;
private String payPrice;
private String recPrice;
private Timestamp startDt;
private Timestamp endDt;
private String bkrComm;
private String reference;
private String cmt;
private String status;
private String rqmt;
private String finalApprovalFlag;
private String cptyLn;

@Basic
@Column(name = TRADE_INFO, length = 206)
public String getTradeInfo() {
return tradeInfo;
}

public void setTradeInfo(String tradeInfo) {
this.tradeInfo = tradeInfo;
}

@Basic
@Column(name = PRICE_INFO, length = 130)
public String getPriceInfo() {
return priceInfo;
}

public void setPriceInfo(String priceInfo) {
this.priceInfo = priceInfo;
}

@Basic
@Column(name = TRD_SYS_CODE, nullable = false, length = 5)
public String getTrdSysCode() {
return trdSysCode;
}

public void setTrdSysCode(String trdSysCode) {
this.trdSysCode = trdSysCode;
}

@Id
@Column(name = TRADE_ID, nullable = false, length = 12)
public Long getTradeId() {
return tradeId;
}

public void setTradeId(Long tradeId) {
this.tradeId = tradeId;
}

@Basic
@Column(name = TRADE_RQMT_ID, nullable = false, length = 12)
public Long getTradeRqmtId() {
return tradeRqmtId;
}

public void setTradeRqmtId(Long tradeRqmtId) {
this.tradeRqmtId = tradeRqmtId;
}

@Basic
@Column(name = SENDER, length = 20)
public String getSender() {
return sender;
}

public void setSender(String sender) {
this.sender = sender;
}

@Basic
@Column(name = DOC_TYPE, length = 6)
public String getDocType() {
return docType;
}

public void setDocType(String docType) {
this.docType = docType;
}

@Basic
@Column(name = RQMT_EVENT_DT, length = 7)
public Timestamp getRqmtEventDt() {
return rqmtEventDt;
}

public void setRqmtEventDt(Timestamp rqmtEventDt) {
this.rqmtEventDt = rqmtEventDt;
}

@Basic
@Column(name = CDTY_CODE, length = 10)
public String getCdtyCode() {
return cdtyCode;
}

public void setCdtyCode(String cdtyCode) {
this.cdtyCode = cdtyCode;
}

@Basic
@Column(name = CDTY_GRP_CODE, length = 5)
public String getCdtyGrpCode() {
return cdtyGrpCode;
}

public void setCdtyGrpCode(String cdtyGrpCode) {
this.cdtyGrpCode = cdtyGrpCode;
}

@Basic
@Column(name = TRADE_DT, length = 7)
public Timestamp getTradeDt() {
return tradeDt;
}

public void setTradeDt(Timestamp tradeDt) {
this.tradeDt = tradeDt;
}

@Basic
@Column(name = CPTY_SN, length = 20)
public String getCptySn() {
return cptySn;
}

public void setCptySn(String cptySn) {
this.cptySn = cptySn;
}

@Basic
@Column(name = BROKER_SN, length = 20)
public String getBrokerSn() {
return brokerSn;
}

public void 

[jboss-user] [JBoss Cache: Core Edition] - Re: I don't Think I am doing this Correct

2008-03-18 Thread MThoresen
Sorry, the persistent unit got cut off.  It is:
?xml version=1.0 encoding=UTF-8?

persistence-unit name=opsmanagerUnit
jta-data-sourcejava:/OpsTrackingDS/jta-data-source

 
 
 
 
 

/persistence-unit


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4137554#4137554

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4137554
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Cache: Core Edition] - Re: I don't Think I am doing this Correct

2008-03-18 Thread MThoresen
 
 
 
 
 


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4137555#4137555

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4137555
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - Re: JBOSS Cache vs Gigaspaces

2008-03-13 Thread MThoresen
Are  there  certain methods  that I can call that will generate this export 
XML, or do I need to construct it myself?  What would be the best approach to 
do this?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4136249#4136249

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4136249
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - Re: JBOSS Cache vs Gigaspaces

2008-03-12 Thread MThoresen
So, I have a Cache (JBOSS) that is filled with nRows.  

Now, the problem is to get this data into some format that can populate a .NET 
Grid on a windows front end app.  Is it possible to have a WS that can make a 
call and return the data in XML format?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4135992#4135992

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4135992
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - Re: JBOSS Cache vs Gigaspaces

2008-03-11 Thread MThoresen
In either case though, how would I accomplish the following:

Our client application will be written in C# (visual studio), and utilize the 
devexpress grid.  Using GigaSpaces, I believe that they have APIs for C# .NET.  
Using JBOSSCache, what would be the best approach to populate the Data Grid?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4135760#4135760

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4135760
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - Re: JBOSS Cache vs Gigaspaces

2008-03-08 Thread MThoresen
All data is in my own schema.  However, it is populated and maintained by 
another external process (besides our current client application as well).  We 
have a service that currently monitors, what we call an audit table.  When rows 
are added to this audit table, certain triggers are fired depending on weather 
it is an edit, or insert type of audit.  Inserts will create new entries into 
our schema, and edits will update the existing data in our schema.  Our client 
app updates and maintains our schema directly, but for only edit purposes.

So, when these inserts are done, we would also like to create that new record 
in the cache, and have our clients apps updated as well.  Currently, this is 
done by client JMS subscriptions.  Same as the edits.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4135083#4135083

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4135083
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - JBOSS Cache vs Gigaspaces

2008-03-07 Thread MThoresen
I would like to know if jboss cache would be suitable for the following.  We 
have a view that returns a very large recordset.  It can take up to 2-3 minutes 
for the data to actually be pulled from our DB to our client app.  Can jboss 
cache be used to store this data in a central location that N number of clients 
can access?  The cache would need to always be available.  Also, is it possible 
to keep the cache current when new records, and or edits are made, and then 
broadcast these changes to our users?  I am new at using cache managers and 
just want to know if this scenario would work with jboss cache?  Much thanks.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4134968#4134968

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4134968
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Messaging] - Connection not authorized to addMessages to destination

2007-03-24 Thread MThoresen
Newbee here.  Doing a simple wholesaler and retaler jms example.

1) wholesaler creates a temporarytopic and subscribes to it.
2) when wholesaler publishes a message, it sets the message's JMSReplyTo to the 
temporaryTopic.

3) When retailer receives a message from wholesaler, it does some stuff and 
then based on calculations, it will publish a message to the 
message.getJMSReplyTo().  Here is the basic code snipets..

wholesaler:
hotDealsTopic = (Topic) jndi.lookup(topic/Hot Deals);
publisher = pubSession.createPublisher(hotDealsTopic);

buyOrdersTopic = subSession.createTemporaryTopic();

subscriber = subSession.createSubscriber(buyOrdersTopic);
subscriber.setMessageListener(this);

when publishing:
StreamMessage message = pubSession.createStreamMessage();
message.writeString(dealDesc);
message.writeString(itemDesc);
message.writeFloat(oldPrice);
message.writeFloat(newPrice);

message.setStringProperty(Username, username);
message.setStringProperty(Itemdesc, itemDesc);

message.setJMSReplyTo(buyOrdersTopic);

publisher.publish(message, DeliveryMode.PERSISTENT, 
Message.DEFAULT_PRIORITY,180);


Retailer: on Receive and process:

TextMessage textMsg = session.createTextMessage();

textMsg.setText(count +   + itemDesc);

Topic buyTopic = (Topic) message.getJMSReplyTo();
publisher = session.createPublisher(buyTopic);

textMsg.setJMSCorrelationID(DurableRetailer);

publisher.publish(textMsg, DeliveryMode.PERSISTENT, 
Message.DEFAULT_PRIORITY, 180);


JMSSecurityException:
avax.jms.JMSSecurityException: Connection not authorized to addMessages to 
destination: JMS_TT5
at 
org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:167)
at 
org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:226)
at 
org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:112)
at 
org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:111)
at 
org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:595)







View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4031325#4031325

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4031325
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user